ccxt / ccxt

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
https://docs.ccxt.com
MIT License
32.44k stars 7.46k forks source link

BINANCE: COIN- M Futures. How to place orders and pull data in these markets and not USDT-M futures. #7995

Closed Kalelv45 closed 3 years ago

Kalelv45 commented 3 years ago

I don't understand how to pull data and place orders on the Coin-M futures on Binance. When I reference the tickers, I can just get the USDT-M futures. Does anyone know how to reference those markets? when I load the market tickers, I can't seem to find these COIN-M contracts.

kroitor commented 3 years ago

You have to set the options['defaultType'] to delivery prior to (re)loading the markets for COIN-M contracts:

import ccxt
exchange = ccxt.binance({
    'enableRateLimit': True,
    'options': {
        'defaultType': 'delivery',
    },
})

markets = exchange.load_markets()
# ...

Let us know if that does not answer your question.