Exchange Constants
The Python SDK gives predefined constants for all supported exchanges. When you make API calls, use these constants to make sure that you identify the exchange correctly.
Available Exchange Constants
Spot Exchanges
Python
1chd.exchanges.BINANCE_SPOT
2chd.exchanges.BYBIT_SPOT
3chd.exchanges.KRAKEN_SPOT
4chd.exchanges.OKX_SPOT
5chd.exchanges.BITGET_SPOT
6chd.exchanges.HYPERLIQUID_SPOTFutures/Derivatives Exchanges
Python
1chd.exchanges.BINANCE_FUTURES
2chd.exchanges.BYBIT_FUTURES
3chd.exchanges.KRAKEN_FUTURES
4chd.exchanges.OKX_FUTURES
5chd.exchanges.BITGET_FUTURES
6chd.exchanges.HYPERLIQUID_FUTURES
7chd.exchanges.LIGHTER
8chd.exchanges.ASTER_FUTURES
9chd.exchanges.BITMEXExample
Python
1import cryptohftdata as chd
2
3# Use exchange constants instead of strings
4df = client.get_trades(
5 symbol="BTCUSDT",
6 exchange=chd.exchanges.BINANCE_SPOT, # ✅ Recommended
7 start_date="2025-08-01",
8 end_date="2025-08-01"
9)
10
11# Avoid using strings directly
12df = client.get_trades(
13 symbol="BTCUSDT",
14 exchange="binance_spot", # ❌ Not recommended
15 start_date="2025-08-01",
16 end_date="2025-08-01"
17)
18Important Notes
- Use these exact exchange identifiers. They are case-sensitive.
- Some exchanges do not have all data types.
- Mark price, open interest, and liquidations are available only on futures/derivatives exchanges.
- Before you send requests, make sure that data is available for the trading pairs that you need.
chd.exchanges.BITMEXhas only historical data. BitMEX closed in September 2026. Its files end on 2026-09-22.