POST
Place Order
Create a new limit order (Good Till Cancelled) on a market. The order will be automatically matched against existing orders in the book if a compatible price exists.
Endpoint
POST /api/v1/orderRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| marketId | string | Yes | The ID of the market |
| side | "BUY" | "SELL" | Yes | Order side |
| outcome | "YES" | "NO" | Yes | Which outcome to trade |
| price | number | Yes | Price in cents (1–99) |
| quantity | number | Yes | Number of shares |
Note: For BUY orders, your wallet must have sufficient unlocked cash (quantity × price). For SELL orders, you must hold enough unlocked shares of the specified outcome.
Response
Returns the created order object (status 201). The order may already be partially or fully filled by the time it's returned.
{
"id": "clxyz...",
"marketId": "clxyz...",
"walletId": "clxyz...",
"side": "BUY",
"outcome": "YES",
"type": "LIMIT",
"quantity": 10,
"filledQuantity": 0,
"price": 65,
"status": "OPEN",
"timeInForce": "GTC",
"createdAt": "2026-03-17T14:30:00.000Z",
"updatedAt": "2026-03-17T14:30:00.000Z",
"expiresAt": null,
"canceledAt": null
}Error Responses
400— Insufficient funds (BUY) or insufficient holdings (SELL)400— Market is not active or has been resolved400— Invalid request (missing or invalid fields)
Example
import requests
API_KEY = "your_api_key"
BASE_URL = "https://www.vancouverpx.ca/api/v1"
def place_order(
market_id: str,
side: str,
outcome: str,
price: int,
quantity: int,
) -> dict:
response = requests.post(
f"{BASE_URL}/order",
json={
"marketId": market_id,
"side": side,
"outcome": outcome,
"price": price,
"quantity": quantity,
},
headers={"Authorization": f"Bearer {API_KEY}"},
)
response.raise_for_status()
return response.json()
# Buy 10 YES shares at 65¢ each
order = place_order(
market_id="your-market-uuid",
side="BUY",
outcome="YES",
price=65,
quantity=10,
)
print(f"Order {order['id']} status: {order['status']}")