Skip to main content

CoinRebate Python SDK โ€” Get the best crypto exchange fees in 3 lines of code.

Project description

๐Ÿฆ€ CoinRebate SDK โ€” CoinRebate Python SDK

3 ่กŒไปฃ็ ่Žทๅ–ๅ…จ็ฝ‘ๆœ€ไผ˜ไบคๆ˜“ๆ‰€่ดน็އใ€‚ไธบ AI Agent ๅ’Œ้‡ๅŒ–ไบคๆ˜“่€…่€Œ็”Ÿใ€‚

Python 3.8+ License: MIT

โšก 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

โš–๏ธ Legal

CoinRebate provides fee comparison only. We do NOT custody funds or provide investment advice. NFA.

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coinrebate_sdk-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

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

Hashes for coinrebate_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7f45177c53cffa83a48706dde840bf38d90ddcc1dbd1133c441d54c99109c4d0
MD5 84074a1cb844ac2959794434a0e35f8f
BLAKE2b-256 543ed43261c7ee51a3d9d75d5c4cc0707089e5ee82273c634abdf823130e0723

See more details on using hashes here.

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

Hashes for coinrebate_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47b53fdd5930d4abfdd2cffe176aa2a9b7e98fc8181c3e21f45ce1577e22d4ab
MD5 32cae1d1b932a2a04ca5142624a8c653
BLAKE2b-256 d4d3c58e6ef6660e1f563772828b43835ae6642e6c503414023a238caf503790

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page