POST
Cancel Order
Cancel a single open or partially filled order. The order must belong to the authenticated user. For buy orders, locked cash is returned to the wallet. For sell orders, locked shares are unlocked.
Endpoint
POST /api/v1/cancel-orderRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| orderId | UUID | Yes | The ID of the order to cancel |
Response
Returns the canceled order object on success (status 200).
{
"id": "clxyz...",
"marketId": "clxyz...",
"walletId": "clxyz...",
"side": "BUY",
"outcome": "YES",
"price": 65,
"quantity": 10,
"filledQuantity": 3,
"status": "PARTIALLY_FILLED_CANCELLED",
"createdAt": "2026-03-17T12:00:00.000Z",
"canceledAt": "2026-03-17T14:30:00.000Z"
}Errors
| Status | Description |
|---|---|
| 400 | Invalid request body or order is not open/partially filled |
| 401 | Invalid or revoked API key |
| 403 | Order does not belong to the authenticated user |
| 404 | Order not found |
Example
import requests
API_KEY = "your_api_key"
BASE_URL = "https://www.vancouverpx.ca/api/v1"
def cancel_order(order_id: str) -> dict:
response = requests.post(
f"{BASE_URL}/cancel-order",
json={"orderId": order_id},
headers={"Authorization": f"Bearer {API_KEY}"},
)
response.raise_for_status()
return response.json()
canceled = cancel_order("your-order-uuid")
print(f"Canceled order {canceled['id']} — status: {canceled['status']}")