Place an order
/api/v1/orders · needs an API key
Buy or sell YES or NO shares.
A LIMIT order buys or sells at price or better, matches at once against the book, and leaves what doesn't fill resting until you cancel it. A MARKET order takes what the book offers now and cancels the rest. The answer is the order after matching, with its fills.
Buying locks price × quantity cents of available cash (a MARKET buy needs 99¢ × quantity available while it fills, and gets back what it doesn't spend); selling needs that many unlocked shares. To go short, buy NO. Buying NO at p is the same as selling YES at 100 − p, and it matches the same book; while you hold YES, it sells that YES (a market is one contract, and you never hold both sides).
If a request times out, check GET /orders before you send it again, or you may place the order twice.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| marketId * | body | string | The market's id (or its slug) |
| side * | body | "BUY" | "SELL" | |
| outcome * | body | "YES" | "NO" | |
| quantity * | body | integer | Shares |
| type | body | OrderType | LIMIT (default) or MARKET Default "LIMIT". |
| price | body | integer | LIMIT only: cents, 1–99, in outcome's terms |
Request
curl -X POST "https://www.vancouverpx.ca/api/v1/orders" \
-H "Authorization: Bearer $VPX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"marketId":"3f1c0f2e-6a55-4a8e-9b53-2a1f0c9d7e11","side":"BUY","outcome":"YES","quantity":10,"price":53}'Response
201 with this object:
| Field | Type | Description |
|---|---|---|
| id | string | |
| marketId | string | |
| walletId | string | |
| side | Side | |
| outcome | Outcome | |
| type | OrderType | |
| price | integer | Limit price, in this outcome's cents (market orders: 99 to buy, 1 to sell) |
| quantity | integer | |
| filledQuantity | integer | |
| remainingQuantity | integer | Shares still on the book (0 once filled or cancelled) |
| status | OrderStatus | |
| createdAt | string (date-time) | When it was placed |
| updatedAt | string (date-time) | When it last changed |
| canceledAt | string (date-time) | null | |
| botId | string | null | The VPX bot that placed it, if any |
| clientOrderId | string | null | The bot's own id for the order (VPX bots only) |
| fills | Fill[] | Its fills, oldest first |
{
"id": "9b2e5c1d-0f47-4d1e-8a55-6c2b7e3f9a10",
"marketId": "3f1c0f2e-6a55-4a8e-9b53-2a1f0c9d7e11",
"walletId": "clx8w2k3p0001qz8r5t1y7u4v",
"side": "BUY",
"outcome": "YES",
"type": "LIMIT",
"price": 53,
"quantity": 10,
"filledQuantity": 4,
"remainingQuantity": 6,
"status": "PARTIALLY_FILLED",
"createdAt": "2026-10-27T17:05:00.000Z",
"updatedAt": "2026-10-27T17:05:00.000Z",
"canceledAt": null,
"botId": null,
"clientOrderId": null,
"fills": [
{
"id": "trade:5d1e9c2a-7b3f-4e8d-a6c1-2f9b8e7d6c5a:buy",
"kind": "trade",
"orderId": "9b2e5c1d-0f47-4d1e-8a55-6c2b7e3f9a10",
"marketId": "3f1c0f2e-6a55-4a8e-9b53-2a1f0c9d7e11",
"walletId": "clx8w2k3p0001qz8r5t1y7u4v",
"side": "BUY",
"outcome": "YES",
"price": 53,
"quantity": 4,
"executedAt": "2026-10-27T17:05:00.000Z",
"botId": null
}
]
}Errors
MARKET_NOT_FOUND, MARKET_CLOSED, INSUFFICIENT_FUNDS, INSUFFICIENT_SHARES, BAD_PRICE, POSITION_LIMIT, and the errors every endpoint can answer.