I want to get a list of all the coins available for futures trading for Binance. Originally I found a website and just put the coins in an array, but then I came accross this function:
exchange_info = client.get_exchange_info()
So one element in this array looks like this:
{
'symbol': 'ETHBTC',
'status': 'TRADING',
'baseAsset': 'ETH',
'baseAssetPrecision': 8,
'quoteAsset': 'BTC',
'quotePrecision': 8,
'quoteAssetPrecision': 8,
'baseCommissionPrecision': 8,
'quoteCommissionPrecision': 8,
'orderTypes': ['LIMIT', 'LIMIT_MAKER', 'MARKET', 'STOP_LOSS_LIMIT', 'TAKE_PROFIT_LIMIT'],
'icebergAllowed': True,
'ocoAllowed': True,
'quoteOrderQtyMarketAllowed': True,
'isSpotTradingAllowed': True,
'isMarginTradingAllowed': True,
'filters': [{
'filterType': 'PRICE_FILTER',
'minPrice': '0.00000100',
'maxPrice': '922327.00000000',
'tickSize': '0.00000100'
}, {
'filterType': 'PERCENT_PRICE',
'multiplierUp': '5',
'multiplierDown': '0.2',
'avgPriceMins': 5
}, {
'filterType': 'LOT_SIZE',
'minQty': '0.00010000',
'maxQty': '100000.00000000',
'stepSize': '0.00010000'
}, {
'filterType': 'MIN_NOTIONAL',
'minNotional': '0.00010000',
'applyToMarket': True,
'avgPriceMins': 5
}, {
'filterType': 'ICEBERG_PARTS',
'limit': 10
}, {
'filterType': 'MARKET_LOT_SIZE',
'minQty': '0.00000000',
'maxQty': '913.13969153',
'stepSize': '0.00000000'
}, {
'filterType': 'MAX_NUM_ORDERS',
'maxNumOrders': 200
}, {
'filterType': 'MAX_NUM_ALGO_ORDERS',
'maxNumAlgoOrders': 5
}],
'permissions': ['SPOT', 'MARGIN']
}
And I thought well, surely the permissions will tell me whether its a FUTURES coin or not. But looping through the all 1885 coins the vales in permissions are either SPOT, MARGIN, LEVERAGED. And when I filter for each of these, not all of the coins listed are available in Binance Futures.
LEVERAGED would have been my best bet, but this only returns 40 coinpairs - where are a lot more than that available in Binance Futures. What is the criteria to search for here?
Is there a dynamic way to get this information?
You can find a list of all the coins available for futures trading for Binance by using api below:
futures_exchange_info = client.futures_exchange_info() # request info on all futures symbols
trading_pairs = [info['symbol'] for info in futures_exchange_info['symbols']]