Skip to main content

Cancel Order

Description​

cancel order

  • limit order that is unfilled or partially filled(NEW, PARTIALLYFILLED. Some query interfaces return PARTIALLY_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​

FieldTypeRequiredDescription
categorystringYesProduct type
symbolstringYesTrading pair
orderIdstringNosystem order ID (either with or without orderLinkId)
orderLinkIdstringNoCustom order ID (either with orderId)
orderFilterstringNoOrder (general)/ tpslOrder (spot take-profit and stop-loss)/ StopOrder (futures conditional orders), default Order

Response Parameters​

FieldTypeDescription
orderIdstringOrder ID of the canceled order
orderLinkIdstringCustom 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
}