HTX (Huobi) exchange plugin for bt_api, supporting Spot and Derivatives trading.
English | 中文
This package provides HTX (Huobi) exchange plugin for bt_api for the bt_api framework. It offers a unified interface for interacting with HTX (Huobi) exchange.
- Spot and derivatives trading
- REST and WebSocket APIs
- Comprehensive market data
- Order management
- Balance tracking
pip install bt_api_htxOr install from source:
git clone https://github.com/cloudQuant/bt_api_htx
cd bt_api_htx
pip install -e .frombt_apiimportBtApi# Initializeapi=BtApi(
exchange_kwargs={
"HTX___SPOT": {
"api_key": "your_api_key",
"secret": "your_secret",
}
}
)
# Get ticker dataticker=api.get_tick("HTX___SPOT", "btcusdt")
print(ticker)| Operation | Status |
|---|---|
| Ticker | ✅ |
| OrderBook | ✅ |
| Trades | ✅ |
| Bars/Klines | ✅ |
| Orders | ✅ |
| Balances | ✅ |
| Positions | ✅ |
| Resource | Link |
|---|---|
| English Docs | https://bt-api-htx.readthedocs.io/ |
| Chinese Docs | https://bt-api-htx.readthedocs.io/zh/latest/ |
| GitHub Repository | https://github.com/cloudQuant/bt_api_htx |
| Issue Tracker | https://github.com/cloudQuant/bt_api_htx/issues |
- Python 3.9+
- bt_api_base >= 0.15
bt_api_htx/
├── src/bt_api_htx/ # Source code
│ ├── containers/ # Data containers
│ ├── feeds/ # API feeds
│ ├── gateway/ # Gateway adapter
│ └── plugin.py # Plugin registration
├── tests/ # Unit tests
└── docs/ # Documentation
MIT License - see LICENSE for details.
- Report bugs via GitHub Issues
- Email: yunjinqi@gmail.com
本包为 bt_api 框架提供 HTX (Huobi) exchange plugin for bt_api。它提供了与 火币交易所 交易所交互的统一接口。
- 现货和衍生品交易
- REST 和 WebSocket API
- 全面的市场数据
- 订单管理
- 余额跟踪
pip install bt_api_htx或从源码安装:
git clone https://github.com/cloudQuant/bt_api_htx
cd bt_api_htx
pip install -e .frombt_apiimportBtApi# 初始化api=BtApi(
exchange_kwargs={
"HTX___SPOT": {
"api_key": "your_api_key",
"secret": "your_secret",
}
}
)
# 获取行情数据ticker=api.get_tick("HTX___SPOT", "btcusdt")
print(ticker)| 操作 | 状态 |
|---|---|
| Ticker | ✅ |
| OrderBook | ✅ |
| Trades | ✅ |
| Bars/Klines | ✅ |
| Orders | ✅ |
| Balances | ✅ |
| Positions | ✅ |
| 资源 | 链接 |
|---|---|
| 英文文档 | https://bt-api-htx.readthedocs.io/ |
| 中文文档 | https://bt-api-htx.readthedocs.io/zh/latest/ |
| GitHub 仓库 | https://github.com/cloudQuant/bt_api_htx |
| 问题反馈 | https://github.com/cloudQuant/bt_api_htx/issues |
- Python 3.9+
- bt_api_base >= 0.15
bt_api_htx/
├── src/bt_api_htx/ # 源代码
│ ├── containers/ # 数据容器
│ ├── feeds/ # API 源
│ ├── gateway/ # 网关适配器
│ └── plugin.py # 插件注册
├── tests/ # 单元测试
└── docs/ # 文档
MIT 许可证 - 详见 LICENSE。
- 通过 GitHub Issues 反馈问题
- 邮箱: yunjinqi@gmail.com