Cancel Order
Description
cancel order
- limit order that is unfilled or partially filled(
NEW,PARTIALLYFILLED. Some query interfaces returnPARTIALLY_FILLED) indicates the remaining quantity of cancellable unfilled orders. Applies to orders still in resting/open status. - Conditions or take-profit/stop-loss orders not triggered(
UNTRIGGERED) can be canceled before triggering - Triggered conditional orders(
TRIGGERED) After converting to an active limit order, if the order can still be placed and has unfilled quantity, it can be canceled as a market limit order.
HTTP Request
- POST
/api/v3/order/cancel - 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) |
orderFilter | string | No | Order (general)/ tpslOrder (spot take-profit and stop-loss)/ StopOrder (futures conditional orders), default Order |
Response Parameters
| Field | Type | Description |
|---|---|---|
orderId | string | Order ID of the canceled order |
orderLinkId | string | Custom Order ID |
Request Example
POST /api/v3/order/cancel 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_1>",
"orderFilter": "Order"
}
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"code": 200,
"message": "Success",
"data": {
"orderId": "<existing_order_id_1>",
"orderLinkId": "b320fe1a-478c-4d2e-a219-000000000003"
},
"extras": null
}