Cancel Order
Cancel Order
Descriptionâ
The ACK response only indicates that the request has been successfully accepted. Please use the WebSocket order push channel to confirm the actual order status.
This endpoint supports Reality stock trading pairs (rtoken, e.g.,
rAAPLUSDT). Reality orders are subject to a separate rate limit: default5/sec/UID, or30/sec/UIDfor whitelisted users.
This endpoint allows you to cancel a single unfilled or partially filled order across spot, margin, and futures markets.
Note: If an unexpected error occurs when canceling an order, please use clientOid or orderId to query the order details to confirm the final result of the operation.
- Order Identification: Orders can be identified by either
orderIdorclientOid. When both are provided,orderIdtakes priority. - Error Sample
{ "code":"40725", "msg":"service return an error", "requestTime":1627293504612 }
Canceling an order may fail if the order has already been fully filled, has already been canceled, or the provided
orderId/clientOidis invalid.
HTTP Requestâ
- POST /api/v3/trade/cancel-order
- Rate limit: 10/sec/UID
- Permission: UTA trade (read & write)
curl -X POST "https://api.bitget.com/api/v3/trade/cancel-order" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json" \
-d '{"orderId":"111111111111111111","category":"SPOT"}'
Request Parametersâ
| Parameter | Type | Required | Comments |
|---|---|---|---|
| orderId | String | No | Order ID Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority |
| clientOid | String | No | Client order ID Must match the regular expression ^[\.A-Z\:/a-z0-9_-]{1,32}$, i.e. 1 to 32 characters, consisting of periods (.), uppercase and lowercase letters, colons (:), forward slashes (/), digits, underscores (_), and hyphens (-)Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority |
| category | String | Yes | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
{
"code": "00000",
"msg": "success",
"requestTime": 1695806875837,
"data": {
"clientOid": "121211212122",
"orderId": "111111111111111111"
}
}
Response Parametersâ
| Parameter | Type | Comments |
|---|---|---|
| orderId | String | Order ID |
| clientOid | String | Client order ID |