Skip to content

Repository files navigation

ZEBPAY

Exchange plugin for bt_api framework — Indian cryptocurrency exchange.

PyPI VersionPython VersionsLicenseCIDocs


English | 中文

Overview

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.

Features

  • 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

Exchange Code

CodeDescriptionAsset Type
ZEBPAY___SPOTZebpay spot marketsSPOT

Installation

pip install bt_api_zebpay

Or install from source:

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

Quick Start

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)

Supported Operations

OperationStatusDescription
TickerReal-time price and 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
Query OrderQuery order status

API Reference

Feed — ZebpayRequestDataSpot

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 info

Container — ZebpayExchangeDataSpot

Exchange 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", ... }

REST Endpoints

ActionPathMethod
ticker/api/v2/market/tickerGET
orderbook/api/v2/market/orderbookGET
klines/api/v2/market/klinesGET
trades/api/v2/market/tradesGET
exchangeInfo/api/v2/ex/exchangeInfoGET
balance/api/v2/account/balanceGET
order/api/v2/orderPOST
cancel_order/api/v2/orderDELETE

Kline Periods

PeriodZebpay Value
1m1m
5m5m
15m15m
30m30m
1h1h
2h2h
4h4h
12h12h
1d1d
1w1w

Architecture

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

Requirements

  • Python 3.9+
  • bt_api_base >= 0.15

Online Documentation

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

License

MIT License — see LICENSE for details.


中文

概述

Zebpay 是一家 印度加密货币交易所,提供以印度卢比(INR)和 USDT 计价的加密货币交易。本插件将 Zebpay 接入 bt_api 统一交易框架,支持 现货 (SPOT) 市场。

功能特点

  • REST API — 行情查询、订单管理、账户查询
  • INR/USDT 交易对 — 支持印度卢比和 USDT 交易对
  • 印度市场监管 — 主要印度加密货币交易所
  • 简单 API Key 认证 — 标准 API Key + Secret 认证方式

交易所代码

代码描述资产类型
ZEBPAY___SPOTZebpay 现货市场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)查询订单状态

API 参考

Feed — ZebpayRequestDataSpot

继承自 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") # 账户信息

Container — ZebpayExchangeDataSpot

交易所元数据和配置。

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", ... }

REST 端点

动作路径方法
ticker/api/v2/market/tickerGET
orderbook/api/v2/market/orderbookGET
klines/api/v2/market/klinesGET
trades/api/v2/market/tradesGET
exchangeInfo/api/v2/ex/exchangeInfoGET
balance/api/v2/account/balanceGET
order/api/v2/orderPOST
cancel_order/api/v2/orderDELETE

K线周期

周期Zebpay 值
1m1m
5m5m
15m15m
30m30m
1h1h
2h2h
4h4h
12h12h
1d1d
1w1w

项目结构

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

在线文档

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

许可证

MIT 许可证 — 详见 LICENSE

About

Exchange adapter package for bt_api

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages