Skip to main content

Cancel Stock Order

Cancel a stock buy or sell order by order number.

important
  • This endpoint is only available for Market Maker.
  • Only non-terminal orders (queued / active) can be cancelled.
  • The cancel request is dispatched asynchronously to the router. A successful response does not mean the order has been cancelled on the venue. Please poll the Get Stock Order Detail endpoint to confirm the final status.

HTTP Request

POST/v5/rwa/stocks/order/cancel

Request Parameters

ParameterRequiredTypeComments
orderNotruestringSystem order number

Response Parameters

ParameterTypeComments
orderNostringEcho of the order number

Request Example

POST /v5/rwa/stocks/order/cancel HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1787657753833
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXX
Content-Type: application/json

{
"orderNo": "SB227696733955111526412"
}

Response Example

{
"retCode": 0,
"retMsg": "ok",
"result": {
"orderNo": "SB227696733955111526412"
},
"retExtInfo": {},
"time": 1787657753833
}