无法创建卖出订单:Python CCXT Binance没有市场符号USDT/BTC

发布于 2025-01-27 20:58:09 字数 885 浏览 4 评论 0原文

我正在使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久随 2025-02-03 20:58:09

只需将替换为“ 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 BTC
and "USDT/BTC" means the amount of BTC per 1 USDT

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文