Exchange plugin for bt_api framework — Indian cryptocurrency exchange.
English | 中文
Zebpay is an Indian cryptocurrency exchange offering crypto trading with INR (Indian Rupee) and USDT pairs. This plugin integrates Zebpay into the bt_api unified trading framework, supporting SPOT markets.
- REST API — market data queries, order management, account queries
- INR/USDT trading — supports Indian Rupee and USDT trading pairs
- Indian market focus — Zebpay is a major Indian crypto exchange
- Simple API key auth — standard API key + secret authentication
| Code | Description | Asset Type |
|---|---|---|
ZEBPAY___SPOT | Zebpay spot markets | SPOT |
pip install bt_api_zebpayOr install from source:
git clone https://github.com/cloudQuant/bt_api_zebpay
cd bt_api_zebpay
pip install -e .frombt_apiimportBtApiapi=BtApi(
exchange_kwargs={
"ZEBPAY___SPOT": {
"api_key": "your_api_key",
"secret": "your_secret",
}
}
)
# Get ticker dataticker=api.get_tick("ZEBPAY___SPOT", "BTC_INR")
print(ticker)
# Get order bookdepth=api.get_depth("ZEBPAY___SPOT", "BTC_INR", count=20)
print(depth)
# Get klinesbars=api.get_kline("ZEBPAY___SPOT", "BTC_INR", period="1h", count=100)
print(bars)| Operation | Status | Description |
|---|---|---|
| Ticker | ✅ | Real-time price and 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 |
| Query Order | ✅ | Query order status |
Inherits from ZebpayRequestData. Access via BtApi.
api.get_tick("ZEBPAY___SPOT", "BTC_INR") # Tickerapi.get_depth("ZEBPAY___SPOT", "BTC_INR") # Order bookapi.get_kline("ZEBPAY___SPOT", "BTC_INR") # Klinesapi.get_exchange_info("ZEBPAY___SPOT") # Exchange infoapi.get_balance("ZEBPAY___SPOT") # Balanceapi.get_account("ZEBPAY___SPOT") # Account infoExchange metadata and configuration.
frombt_api_zebpayimportZebpayExchangeDataSpotinfo=ZebpayExchangeDataSpot()
print(info.get_rest_url()) # https://sapi.zebpay.comprint(info.get_wss_url()) # wss://stream.zebpay.comprint(info.get_kline_periods()) # { "1m": "1m", "5m": "5m", ... }| Action | Path | Method |
|---|---|---|
| ticker | /api/v2/market/ticker | GET |
| orderbook | /api/v2/market/orderbook | GET |
| klines | /api/v2/market/klines | GET |
| trades | /api/v2/market/trades | GET |
| exchangeInfo | /api/v2/ex/exchangeInfo | GET |
| balance | /api/v2/account/balance | GET |
| order | /api/v2/order | POST |
| cancel_order | /api/v2/order | DELETE |
| Period | Zebpay Value |
|---|---|
| 1m | 1m |
| 5m | 5m |
| 15m | 15m |
| 30m | 30m |
| 1h | 1h |
| 2h | 2h |
| 4h | 4h |
| 12h | 12h |
| 1d | 1d |
| 1w | 1w |
bt_api_zebpay/
├── src/bt_api_zebpay/
│ ├── containers/ # ZebpayExchangeDataSpot
│ ├── feeds/ # ZebpayRequestDataSpot
│ ├── exchange_data/ # Exchange metadata
│ ├── errors/ # Error translation
│ └── plugin.py # register_plugin()
└── docs/
└── index.md # Bilingual API docs
- Python 3.9+
- bt_api_base >= 0.15
| Resource | Link |
|---|---|
| Full Docs | https://bt-api-zebpay.readthedocs.io/ |
| Chinese Docs | https://bt-api-zebpay.readthedocs.io/zh/latest/ |
| GitHub Repository | https://github.com/cloudQuant/bt_api_zebpay |
| Issue Tracker | https://github.com/cloudQuant/bt_api_zebpay/issues |
MIT License — see LICENSE for details.
Zebpay 是一家 印度加密货币交易所,提供以印度卢比(INR)和 USDT 计价的加密货币交易。本插件将 Zebpay 接入 bt_api 统一交易框架,支持 现货 (SPOT) 市场。
- REST API — 行情查询、订单管理、账户查询
- INR/USDT 交易对 — 支持印度卢比和 USDT 交易对
- 印度市场监管 — 主要印度加密货币交易所
- 简单 API Key 认证 — 标准 API Key + Secret 认证方式
| 代码 | 描述 | 资产类型 |
|---|---|---|
ZEBPAY___SPOT | Zebpay 现货市场 | SPOT |
pip install bt_api_zebpay或从源码安装:
git clone https://github.com/cloudQuant/bt_api_zebpay
cd bt_api_zebpay
pip install -e .frombt_apiimportBtApiapi=BtApi(
exchange_kwargs={
"ZEBPAY___SPOT": {
"api_key": "your_api_key",
"secret": "your_secret",
}
}
)
# 获取行情ticker=api.get_tick("ZEBPAY___SPOT", "BTC_INR")
print(ticker)
# 获取订单簿depth=api.get_depth("ZEBPAY___SPOT", "BTC_INR", count=20)
print(depth)
# 获取K线bars=api.get_kline("ZEBPAY___SPOT", "BTC_INR", period="1h", count=100)
print(bars)| 操作 | 状态 | 说明 |
|---|---|---|
| 行情 (Ticker) | ✅ | 实时价格和统计 |
| 订单簿 (OrderBook) | ✅ | 市场深度和挂单 |
| K线 (Klines) | ✅ | 历史OHLCV数据 |
| 交易所信息 | ✅ | 交易规则和交易对信息 |
| 余额 (Balance) | ✅ | 账户余额查询 |
| 账户 (Account) | ✅ | 账户信息 |
| 下单 (Make Order) | ✅ | 限价/市价下单 |
| 撤单 (Cancel Order) | ✅ | 取消现有订单 |
| 查询订单 (Query Order) | ✅ | 查询订单状态 |
继承自 ZebpayRequestData,通过 BtApi 访问。
api.get_tick("ZEBPAY___SPOT", "BTC_INR") # 行情api.get_depth("ZEBPAY___SPOT", "BTC_INR") # 订单簿api.get_kline("ZEBPAY___SPOT", "BTC_INR") # K线api.get_exchange_info("ZEBPAY___SPOT") # 交易所信息api.get_balance("ZEBPAY___SPOT") # 余额api.get_account("ZEBPAY___SPOT") # 账户信息交易所元数据和配置。
frombt_api_zebpayimportZebpayExchangeDataSpotinfo=ZebpayExchangeDataSpot()
print(info.get_rest_url()) # https://sapi.zebpay.comprint(info.get_wss_url()) # wss://stream.zebpay.comprint(info.get_kline_periods()) # { "1m": "1m", "5m": "5m", ... }| 动作 | 路径 | 方法 |
|---|---|---|
| ticker | /api/v2/market/ticker | GET |
| orderbook | /api/v2/market/orderbook | GET |
| klines | /api/v2/market/klines | GET |
| trades | /api/v2/market/trades | GET |
| exchangeInfo | /api/v2/ex/exchangeInfo | GET |
| balance | /api/v2/account/balance | GET |
| order | /api/v2/order | POST |
| cancel_order | /api/v2/order | DELETE |
| 周期 | Zebpay 值 |
|---|---|
| 1m | 1m |
| 5m | 5m |
| 15m | 15m |
| 30m | 30m |
| 1h | 1h |
| 2h | 2h |
| 4h | 4h |
| 12h | 12h |
| 1d | 1d |
| 1w | 1w |
bt_api_zebpay/
├── src/bt_api_zebpay/
│ ├── containers/ # ZebpayExchangeDataSpot
│ ├── feeds/ # ZebpayRequestDataSpot
│ ├── exchange_data/ # 交易所元数据
│ ├── errors/ # 错误翻译
│ └── plugin.py # register_plugin()
└── docs/
└── index.md # 中英文API文档
- Python 3.9+
- bt_api_base >= 0.15
MIT 许可证 — 详见 LICENSE。