Cancel All Order
This endpoint enables to cancel all open orders.
tip
One of param baseCoin, settleCoin, symbol must be passed.
HTTP Request
POST /contract/v3/private/order/cancel-all
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| symbol | false | string | Symbol name |
| baseCoin | false | string | Cancel all open orders by base coin |
| settleCoin | false | string | Cancel all open orders by settle coin |
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| result | Object | |
| > list | array | Object |
| >> orderId | string | Order id |
| >> orderLinkId | string | User customised order id |
Request Example
POST /contract/v3/private/order/cancel-all HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1670571959925
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"settleCoin": "USDT",
"symbol": null
}
Response Example
{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"orderId": "4545cab5-0f98-45c4-b137-6c42f3b33d4a",
"orderLinkId": ""
},
{
"orderId": "66c1beaf-aadd-4b36-be37-7f80ec315422",
"orderLinkId": ""
}
]
},
"retExtInfo": {},
"time": 1670571961179
}