Skip to Content
Indexify
Trading

Cancel an active limit order

POST
/api/limit_orders.php?action=cancel

Cancel a limit order that has not yet been triggered. Only orders in ACTIVE status can be cancelled. Orders in TRIGGERED, FILLING, FILLED, FAILED, or CANCELLED status cannot be cancelled. The order is removed from both the database and Redis.

Authorization

ApiKeyAuth
headerX-API-KEY<token>

API key with the ix_ prefix. You can generate an API Key by navigating to Settings -> API Key in the web app. Pass it in the X-API-KEY header on every request.

Request Body

application/json
  1. body
order_id*string

The 16-character limit order ID to cancel

Response Body

Order cancelled successfully.

application/json
  1. response
order_id?string
status?string
Example Request
curl -X POST 'https://api.indexify.finance/api/limit_orders.php?action=cancel' \  -H 'Content-Type: application/json' \  -d '{  "order_id": "aBcDeFgHiJkLmNoP"}'
Example Response
{  "order_id": "aBcDeFgHiJkLmNoP",  "status": "CANCELLED"}