CoinRebate Python SDK โ Get the best crypto exchange fees in 3 lines of code.
Project description
๐ฆ CoinRebate SDK โ CoinRebate Python SDK
3 ่กไปฃ็ ่ทๅๅ จ็ฝๆไผไบคๆๆ่ดน็ใไธบ AI Agent ๅ้ๅไบคๆ่ ่็ใ
โก Quick Start
from coinrebate_sdk import CoinRebateClient
client = CoinRebateClient()
best = client.get_best_exchange(purpose="futures")
print(f"Use {best['name']} โ {best['fee_discount']}")
# โ Use Bybit โ 20% OFF
๐ฆ Installation
# ๅบ็กๅฎ่ฃ
pip install -e .
# ๅธฆ CCXT ้ๆ
pip install -e ".[ccxt]"
๐ง API Reference
CoinRebateClient
client = CoinRebateClient(
base_url="https://www.coinrebate.vip", # ๅฏ้
timeout=10, # ่ฏทๆฑ่ถ
ๆถ๏ผ็ง๏ผ
max_retries=3, # ๆๅคง้่ฏ
retry_delay=1.0, # ้่ฏ้ด้
)
ๆ ธๅฟๆนๆณ
| ๆนๆณ | ่ฏดๆ | ่ฟๅ |
|---|---|---|
health_check() |
API ๅฅๅบทๆฃๆฅ | {"status": "ok", ...} |
get_best_exchange(purpose, kyc) |
่ทๅๆจ่ไบคๆๆ | ไบคๆๆ dict |
get_all_exchanges(purpose, kyc) |
่ทๅๅ จ้จไบคๆๆ | list[dict] |
get_exchange(slug) |
ๆฅ่ฏขๆๅฎไบคๆๆ | ไบคๆๆ dict |
get_full_response(...) |
่ทๅๅฎๆด API ๅๅบ | ๅฎๆด JSON |
get_ccxt_instance(slug, purpose) |
ๅๅปบ CCXT ๅฎไพ | ccxt.Exchange |
print_fee_table() |
็ป็ซฏๆๅฐ่ดน็ๅฏนๆฏ่กจ | None |
ๅๆฐ่ฏดๆ
- purpose:
"futures"ๆ"spot"โ ๆ็จ้็ญ้ๆจ่ - kyc:
Falseโ ๅช่ฟๅๅ KYC ็ DEX๏ผAI Agent ้ฆ้๏ผ - slug: ไบคๆๆๆ ่ฏ โ
binance,okx,bybit,bitget,gate,hyperliquid,aster
๐ค AI Agent ๅบๆฏ
# AI Agent ไธ่ฝๅ KYC โ ๅช็ DEX
client = CoinRebateClient()
dex = client.get_best_exchange(kyc=False)
print(f"โ {dex['name']}: {dex['signup_url']}")
# โ Hyperliquid: https://www.coinrebate.vip/go/hyperliquid
๐ CCXT ้ๆ
# ่ชๅจๅๅปบๅธฆ referral code ็ CCXT ๅฎไพ
client = CoinRebateClient()
exchange = client.get_ccxt_instance("binance")
# ็ดๆฅ่ทๅ่กๆ
ticker = exchange.fetch_ticker("BTC/USDT")
print(f"BTC/USDT: {ticker['last']}")
๐ฅ๏ธ ็ป็ซฏ่ดน็่กจ
client = CoinRebateClient()
client.print_fee_table()
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CoinRebate Fee Comparison Table
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Exchange Type Discount KYC CCXT ID
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ๅธๅฎ Binance CEX 20% OFF Yes binance
ๆฌงๆ OKX CEX 20% OFF Yes okx
Bybit CEX 20% OFF Yes bybit
...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Links
- API Docs: https://www.coinrebate.vip/api-docs.html
- OpenAPI Spec: https://www.coinrebate.vip/openapi.json
- Website: https://www.coinrebate.vip
โ๏ธ Legal
CoinRebate provides fee comparison only. We do NOT custody funds or provide investment advice. NFA.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coinrebate_sdk-0.1.0.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coinrebate_sdk-0.1.0.tar.gz.
File metadata
- Download URL: coinrebate_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f45177c53cffa83a48706dde840bf38d90ddcc1dbd1133c441d54c99109c4d0
|
|
| MD5 |
84074a1cb844ac2959794434a0e35f8f
|
|
| BLAKE2b-256 |
543ed43261c7ee51a3d9d75d5c4cc0707089e5ee82273c634abdf823130e0723
|
File details
Details for the file coinrebate_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: coinrebate_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47b53fdd5930d4abfdd2cffe176aa2a9b7e98fc8181c3e21f45ce1577e22d4ab
|
|
| MD5 |
32cae1d1b932a2a04ca5142624a8c653
|
|
| BLAKE2b-256 |
d4d3c58e6ef6660e1f563772828b43835ae6642e6c503414023a238caf503790
|