Discover Symbols
Use the list_symbols helper of the SDK to find all combinations of exchange and dataset that we keep. You can also find historical symbols after an exchange removes them from its list, if the dataset contains files for them. The helper sends a cached /symbols API request. It returns a sorted Python list. Use this list to examine the coverage before you start a download job.
List the Coverage of an Exchange
For a fast result, call chd.list_symbols. If you already have a configured CryptoHFTDataClient instance, use the client method. We cache the response at the edge for 24 hours. Thus, the symbol list comes back fast, also when an exchange has thousands of markets.
1import cryptohftdata as chd
2
3client = chd.CryptoHFTDataClient(api_key="your-api-key-here")
4
5# Module-level helper (no client required)
6binance_spot_symbols = chd.list_symbols(chd.exchanges.BINANCE_SPOT)
7print(f"Binance spot pairs: {len(binance_spot_symbols)}")
8print("First five:", binance_spot_symbols[:5])
9
10# Client method with optional filtering
11futures_orderbook = client.list_symbols(
12 chd.exchanges.BINANCE_FUTURES,
13 data_type="orderbook",
14)
15print(f"Futures order book markets: {len(futures_orderbook)}")Filter by Dataset
To limit the results to one dataset, use the optional data_type argument. This argument is the same as the query parameter of the REST API. It accepts the same values. The list that follows shows these values.
Available Filters
- orderbook — snapshots of the order book depth and incremental updates
- trades — individual trade executions with the taker/maker side
- ticker — best bid/ask and rolling statistics
- mark_price — mark price, index price and funding metrics for derivatives
- open_interest — the number of open contracts and their notional values
- liquidations — forced closures of positions, with price details
Use the Results in Your Workflows
You can keep the returned list in configuration files. You can use it in a loop to schedule batch downloads. You can also compare it with the symbols that you already use for analysis. The helper always returns sorted symbols. Thus, the diffs are deterministic when you save the results to source control.