Exchange plugin for bt_api framework — Russian cryptocurrency exchange.
English | 中文
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.
- 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
| Code | Description | Asset Type |
|---|---|---|
YOBIT___SPOT | YoBit spot markets | SPOT |
pip install bt_api_yobitOr install from source:
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",
}
}
)
# 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)| Operation | Status | Description |
|---|---|---|
| Ticker | ✅ | Real-time price and 24h statistics |
| OrderBook/Depth | ✅ | Market depth and order book |
| Klines/Bars | ✅ | Historical OHLCV data |
| Exchange Info | ✅ | Trading rules and symbol info |
| Balance | ✅ | Account balance queries |
| Account | ✅ | Account information |
| Make Order | ✅ | Place limit/market orders |
| Cancel Order | ✅ | Cancel existing orders |
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 infoExchange 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", ... }| Action | Path | Method |
|---|---|---|
| ticker | /api/3/ticker/{symbol} | GET |
| depth | /api/3/depth/{symbol} | GET |
| trades | /api/3/trades/{symbol} | GET |
| info | /api/3/info | GET |
| account | /keyed | GET |
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
- Python 3.9+
- bt_api_base >= 0.15
| Resource | Link |
|---|---|
| Full Docs | https://bt-api-yobit.readthedocs.io/ |
| Chinese Docs | https://bt-api-yobit.readthedocs.io/zh/latest/ |
| GitHub Repository | https://github.com/cloudQuant/bt_api_yobit |
| Issue Tracker | https://github.com/cloudQuant/bt_api_yobit/issues |
MIT License — see LICENSE for details.
YoBit 是一家 俄罗斯加密货币交易所,提供多种山寨币交易对。本插件将 YoBit 接入 bt_api 统一交易框架,支持 现货 (SPOT) 市场。
- REST API — 行情查询、订单管理、账户查询
- 广泛的山寨币覆盖 — 支持大量小市值币种交易对
- 简单 API Key 认证 — 标准 API Key + Secret 认证方式
| 代码 | 描述 | 资产类型 |
|---|---|---|
YOBIT___SPOT | YoBit 现货市场 | 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) | ✅ | 取消现有订单 |
继承自 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") # 交易所信息交易所元数据和配置。
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", ... }| 动作 | 路径 | 方法 |
|---|---|---|
| ticker | /api/3/ticker/{symbol} | GET |
| depth | /api/3/depth/{symbol} | GET |
| trades | /api/3/trades/{symbol} | GET |
| info | /api/3/info | GET |
| account | /keyed | GET |
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。