我正在尝试设置止损,以触发通过其余 API“平仓”火币的空头头寸。
这是目前的仓位,盈利约3.4%:
当前订单簿如下所示:
通过网络界面,我可以轻松输入 0.066065 USDT 的止损触发价,如下所示:
实际接受此订单后:
但是,通过我不管理的其余 API。
我正在使用端点:
POST /linear-swap-api/v1/swap_cross_order
问题:
要发送什么 POST 参数?
当我发送这个时:
{'contract_code': 'TRX-USDT',
'direction': 'buy',
'lever_rate': 1,
'offset': 'close',
'order_price_type': 'limit',
'sl_trigger_price': 0.066065,
'volume': '14'}
我得到一个错误:
The price is not reasonable.
当我尝试这个时:
{'contract_code': 'TRX-USDT',
'direction': 'buy',
'lever_rate': 1,
'offset': 'close',
'order_price_type': 'market',
'sl_trigger_price': 0.066065,
'volume': '14'}
我明白了
Open a position with market price is not available.contracts
为了响应最后一条错误消息,我什至尝试了这个:
{'contract_code': 'TRX-USDT',
'direction': 'sell',
'lever_rate': 1,
'offset': 'open',
'order_price_type': 'limit',
'sl_trigger_price': 0.066065,
'volume': '14'}
还得到:
The price is not reasonable.
那么……我该怎么做?