Regarding the future of VPX — Read our announcement →
vancouverpx
← Back to Markets

API Documentation

One API for markets, your account and trading, for scripts, AI agents and VPX Bots

DELETE

Cancel orders

/api/v1/orders · needs an API key

Cancel the orders you name, a market's, or all of them.

Say which in the body: {"ids": [...]} cancels those orders, {"marketId": "..."} every open order you have in that market, and {"all": true} every open order you have. A body that says none of these is refused, so a request that loses its body on the way never cancels everything. The answer lists what was cancelled.

A market's orders, or all of them, include the ones your VPX bots placed in your account, so a script that should only clean up after itself names its ids. A VPX bot only ever cancels its own.

Parameters

NameInTypeDescription
idsbodystring[]These orders (at most 5,000; an empty list cancels nothing)
marketIdbodystringEvery open order you have in this market (its id or slug)
allbodytrueEvery open order you have

Request

curl -X DELETE "https://www.vancouverpx.ca/api/v1/orders" \
  -H "Authorization: Bearer $VPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":["9b2e5c1d-0f47-4d1e-8a55-6c2b7e3f9a10"]}'

Response

200 with this object:

FieldTypeDescription
cancelledstring[]The ids of the orders cancelled
Example
{
  "cancelled": [
    "9b2e5c1d-0f47-4d1e-8a55-6c2b7e3f9a10"
  ]
}

Errors

MARKET_NOT_FOUND, and the errors every endpoint can answer.

Cancel orders | VPX API Docs