无法创建卖出订单:Python CCXT Binance没有市场符号USDT/BTC
我正在使用Python CCXT模块在某些Binance帐户中创建卖出订单。首先,我创建Exchange Client
import ccxt
exchange = ccxt.binance( { 'apiKey' : "<someKey>" , 'secret' : "<thaSecretKey>" } )
,然后尝试使用其create_market_sell_order
方法来创建市场销售订单时,我会收到以下错误:
>>> 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
因此,似乎没有出售BTC的USDT的股票,而它可以正常工作。对于BTC/USDT股票。
我如何创建卖出订单,使用此create_market_sell_order
方法使用USD购买BTC? ' tickers!
ccxt.base.errors.BadSymbol: binance does not have market symbol BTC/MANA
所以我既不能出售法力。
我不想创建买订单,因为计算我可以使用的USDT可以购买的金额并不简单。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需将
替换为“ USDT/BTC”
<代码>“ BTC/USDT” 。“ BTC/USDT”
表示每1 btc的金额和
“ USDT/BTC”
表示BTC每1 USDT的数量Just replace
"USDT/BTC"
to"BTC/USDT"
."BTC/USDT"
means the amount USDT per 1 BTCand
"USDT/BTC"
means the amount of BTC per 1 USDT