Objects
Every object the API sends. Prices and amounts are integer cents; times are ISO 8601 in UTC. A field marked ? may be left out.
MarketStatus
"OPEN" | "CLOSED" | "RESOLVED" | "CANCELED"
Category
"SPORTS" | "FINANCE" | "POLITICS" | "CULTURE" | "OTHER"
Outcome
"YES" | "NO"
Side
"BUY" | "SELL"
OrderType
"LIMIT" | "MARKET"
OrderStatus
"OPEN" | "PARTIALLY_FILLED" | "FILLED" | "CANCELLED" | "PARTIALLY_FILLED_CANCELLED" | "EXPIRED"
ExecutionKind
trade: a buyer and a seller of the same outcome. marriage: a YES buyer and a NO buyer, whose prices add up to 100, create a new pair of shares. divorce: a YES seller and a NO seller hand a pair back for its 100.
"trade" | "marriage" | "divorce"
Level
| Field | Type | Description |
|---|---|---|
| price | integer | YES price, in cents |
| quantity | integer | Shares resting at this price |
Book
One book for both outcomes, in YES terms: buying NO at p is offering YES at 100 − p, and selling NO at p is bidding for YES at 100 − p.
Future
A private market that settles at a number rather than YES or NO. A YES at price p is a long at lower + p / multiplier points.
| Field | Type | Description |
|---|---|---|
| lower | number | The value, in points, that price 0 stands for |
| multiplier | integer | Cents per point |
| tickSize | number | Price increment, in points |
| total | integer | What a YES and a NO pay together at settlement |
| min | integer | Lowest price an order may have |
| max | integer | Highest price an order may have |
| step | integer | Price increment |
Resolution
| Field | Type | Description |
|---|---|---|
| outcome | Outcome | |
| resolvedAt | string (date-time) | When the market was resolved |
| settlementValue | number | null | FUTURE only: the settlement value, in points |
| yesPayout | integer | What each YES share paid |
| noPayout | integer | What each NO share paid |
GroupRef
| Field | Type | Description |
|---|---|---|
| id | string | The group's id |
| question | string | The group's question, e.g. "Who will win the most seats?" |
| itemTitle | string | null | This market's answer within the group, e.g. "BC NDP" |
| size | integer | How many of the group's public markets are open |
VenueLinks
The same question on Polymarket and Kalshi, as matched by VPX. VPX bots use these as fair-price sources.
| Field | Type | Description |
|---|---|---|
| polymarketSlug | string | null | |
| kalshiTicker | string | null |
Market
| Field | Type | Description |
|---|---|---|
| id | string | The market's id (a UUID) |
| slug | string | null | Its name in addresses, as in vancouverpx.ca/market/<slug>; works wherever an id does |
| link | string | The market's page on the website |
| question | string | |
| description ? | string | null | Details and resolution rules. GET /markets leaves it out unless include=description |
| category | Category | |
| status | MarketStatus | |
| closesAt | string (date-time) | null | |
| resolvesAt | string (date-time) | null | |
| resolution | Resolution | null | Once resolved: the winner and what each share paid |
| yesLabel | string | What the website calls YES (usually "Yes") |
| noLabel | string | What the website calls NO (usually "No") |
| imageUrl | string | null | |
| listed | boolean | On the website's lists. Unlisted markets trade like any other |
| private | boolean | A private market: only its members see and trade it |
| negRisk | boolean | One of its group's mutually exclusive outcomes. Their books share liquidity: an order here can also fill against the rest of the group (see implied on the order book). |
| group | GroupRef | null | |
| venues | VenueLinks | null | |
| future ? | Future | Private futures only: how its prices map to points |
| bestBid | integer | null | |
| bestAsk | integer | null | |
| lastPrice | integer | null | |
| volume | integer | Total traded, in cents: price × shares over every execution |
| createdAt | string (date-time) | When the market was created |
| updatedAt | string (date-time) | When the market last changed |
| book ? | Book | Its book of resting orders, with include=book (implied neg-risk liquidity is on GET /markets/{marketId}/book) |
OrderBook
| Field | Type | Description |
|---|---|---|
| marketId | string | |
| bids | Level[] | Bids for YES, best (highest) first |
| asks | Level[] | Offers of YES, best (lowest) first |
| implied | Book | null | Neg-risk markets only: what the rest of the group's books offer here. An order can fill against it too. Null on other markets. |
| lastPrice | integer | null | |
| time | string (date-time) | When the book was read |
Trade
One execution on a market, in YES terms.
| Field | Type | Description |
|---|---|---|
| id | string | "trade:<uuid>", "marriage:<uuid>" or "divorce:<uuid>" |
| kind | ExecutionKind | |
| marketId | string | |
| yesPrice | integer | The execution's price in YES terms |
| quantity | integer | |
| executedAt | string (date-time) | When it executed |
PricePoint
| Field | Type | Description |
|---|---|---|
| time | string (date-time) | Start of the interval |
| price | integer | The YES price the website showed |
| bid | integer | null | |
| ask | integer | null |
GroupMarket
| Field | Type | Description |
|---|---|---|
| id | string | |
| itemTitle | string | null | |
| question | string | |
| status | MarketStatus | |
| bestBid | integer | null | |
| bestAsk | integer | null | |
| lastPrice | integer | null |
Group
A question with several answers, one yes/no market per answer.
| Field | Type | Description |
|---|---|---|
| id | string | |
| slug | string | null | |
| link | string | |
| question | string | |
| description | string | null | |
| category | Category | |
| status | MarketStatus | |
| closesAt | string (date-time) | When trading stops |
| resolvesAt | string (date-time) | null | |
| listed | boolean | On the website's lists |
| negRisk | boolean | Every market in the group is neg-risk: exactly one of them resolves YES |
| markets | GroupMarket[] |
Wallet
| Field | Type | Description |
|---|---|---|
| id | string | |
| kind | "main" | "private" | main: your VPX balance. private: the play money of one private market you joined |
| marketId | string | null | The private market this wallet trades |
| balance | integer | Cash, in cents, including what open orders hold |
| locked | integer | Cash your open buy orders hold |
| available | integer | Cash you can spend now: balance − locked |
| funded | integer | Play money VPX has credited to this wallet: the starting balance plus any adjustments |
Account
| Field | Type | Description |
|---|---|---|
| userId | string | |
| username | string | null | |
| balance | integer | Main wallet cash, in cents |
| locked | integer | Main wallet cash held by open buy orders |
| available | integer | Main wallet cash you can spend now |
| wallets | Wallet[] | |
| via | object | The API key (or VPX bot) this request came from |
Fill
One of your orders trading. Cash moves by price × quantity: out on a BUY, in on a SELL. VPX charges no fees.
| Field | Type | Description |
|---|---|---|
| id | string | Unique per fill: "trade:<uuid>:buy", "trade:<uuid>:sell", "marriage:<uuid>:yes", "divorce:<uuid>:no", … |
| kind | ExecutionKind | |
| orderId | string | |
| marketId | string | |
| walletId | string | |
| side | Side | |
| outcome | Outcome | |
| price | integer | What each share traded at, in this outcome's cents |
| quantity | integer | |
| executedAt | string (date-time) | When it executed |
| botId | string | null | The VPX bot whose order this was, if any |
Order
| 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) |
OrderWithFills
| 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 |
Position
| Field | Type | Description |
|---|---|---|
| walletId | string | |
| marketId | string | |
| marketQuestion | string | |
| marketStatus | MarketStatus | |
| private | boolean | |
| outcome | Outcome | |
| quantity | integer | Shares held, including those your open sell orders hold |
| lockedQuantity | integer | Shares your open sell orders hold |
| bid | integer | null | |
| ask | integer | null | |
| lastPrice | integer | null | |
| payout | integer | null | |
| updatedAt | string (date-time) | When the position last changed |
Settlement
A resolved market you held shares in, and what it paid. VPX pays winning shares automatically.
| Field | Type | Description |
|---|---|---|
| marketId | string | |
| marketQuestion | string | |
| walletId | string | |
| outcome | Outcome | The winning outcome |
| resolvedAt | string (date-time) | When the market resolved |
| yesQuantity | integer | YES shares you held |
| noQuantity | integer | NO shares you held |
| yesPayout | integer | What each YES share paid |
| noPayout | integer | What each NO share paid |
| payout | integer | What VPX paid you: yesQuantity × yesPayout + noQuantity × noPayout |
Snapshot
| Field | Type | Description |
|---|---|---|
| date | string | The day (UTC), YYYY-MM-DD |
| cash | integer | Main wallet cash |
| holdingsValue | integer | Open positions at their last traded price |
| totalValue | integer | cash + holdingsValue |
Error
| Field | Type | Description |
|---|---|---|
| error | string | What went wrong, in plain words |
| code | string | A stable code to branch on, e.g. INSUFFICIENT_FUNDS |
| details ? | object[] | Which fields were wrong (BAD_REQUEST only) |