我将 ccxt 用于 Bybit。
我可以通过以下代码订购 BTCUSD(Futures Perp)。
import ccxt
bybit = ccxt.bybit({
"apiKey":"my api",
"secret":"my secret"
})
symbol = 'BTC/USD'
order_type = 'limit'
side = 'buy'
amount = 1
price = 10000
order = bybit.create_order(symbol, order_type, side, amount, price, {
'qty': amount
})
但是↓这段代码返回“ret_msg”:“无效符号”。
symbol = 'BTCUSDU21'
order_type = 'limit'
side = 'sell'
amount = 1
price = 50000
order = bybit.create_order(symbol, order_type, side, amount, price, {
'qty': amount
})
我要在BTCUSDU21(反向期货)下单☹</p>