POST
Cancel All Orders
Cancel all of your open and partially filled orders across all markets. This is useful as a kill switch to quickly exit all positions. Locked cash and shares are released back to your wallet.
Endpoint
POST /api/v1/cancel-everythingRequest Body
No request body required. Send an empty POST request.
Response
Returns an array of all orders that were canceled (status 200). If you have no open orders, an empty array is returned.
[
{
"id": "clxyz...",
"marketId": "clxyz...",
"side": "BUY",
"outcome": "YES",
"price": 65,
"quantity": 10,
"filledQuantity": 3,
"status": "PARTIALLY_FILLED_CANCELLED"
},
{
"id": "clabc...",
"marketId": "clxyz...",
"side": "SELL",
"outcome": "NO",
"price": 40,
"quantity": 5,
"filledQuantity": 0,
"status": "CANCELLED"
}
]Example
import requests
API_KEY = "your_api_key"
BASE_URL = "https://www.vancouverpx.ca/api/v1"
def cancel_all_orders() -> list:
response = requests.post(
f"{BASE_URL}/cancel-everything",
headers={"Authorization": f"Bearer {API_KEY}"},
)
response.raise_for_status()
if not response.text:
return []
return response.json()
canceled = cancel_all_orders()
print(f"Canceled {len(canceled)} orders")