Error when creating a market order BTCUSDT
When I run: client.order_market_buy(symbol='BTCUSDT', quoteOrderQty=50) I receive this error APIError(code=-1013): Quote order qty market orders are not supported for this symbol.
How can I fix it?
You can't. That error is returned by Binance.
To find out whether a symbol can be traded with quoteOrderQty:
API users can query via api/v3/exchangeInfo. When it returns with "quoteOrderQtyMarketAllowed:False", it means that the Market Order - Total feature is suspended for the trading pair.
When I run: client.order_market_buy(symbol='BTCUSDT', quoteOrderQty=50) I receive this error APIError(code=-1013): Quote order qty market orders are not supported for this symbol.
How can I fix it?
For Futures,
client.futures_create_order( symbol='BTCUSDT', type='MARKET', side='BUY', # Direction ('BUY' / 'SELL'), string quantity=quantity # Number of coin2 you wish to buy / sell, float )
probably should change quoteOrderQty to quantity