Skip to content

Cancel order

Cancel an open order.

POST /v1/order/cancel · limit 5 per minute

Request

Field Type Required Value
order_id string Yes From Place order or the order book
Bash
curl --location 'https://api.indmoneyglobal.com/v1/order/cancel' \
  --header 'Authorization: YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"order_id": "90144646"}'

Response

202 Accepted

JSON
{"status": "success", "data": {"order_id": "90144646", "order_status": "CANCEL_REQUEST_ACCEPTED"}}

CANCEL_REQUEST_ACCEPTED means your cancel request has been received. If the order fills before the cancel goes through, it ends as FILLED. Check Get order until order_status is CANCELLED or FILLED.

Errors

HTTP Code When
400 invalid_payload Missing or extra fields
404 — Order not found, or not yours
409 pending_broker_confirmation The order is still being processed; wait a few seconds and try again
409 invalid_order_state The order can't be cancelled in its current state (for example, already filled or cancelled)
429 rate_limit_exceeded Over the limit; wait for Retry-After
503 order_outcome_unknown We couldn't confirm the result. Check the order before you try again
503 order_unavailable, account_unavailable Temporarily unavailable; the order wasn't cancelled. Try again after a short wait