Skip to content

Repository files navigation

YOBIT

Exchange plugin for bt_api framework — Russian cryptocurrency exchange.

PyPI VersionPython VersionsLicenseCIDocs


English | 中文

Overview

YoBit is a Russian cryptocurrency exchange offering trading services with a wide range of altcoins. This plugin integrates YoBit into the bt_api unified trading framework, supporting SPOT markets.

Features

  • REST API — market data queries, order management, account queries
  • Wide altcoin coverage — supports many small-cap trading pairs
  • Simple API key auth — standard API key + secret authentication

Exchange Code

CodeDescriptionAsset Type
YOBIT___SPOTYoBit spot marketsSPOT

Installation

pip install bt_api_yobit

Or install from source:

git clone https://github.com/cloudQuant/bt_api_yobit
cd bt_api_yobit
pip install -e .

Quick Start

frombt_apiimportBtApiapi=BtApi(
exchange_kwargs={
"YOBIT___SPOT": {
"api_key": "your_api_key",
"secret": "your_secret",
}
}
)
# Get ticker dataticker=api.get_tick("YOBIT___SPOT", "BTC_USDT")
print(ticker)
# Get order bookdepth=api.get_depth("YOBIT___SPOT", "BTC_USDT", count=20)
print(depth)
# Get klinesbars=api.get_kline("YOBIT___SPOT", "BTC_USDT", period="1h", count=100)
print(bars)

Supported Operations

OperationStatusDescription
TickerReal-time price and 24h statistics
OrderBook/DepthMarket depth and order book
Klines/BarsHistorical OHLCV data
Exchange InfoTrading rules and symbol info
BalanceAccount balance queries
AccountAccount information
Make OrderPlace limit/market orders
Cancel OrderCancel existing orders

API Reference

Feed — YobitRequestDataSpot

Inherits from YobitRequestData. Access via BtApi.

api.get_tick("YOBIT___SPOT", "BTC_USDT") # Tickerapi.get_depth("YOBIT___SPOT", "BTC_USDT") # Order bookapi.get_kline("YOBIT___SPOT", "BTC_USDT") # Klinesapi.get_exchange_info("YOBIT___SPOT") # Exchange info

Container — YobitExchangeDataSpot

Exchange metadata and configuration.

frombt_api_yobitimportYobitExchangeDataSpotinfo=YobitExchangeDataSpot()
print(info.get_rest_url()) # https://yobit.netprint(info.get_wss_url()) # wss://ws.yobit.netprint(info.get_kline_periods()) # { "1m": "1", "5m": "5", ... }

REST Endpoints

ActionPathMethod
ticker/api/3/ticker/{symbol}GET
depth/api/3/depth/{symbol}GET
trades/api/3/trades/{symbol}GET
info/api/3/infoGET
account/keyedGET

Architecture

bt_api_yobit/
├── src/bt_api_yobit/
│ ├── containers/ # YobitExchangeDataSpot
│ ├── feeds/ # YobitRequestDataSpot
│ ├── exchange_data/ # Exchange metadata
│ ├── errors/ # Error translation
│ └── plugin.py # register_yobit()
└── docs/
└── index.md # Bilingual API docs

Requirements

  • Python 3.9+
  • bt_api_base >= 0.15

Online Documentation

ResourceLink
Full Docshttps://bt-api-yobit.readthedocs.io/
Chinese Docshttps://bt-api-yobit.readthedocs.io/zh/latest/
GitHub Repositoryhttps://github.com/cloudQuant/bt_api_yobit
Issue Trackerhttps://github.com/cloudQuant/bt_api_yobit/issues

License

MIT License — see LICENSE for details.


中文

概述

YoBit 是一家 俄罗斯加密货币交易所,提供多种山寨币交易对。本插件将 YoBit 接入 bt_api 统一交易框架,支持 现货 (SPOT) 市场。

功能特点

  • REST API — 行情查询、订单管理、账户查询
  • 广泛的山寨币覆盖 — 支持大量小市值币种交易对
  • 简单 API Key 认证 — 标准 API Key + Secret 认证方式

交易所代码

代码描述资产类型
YOBIT___SPOTYoBit 现货市场SPOT

安装

pip install bt_api_yobit

或从源码安装:

git clone https://github.com/cloudQuant/bt_api_yobit
cd bt_api_yobit
pip install -e .

快速开始

frombt_apiimportBtApiapi=BtApi(
exchange_kwargs={
"YOBIT___SPOT": {
"api_key": "your_api_key",
"secret": "your_secret",
}
}
)
# 获取行情ticker=api.get_tick("YOBIT___SPOT", "BTC_USDT")
print(ticker)
# 获取订单簿depth=api.get_depth("YOBIT___SPOT", "BTC_USDT", count=20)
print(depth)
# 获取K线bars=api.get_kline("YOBIT___SPOT", "BTC_USDT", period="1h", count=100)
print(bars)

支持的操作

操作状态说明
行情 (Ticker)实时价格和24小时统计
订单簿 (OrderBook)市场深度和挂单
K线 (Klines)历史OHLCV数据
交易所信息交易规则和交易对信息
余额 (Balance)账户余额查询
账户 (Account)账户信息
下单 (Make Order)限价/市价下单
撤单 (Cancel Order)取消现有订单

API 参考

Feed — YobitRequestDataSpot

继承自 YobitRequestData,通过 BtApi 访问。

api.get_tick("YOBIT___SPOT", "BTC_USDT") # 行情api.get_depth("YOBIT___SPOT", "BTC_USDT") # 订单簿api.get_kline("YOBIT___SPOT", "BTC_USDT") # K线api.get_exchange_info("YOBIT___SPOT") # 交易所信息

Container — YobitExchangeDataSpot

交易所元数据和配置。

frombt_api_yobitimportYobitExchangeDataSpotinfo=YobitExchangeDataSpot()
print(info.get_rest_url()) # https://yobit.netprint(info.get_wss_url()) # wss://ws.yobit.netprint(info.get_kline_periods()) # { "1m": "1", "5m": "5", ... }

REST 端点

动作路径方法
ticker/api/3/ticker/{symbol}GET
depth/api/3/depth/{symbol}GET
trades/api/3/trades/{symbol}GET
info/api/3/infoGET
account/keyedGET

项目结构

bt_api_yobit/
├── src/bt_api_yobit/
│ ├── containers/ # YobitExchangeDataSpot
│ ├── feeds/ # YobitRequestDataSpot
│ ├── exchange_data/ # 交易所元数据
│ ├── errors/ # 错误翻译
│ └── plugin.py # register_yobit()
└── docs/
└── index.md # 中英文API文档

系统要求

  • Python 3.9+
  • bt_api_base >= 0.15

在线文档

资源链接
完整文档https://bt-api-yobit.readthedocs.io/
中文文档https://bt-api-yobit.readthedocs.io/zh/latest/
GitHub 仓库https://github.com/cloudQuant/bt_api_yobit
问题反馈https://github.com/cloudQuant/bt_api_yobit/issues

许可证

MIT 许可证 — 详见 LICENSE

About

Exchange adapter package for bt_api

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages