Skip to main content

Modify TP/SL Order

  • POST /capi/v2/order/modifyTpSlOrder

Weight(IP): 2, Weight(UID): 5

Request parameters

ParameterTypeRequired?Description
orderIdLongYesOrder ID of the TP/SL order to modify
triggerPriceStringYesNew trigger price
executePriceStringNoNew execution price. If not provided or set to 0, market price will be used. Value > 0 means limit price
triggerPriceTypeIntegerNoTrigger price type:
1: Last price
3: Mark price
Default is 1 (Last price)

Request example

curl -X POST "https://api-contract.weex.com/capi/v2/order/modifyTpSlOrder" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json" \
-d '{"orderId": 596471064624628269, "triggerPrice": "51000", "executePrice": "0", "triggerPriceType": 1}'

Response parameters

ParameterTypeDescription
codeStringResponse code, "00000" indicates success
msgStringResponse message
requestTimeLongreturn time
Unix millisecond timestamp
dataObjectResponse data (null for this endpoint)

Response example

{
"code": "00000",
"msg": "success",
"requestTime": 1765956639711,
"data": ""
}