This is bybit API code for trading in futures.
How do I open a Market Trade with $10 and not with 'qty'.
这是用于期货交易的BYBIT API代码。我如何用10美元而不是‘数量’打开市场交易。
Eg = $10 / 0.1(Coin Price)
Eg=$10/0.1(硬币价格)
And in seassion place order instead QTY i use Eg so i simply have to add coin name in my bot and it buy $10 worth of coin what ever coins value is..
而在调味品订单中,我使用的是数量,例如,我只需在我的机器人中添加硬币名称,它就会购买价值10美元的硬币,无论硬币的价值是多少。
I am unble to fetch live price of coin from bybit apy so i can divide 10 to coin live price and store it in varrialbe.
我无法从比特APY中获取硬币的实时价格,所以我可以将10除以硬币实时价格并将其存储在varrialbe中。
response = session.place_order(
category='linear',
symbol=item + 'USDT',
orderType='market',
timeInForce='GTC',
side='Buy',
qty='10',
tradeMode=1,
buyLeverage="6",
sellLeverage="6",
)
print(response)
I am unble to fetch live coin data so i can divide 10 / live price and store it in var
我无法获取实时硬币数据,因此我可以除以10/实时价格并将其存储为VAR
So i can show car in QTY.
这样我就可以展示汽车的数量了。
更多回答
Why are you unable to fetch live coin data? The prices change by the second, so transactions are always in a quantity of coin, not in dollars.
为什么无法获取实时硬币数据?价格每秒变化,所以交易总是以硬币的数量进行,而不是以美元。
优秀答案推荐
我是一名优秀的程序员,十分优秀!