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. Theqtyprovided 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,qtymust 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,qtymust 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
| Field | Type | Required | Description |
|---|---|---|---|
category | string | Yes | Product type |
symbol | string | Yes | Trading pair |
orderId | string | No | system order ID (either with or without orderLinkId) |
orderLinkId | string | No | Custom order ID (either with orderId) |
qty | string | No | updated quantity |
price | string | No | updated price |
triggerPrice | string | No | modified trigger price |
triggerBy | string | No | Trigger price type |
takeProfit | string | No | Take-profit trigger price. |
stopLoss | string | No | Stop-loss trigger price. |
tpTriggerBy | string | No | Take-profit trigger price type |
slTriggerBy | string | No | Stop-loss trigger price type |
Response Parameters
| Field | Type | Description |
|---|---|---|
orderId | string | System order ID |
orderLinkId | string | Custom 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
}