'Cannot create sell order: Python ccxt binance does not have market symbol USDT/BTC
I am using python ccxt module to create a sell order in some binance account. First I create the exchange client
import ccxt
exchange = ccxt.binance( { 'apiKey' : "<someKey>" , 'secret' : "<thaSecretKey>" } )
Then when I try to use its create_market_sell_order method to create a market sell order I get the following error:
>>> exchange.create_market_sell_order(symbol="USDT/BTC", amount="0.1")
Traceback (most recent call last):
[...]
raise BadSymbol(self.id + ' does not have market symbol ' + symbol)
ccxt.base.errors.BadSymbol: binance does not have market symbol USDT/BTC
So seems like there is no ticker for selling USDT for BTC, while it works for the BTC/USDT ticker.
How could I create a sell order to buy BTC with USD using this create_market_sell_order method? The same happens with MANA: there are no '<someCrypto>/MANA' tickers!
ccxt.base.errors.BadSymbol: binance does not have market symbol BTC/MANA
So I can neither sell MANA.
I don't want to create a buy order instead because calculating the amount I could buy with my available USDT is not straightforward.
Solution 1:[1]
Just replace "USDT/BTC" to "BTC/USDT".
"BTC/USDT" means the amount USDT per 1 BTC
and "USDT/BTC" means the amount of BTC per 1 USDT
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sergej Müller |
