Skip to content

Repository files navigation

bt_api_buda

PyPI VersionPython VersionsLicenseCIDocs


bt_api_buda

Buda exchange plugin for bt_api — Unified REST API for Spot trading with support for Latin American markets.

bt_api_buda is a runtime plugin for bt_api that connects to Buda exchange. It depends on bt_api_base for core infrastructure.

ResourceLink
English Docshttps://bt-api-buda.readthedocs.io/
Chinese Docshttps://bt-api-buda.readthedocs.io/zh/latest/
GitHubhttps://github.com/cloudQuant/bt_api_buda
PyPIhttps://pypi.org/project/bt_api_buda/
Issueshttps://github.com/cloudQuant/bt_api_buda/issues
bt_api_basehttps://bt-api-base.readthedocs.io/
Main Projecthttps://github.com/cloudQuant/bt_api_py

Features

Spot Trading

FeatureStatusDescription
TickerMarket ticker with 24hr stats
Order BookDepth data with bid/ask prices
K-LinesCandlestick charts (1m to 1w)
Trade HistoryRecent trades
Exchange InfoMarket listings and trading rules
Account BalanceUser balance across all assets
Place OrderLimit orders (Bid/Ask)
Cancel OrderCancel pending orders
Query OrderGet order status by ID
Open OrdersList all pending orders

Supported Markets

Buda supports trading in 4 fiat currencies and USDT:

CurrencyCodeType
Chilean PesoCLPFiat
Colombian PesoCOPFiat
Peruvian SolPENFiat
EuroEURFiat
TetherUSDTStablecoin

Supported Trading Pairs

Buda markets include popular pairs such as:

  • BTC-CLP, ETH-CLP, USDT-CLP
  • BTC-COP, ETH-COP, USDT-COP
  • BTC-PEN, ETH-PEN, USDT-PEN
  • BTC-EUR, ETH-EUR, USDT-EUR
  • BTC-USDT, ETH-USDT

Plugin Architecture

Auto-registers at import time via ExchangeRegistry. Works seamlessly with BtApi:

frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BUDA___SPOT": {
"api_key": "your_public_key",
"secret": "your_private_key",
}
})
# Get ticker (public - no auth required)ticker=api.get_tick("BUDA___SPOT", "BTC-CLP")
# Get balance (requires auth)balance=api.get_balance("BUDA___SPOT")
# Place order (requires auth)order=api.make_order(
exchange_name="BUDA___SPOT",
symbol="BTC-CLP",
volume=0.001,
price=50000000,
order_type="limit",
)

Installation

From PyPI (Recommended)

pip install bt_api_buda

From Source

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

Requirements

  • Python 3.93.14
  • bt_api_base >= 0.15

Quick Start

1. Install

pip install bt_api_buda

2. Get ticker (public — no API key needed)

frombt_api_pyimportBtApiapi=BtApi()
ticker=api.get_tick("BUDA___SPOT", "BTC-CLP")
print(f"BTC-CLP price: {ticker}")

3. Place an order (requires API key)

frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BUDA___SPOT": {
"api_key": "your_public_key",
"secret": "your_private_key",
}
})
order=api.make_order(
exchange_name="BUDA___SPOT",
symbol="BTC-CLP",
volume=0.001,
price=50000000,
order_type="limit",
)
print(f"Order placed: {order}")

Architecture

bt_api_buda/
├── plugin.py # register_plugin() — bt_api plugin entry point
├── registry_registration.py # register_buda() — feeds / exchange_data / balance_handler registration
├── exchange_data/
│ └── __init__.py # BudaExchangeData, BudaExchangeDataSpot
├── feeds/
│ └── live_buda/
│ ├── spot.py # BudaRequestDataSpot — all spot operations
│ └── request_base.py # BudaRequestData — REST base class
└── errors/
└── __init__.py # Error definitions

Supported Operations

CategoryOperationNotes
Market Dataget_tick24hr rolling ticker
get_depthOrder book depth
get_klineCandlestick/k-line data
get_exchange_infoMarket listings
Accountget_balanceAll asset balances
get_accountFull account info
get_open_ordersAll pending orders
query_orderSingle order by ID
Tradingmake_orderLimit orders (Bid/Ask)
cancel_orderCancel pending order

Rate Limits

EndpointLimit
General60 requests/minute
Trading30 requests/minute

Error Handling

All Buda API errors are translated to bt_api_base error types:

ErrorDescription
API_ERRORUnknown error
RATE_LIMITRate limit exceeded
INVALID_PARAMETERInvalid parameter
SIGNATURE_INVALIDInvalid signature
API_KEY_MISSINGAPI key not provided
ORDER_NOT_FOUNDOrder does not exist
BALANCE_INSUFFICIENTInsufficient balance

Documentation

DocLink
Englishhttps://bt-api-buda.readthedocs.io/
中文https://bt-api-buda.readthedocs.io/zh/latest/
bt_api_basehttps://bt-api-base.readthedocs.io/
Main Projecthttps://cloudquant.github.io/bt_api_py/

License

MIT — see LICENSE.


Support



中文

bt_api 的 Buda 交易所插件 — 为现货交易提供统一的 REST API,支持拉丁美洲市场。

bt_api_budabt_api 的运行时插件,连接 Buda 交易所。依赖 bt_api_base 提供核心基础设施。

资源链接
英文文档https://bt-api-buda.readthedocs.io/
中文文档https://bt-api-buda.readthedocs.io/zh/latest/
GitHubhttps://github.com/cloudQuant/bt_api_buda
PyPIhttps://pypi.org/project/bt_api_buda/
问题反馈https://github.com/cloudQuant/bt_api_buda/issues
bt_api_basehttps://bt-api-base.readthedocs.io/
主项目https://github.com/cloudQuant/bt_api_py

功能特点

现货交易

功能状态说明
行情24小时滚动行情
订单簿深度数据(买/卖价)
K线蜡烛图(1分钟到1周)
成交历史近期成交
交易所信息市场列表和交易规则
账户余额全资产余额查询
下单限价单(买入/卖出)
撤单取消挂单
订单查询按ID查询订单状态
挂单列表所有待成交订单

支持的市场

Buda 支持 4 种法币USDT 交易:

货币代码类型
智利比索CLP法币
哥伦比亚比索COP法币
秘鲁索尔PEN法币
欧元EUR法币
泰达币USDT稳定币

支持的交易对

Buda 市场包括:

  • BTC-CLP, ETH-CLP, USDT-CLP
  • BTC-COP, ETH-COP, USDT-COP
  • BTC-PEN, ETH-PEN, USDT-PEN
  • BTC-EUR, ETH-EUR, USDT-EUR
  • BTC-USDT, ETH-USDT

插件架构

通过 ExchangeRegistry 在导入时自动注册,与 BtApi 无缝协作:

frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BUDA___SPOT": {
"api_key": "your_public_key",
"secret": "your_private_key",
}
})
# 获取行情(公开接口,无需认证)ticker=api.get_tick("BUDA___SPOT", "BTC-CLP")
# 获取余额(需要认证)balance=api.get_balance("BUDA___SPOT")
# 下单(需要认证)order=api.make_order(
exchange_name="BUDA___SPOT",
symbol="BTC-CLP",
volume=0.001,
price=50000000,
order_type="limit",
)

安装

从 PyPI 安装(推荐)

pip install bt_api_buda

从源码安装

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

系统要求

  • Python 3.93.14
  • bt_api_base >= 0.15

快速开始

1. 安装

pip install bt_api_buda

2. 获取行情(公开接口,无需 API key)

frombt_api_pyimportBtApiapi=BtApi()
ticker=api.get_tick("BUDA___SPOT", "BTC-CLP")
print(f"BTC-CLP 价格: {ticker}")

3. 下单交易(需要 API key)

frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BUDA___SPOT": {
"api_key": "your_public_key",
"secret": "your_private_key",
}
})
order=api.make_order(
exchange_name="BUDA___SPOT",
symbol="BTC-CLP",
volume=0.001,
price=50000000,
order_type="limit",
)
print(f"订单已下单: {order}")

架构

bt_api_buda/
├── plugin.py # register_plugin() — bt_api 插件入口点
├── registry_registration.py # register_buda() — feeds / exchange_data / balance_handler 注册
├── exchange_data/
│ └── __init__.py # BudaExchangeData, BudaExchangeDataSpot
├── feeds/
│ └── live_buda/
│ ├── spot.py # BudaRequestDataSpot — 所有现货操作
│ └── request_base.py # BudaRequestData — REST 基类
└── errors/
└── __init__.py # 错误定义

支持的操作

类别操作说明
行情数据get_tick24小时滚动行情
get_depth订单簿深度
get_klineK线/蜡烛图数据
get_exchange_info市场列表
账户get_balance所有资产余额
get_account完整账户信息
get_open_orders所有挂单
query_order按ID查询订单
交易make_order限价单(买入/卖出)
cancel_order取消挂单

限流配置

端点限制
通用60 次/分钟
交易30 次/分钟

错误处理

所有 Buda API 错误均翻译为 bt_api_base 错误类型:

错误说明
API_ERROR未知错误
RATE_LIMIT请求过于频繁
INVALID_PARAMETER无效参数
SIGNATURE_INVALID无效签名
API_KEY_MISSING未提供 API key
ORDER_NOT_FOUND订单不存在
BALANCE_INSUFFICIENT余额不足

文档

文档链接
英文文档https://bt-api-buda.readthedocs.io/
中文文档https://bt-api-buda.readthedocs.io/zh/latest/
bt_api_basehttps://bt-api-base.readthedocs.io/
主项目https://cloudquant.github.io/bt_api_py/

许可证

MIT — 详见 LICENSE


技术支持

About

Exchange adapter package for bt_api

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages