跳到主要内容

修改止盈止损

请求类型: POST 描述: /future/trade/v1/entrust/update-profit-stop


限流规则

200/s/apikey


参数说明

名称类型必填默认值描述范围
profitIdintegerTRUEN/A止盈止损订单ID
triggerProfitPricenumberFALSEN/A止盈触发价格
triggerStopPricenumberFALSEN/A止损触发价格

请求示例

curl -X POST "https://fapi.xt.com/future/trade/v1/entrust/update-profit-stop" \
-H "validate-appkey: $APPKEY" # 必须
-H "validate-timestamp: $TIMESTAMP" # 必须
-H "validate-signature: $SIGNATURE" # 必须
-H "Content-Type: application/x-www-form-urlencoded" # 必须
-d "profitId=1234567890" # 必须
-d "triggerProfitPrice=200" \
-d "triggerStopPrice=100"

响应示例

{
"error": {
"code": "",
"msg": ""
},
"msgInfo": "",
"result": {},
"returnCode": 0
}

错误码

错误码描述
invalid_entrustProfit ID 不存在
user_can_not_trade账户禁止交易
sub_account_not_trade子账户不可交易
user_can_not_open_position账户禁止开仓
invalid_order_type无效订单类型
invalid_trigger_profit_price止盈价格不合法
invalid_trigger_stop_price止损价格不合法
invalid_origQty下单数量不合法
invalid_quantity_scale下单数量必须为整数
invalid_time_in_force时间设置不合法
trigger_profit_price_less_than_entry_price止盈价格必须高于开仓价(多)
trigger_profit_price_less_than_mark_price止盈价格必须高于当前标记价(多)
trigger_profit_price_less_than_index_price止盈价格必须高于当前指数价(多)
trigger_profit_price_more_than_entry_price止盈价格必须低于开仓价(空)
trigger_profit_price_more_than_mark_price止盈价格必须低于当前标记价(空)
trigger_profit_price_more_than_index_price止盈价格必须低于当前指数价(空)
trigger_stop_price_less_than_entry_price止损价格必须高于开仓价(空)
trigger_stop_price_less_than_mark_price止损价格必须高于当前标记价(空)
trigger_stop_price_less_than_index_price止损价格必须高于当前指数价(空)
trigger_stop_price_more_than_entry_price止损价格必须低于开仓价(多)
trigger_stop_price_more_than_mark_price止损价格必须低于当前标记价(多)
trigger_stop_price_more_than_index_price止损价格必须低于当前指数价(多)