Skip to main content

Alter Stop Limit

Type: POST

Description: /future/trade/v1/entrust/update-profit-stop


Limit Flow Rules

200/s/apikey


Parameters

NameTypeMandatoryDefaultDescriptionRanges
profitIdintegerTRUEN/AProfit and Stop order ID
triggerProfitPricenumberFALSEN/ATake-profit trigger price
triggerStopPricenumberFALSEN/AStop-loss trigger price

Request Example

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

Response Example

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

Error Codes

Error CodeDescription
invalid_entrustProfit ID does not exist
user_can_not_tradeAccount prohibited from trading
sub_account_not_tradeSub-account cannot trade
user_can_not_open_positionAccount restricted from opening positions
invalid_order_typeInvalid order type
invalid_trigger_profit_priceInvalid take-profit price
invalid_trigger_stop_priceInvalid stop-loss price
invalid_origQtyInvalid order quantity
invalid_quantity_scaleOrder quantity must be an integer
invalid_time_in_forceInvalid time-in-force setting
trigger_profit_price_less_than_entry_priceTake-profit price must be higher than entry price (long)
trigger_profit_price_less_than_mark_priceTake-profit price must be higher than current mark price (long)
trigger_profit_price_less_than_index_priceTake-profit price must be higher than current index price (long)
trigger_profit_price_more_than_entry_priceTake-profit price must be lower than entry price (short)
trigger_profit_price_more_than_mark_priceTake-profit price must be lower than current mark price (short)
trigger_profit_price_more_than_index_priceTake-profit price must be lower than current index price (short)
trigger_stop_price_less_than_entry_priceStop-loss price must be higher than entry price (short)
trigger_stop_price_less_than_mark_priceStop-loss price must be higher than current mark price (short)
trigger_stop_price_less_than_index_priceStop-loss price must be higher than current index price (short)
trigger_stop_price_more_than_entry_priceStop-loss price must be lower than entry price (long)
trigger_stop_price_more_than_mark_priceStop-loss price must be lower than current mark price (long)
trigger_stop_price_more_than_index_priceStop-loss price must be lower than current index price (long)