Trading

Cancel an order

POST
/execution/orders/cancel

Authorization

appIdbearerAuth
headerx-app-id<token>

Your application ID. Required on app-tier and user-tier routes. Omitted on routes that authenticate with x-app-api-key only.

headerAuthorizationBearer <JWT>

JWT access token from POST /auth/verify. Required with x-app-id on user routes. On the smart-route quote it is optional and turns a preview into an executable quote.

Request Body

application/json
  1. body
orderId*string
Length1 <= length
cancelSignature?|

Response Body

200

application/json
  1. response
quoteId*string

Quote whose orders were cancelled. null for limit orders and for orders placed directly on the venue.

orderIds*array<string>

Ids of the affected orders. Can be empty for a venue order sufwan-local-test did not know.

status*string

cancelled: done. cancel_pending: the venue has not confirmed yet; the order moves to cancelled (or fills) later.

Value in"cancelled""cancel_pending"
Example Request
curl -X POST 'https://api.t.sufwankhalid.com/execution/orders/cancel' \  -H 'Content-Type: application/json' \  -d '{  "orderId": "cmf3r1a2b00c4mw0lq8y7e3uj"}'
Example Response
{  "quoteId": null,  "orderIds": [    "cmf3r1a2b00c4mw0lq8y7e3uj"  ],  "status": "cancelled"}