Skip to main content

Amend Order

Description​

Modify order

  • Unfilled (NEW) and partially filled (PARTIALLYFILLED). Both spot and futures support modifying limit orders that are currently resting. After partial execution, the remaining order's price and quantity can be modified. The qty provided is the total order quantity, including already executed portions. Orders that have fully executed, been canceled, partially executed and then canceled, rejected, or expired cannot be modified.
  • Spot (spot). When modifying the total quantity of a partially executed order, qty must not be less than the cumulative amount already executed. For active orders, the take-profit and stop-loss can be adjusted. Orders not triggered (UNTRIGGERED) can be modified, except for OCO orders.
  • Futures (linear). When modifying the total quantity of a partially filled order, qty must be greater than the cumulative executed quantity. After partial execution, the order supports modifications to both price and quantity. However, the take-profit price (takeProfit) and stop-loss price (stopLoss) attached to the order cannot be modified through this order update. Take-profit orders that have not triggered (UNTRIGGERED) can be modified, except for margin-closure orders based on margin rate.
  • Processing orders. Market orders and IOC, FOK, and other immediate execution orders do not support order modification.

HTTP Request​

  • POST /api/v3/order/amend
  • Supported Products: spot / linear
  • Rate Limit: 10 requests per second per UID

Request Parameters​

FieldTypeRequiredDescription
categorystringYesProduct type
symbolstringYesTrading pair
orderIdstringNosystem order ID (either with or without orderLinkId)
orderLinkIdstringNoCustom order ID (either with orderId)
qtystringNoupdated quantity
pricestringNoupdated price
triggerPricestringNomodified trigger price
triggerBystringNoTrigger price type
takeProfitstringNoTake-profit trigger price.
stopLossstringNoStop-loss trigger price.
tpTriggerBystringNoTake-profit trigger price type
slTriggerBystringNoStop-loss trigger price type

Response Parameters​

FieldTypeDescription
orderIdstringSystem order ID
orderLinkIdstringCustom Order ID

Request Example​

POST /api/v3/order/amend HTTP/1.1
Host: openapi.lbank.com
Content-Type: application/json
ex-api-key: <your_api_key>
ex-timestamp: <current_unix_timestamp_ns>
ex-nonce: <unique_random_hex>
ex-signature: <your_signature>
ex-client-type: API

{
"category": "linear",
"symbol": "BTCUSDT",
"orderId": "<existing_order_id>",
"qty": "0.002",
"price": "59000"
}

Response Example​

HTTP/1.1 200 OK
Content-Type: application/json

{
"code": 200,
"message": "Success",
"data": {
"orderId": "<existing_order_id>",
"orderLinkId": "b320fe1a-478c-4d2e-a219-000000000002"
},
"extras": null
}