Skip to main content

Amend Order

Normal account covers: Spot / USDT perpetual / Inverse contract

important

You can only modify unfilled or partially filled orders.

HTTP Request

POST /cloud/trade/v3/order/amend

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type
  • Normal account: spot,linear, inverse. Please note that category is not involved with business logic
symboltruestringSymbol name
orderIdfalsestringOrder ID. Either orderId or orderLinkId is required
orderLinkIdfalsestringUser customised order ID. Either orderId or orderLinkId is required
orderIvfalsestringImplied volatility.
triggerPricefalsestring
  • For futures, it is the conditional order trigger price. If you expect the price to rise to trigger your conditional order, make sure:
    triggerPrice > market price
    Else, triggerPrice < market price
  • For spot, it is the TP/SL trigger price
qtyfalsestringOrder quantity after modification. Do not pass it if not modify the qty
pricefalsestringOrder price after modification. Do not pass it if not modify the price
tpslModefalsestringTP/SL mode
  • Full: entire position for TP/SL. Then, tpOrderType or slOrderType must be Market
  • Partial: partial position tp/sl. Limit TP/SL order are supported. Note: When create limit tp/sl, tpslMode is required and it must be Partial
Valid for linear & inverse
takeProfitfalsestringTake profit price after modification. If pass "0", it means cancel the existing take profit of the order. Do not pass it if you do not want to modify the take profit
stopLossfalsestringStop loss price after modification. If pass "0", it means cancel the existing stop loss of the order. Do not pass it if you do not want to modify the stop loss
tpTriggerByfalsestringThe price type to trigger take profit. When set a take profit, this param is required if no initial value for the order
slTriggerByfalsestringThe price type to trigger stop loss. When set a take profit, this param is required if no initial value for the order
triggerByfalsestringTrigger price type.
Only valid for linear and inverse
tpLimitPricefalsestringLimit order price when take profit is triggered. Only working when original order sets partial limit tp/sl
slLimitPricefalsestringLimit order price when stop loss is triggered. Only working when original order sets partial limit tp/sl

Response Parameters

ParameterTypeComments
orderIdstringOrder ID
orderLinkIdstringUser customised order ID

Request Example

POST /cloud/trade/v3/order/amend HTTP/1.1
Host: openapi-testnet.zoomex.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672217108106
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"category": "linear",
"symbol": "ETHUSDT",
"orderLinkId": "linear-004",
"triggerPrice": "1145",
"qty": "0.15",
"price": "1050",
"takeProfit": "0",
"stopLoss": "0"
}

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"orderId": "c6f055d9-7f21-4079-913d-e6523a9cfffa",
"orderLinkId": "linear-004"
},
"retExtInfo": {},
"time": 1672217093461
}