Reliably talk to supported exchange APIs, with a simple raw interface. Handles the barebones communication (authentication, HTTP handling, etc.), as well as some abstraction of common methods. Used in production at HeartRithm since 2017.
- Retry of
GET
requests upon failure, up to 3 times, with an exponential back-off - Robust handling of connection, timeout, and HTTP errors, with grouping to
ExchangeApiException
. - Parsing / handling of exchange error messages
- Thorough tests with mocks
- Proper python logging
- High performance json parsing with ujson
- Methods to standardize symbol/pair names across exchanges
Bitfinex
from exchanges import exchange_factory
# Public V2
client = exchange_factory("bitfinex")()
client.brequest(2, "platform/status")
# returns [1]
# Private V1
client = exchange_factory("bitfinex")("my key", "my secret")
result = client.brequest(1, "offer/cancel", authenticate=True, method="POST", data={"offer_id": 124124})
- Bitfinex, both V1 and V2 versions of the REST API
- Binance spot API
- SFOX
- KuCoin
- Shrimpy
- Tardis