Skip to content

Modify Order

Rate Limit: 10 req/sec/uid

Description

Interface for order modification, used to modify an pending order, such as its TP/SL and/or price/qty.Attention!!Successful interface response is not necessarily equal to the success of the operation, please use the websocket push message as an accurate judgment of the success of the operation.

HTTP Request

  • POST /api/v1/futures/trade/modify_order

Request Parameters

ParameterTypeRequiredDescription
orderIdstringfalseOrder ID
Either orderId or clientId is required. If both are entered, orderId prevails.
clientIdstringfalseCustomize order ID
Either orderId or clientId is required. If both are entered, orderId prevails.
qtystringtrueAmount (base coin)
pricestringtruePrice of the order.
Required if the order type is LIMIT
tpPricestringfalsetake profit trigger price
tpStopTypestringfalsetake profit trigger type
MARK_PRICE
LAST_PRICE
tpOrderTypestringfalsetake profit trigger place order type
LIMIT
MARKET
tpOrderPricestringfalsetake profit trigger place order price
LIMIT
MARKET
required if tpOrderType is LIMIT
slPricestringfalsestop loss trigger price
slStopTypestringfalsestop loss trigger type
MARK_PRICE
LAST_PRICE
slOrderTypestringfalsestop loss trigger place order type
LIMIT
MARKET
slOrderPricestringfalsestop loss trigger place order price
LIMIT
MARKET
required if slOrderType is LIMIT

Request Example

bash
curl -X 'POST'  --location 'https://fapi.bitunix.com/api/v1/futures/trade/modify_order' \
   -H "api-key:*******" \
   -H "sign:*" \
   -H "time:1659076670000" \
   -H "language:en-US" \
   -H "Content-Type: application/json" \
 --data '{"orderId":"1111","symbol":"BTCUSDT","price":"60000","qty":"0.5","tpPrice":"61000","tpStopType":"MARK","tpOrderType":"LIMIT","tpOrderPrice":"61000.1"}'

Response Parameters

ParameterTypeDescription
orderIdstringorder id
clientIdstringclient id

Response Example

json
{"code":0,"data":{"orderId":"11111","clientId":"22222"},"msg":"Success"}