Modify TP/SL Order
- POST
/capi/v2/order/modifyTpSlOrder
Weight(IP): 2, Weight(UID): 5
Request parameters
| Parameter | Type | Required? | Description |
|---|---|---|---|
| orderId | Long | Yes | Order ID of the TP/SL order to modify |
| triggerPrice | String | Yes | New trigger price |
| executePrice | String | No | New execution price. If not provided or set to 0, market price will be used. Value > 0 means limit price |
| triggerPriceType | Integer | No | Trigger 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
| Parameter | Type | Description |
|---|---|---|
| code | String | Response code, "00000" indicates success |
| msg | String | Response message |
| requestTime | Long | return time Unix millisecond timestamp |
| data | Object | Response data (null for this endpoint) |
Response example
{
"code": "00000",
"msg": "success",
"requestTime": 1765956639711,
"data": ""
}