Regarding the future of VPX — Read our announcement →
vancouverpx
← Back to Markets

API Documentation

One API for markets, your account and trading, for scripts, AI agents and VPX Bots

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

FieldTypeDescription
priceintegerYES price, in cents
quantityintegerShares 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.

FieldTypeDescription
bidsLevel[]Bids for YES, best (highest) first
asksLevel[]Offers of YES, best (lowest) first

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.

FieldTypeDescription
lowernumberThe value, in points, that price 0 stands for
multiplierintegerCents per point
tickSizenumberPrice increment, in points
totalintegerWhat a YES and a NO pay together at settlement
minintegerLowest price an order may have
maxintegerHighest price an order may have
stepintegerPrice increment

Resolution

FieldTypeDescription
outcomeOutcome
resolvedAtstring (date-time)When the market was resolved
settlementValuenumber | nullFUTURE only: the settlement value, in points
yesPayoutintegerWhat each YES share paid
noPayoutintegerWhat each NO share paid

GroupRef

FieldTypeDescription
idstringThe group's id
questionstringThe group's question, e.g. "Who will win the most seats?"
itemTitlestring | nullThis market's answer within the group, e.g. "BC NDP"
sizeintegerHow many of the group's public markets are open

The same question on Polymarket and Kalshi, as matched by VPX. VPX bots use these as fair-price sources.

FieldTypeDescription
polymarketSlugstring | null
kalshiTickerstring | null

Market

FieldTypeDescription
idstringThe market's id (a UUID)
slugstring | nullIts name in addresses, as in vancouverpx.ca/market/<slug>; works wherever an id does
linkstringThe market's page on the website
questionstring
description ?string | nullDetails and resolution rules. GET /markets leaves it out unless include=description
categoryCategory
statusMarketStatus
closesAtstring (date-time) | null
resolvesAtstring (date-time) | null
resolutionResolution | nullOnce resolved: the winner and what each share paid
yesLabelstringWhat the website calls YES (usually "Yes")
noLabelstringWhat the website calls NO (usually "No")
imageUrlstring | null
listedbooleanOn the website's lists. Unlisted markets trade like any other
privatebooleanA private market: only its members see and trade it
negRiskbooleanOne 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).
groupGroupRef | null
venuesVenueLinks | null
future ?FuturePrivate futures only: how its prices map to points
bestBidinteger | null
bestAskinteger | null
lastPriceinteger | null
volumeintegerTotal traded, in cents: price × shares over every execution
createdAtstring (date-time)When the market was created
updatedAtstring (date-time)When the market last changed
book ?BookIts book of resting orders, with include=book (implied neg-risk liquidity is on GET /markets/{marketId}/book)

OrderBook

FieldTypeDescription
marketIdstring
bidsLevel[]Bids for YES, best (highest) first
asksLevel[]Offers of YES, best (lowest) first
impliedBook | nullNeg-risk markets only: what the rest of the group's books offer here. An order can fill against it too. Null on other markets.
lastPriceinteger | null
timestring (date-time)When the book was read

Trade

One execution on a market, in YES terms.

FieldTypeDescription
idstring"trade:<uuid>", "marriage:<uuid>" or "divorce:<uuid>"
kindExecutionKind
marketIdstring
yesPriceintegerThe execution's price in YES terms
quantityinteger
executedAtstring (date-time)When it executed

PricePoint

FieldTypeDescription
timestring (date-time)Start of the interval
priceintegerThe YES price the website showed
bidinteger | null
askinteger | null

GroupMarket

FieldTypeDescription
idstring
itemTitlestring | null
questionstring
statusMarketStatus
bestBidinteger | null
bestAskinteger | null
lastPriceinteger | null

Group

A question with several answers, one yes/no market per answer.

FieldTypeDescription
idstring
slugstring | null
linkstring
questionstring
descriptionstring | null
categoryCategory
statusMarketStatus
closesAtstring (date-time)When trading stops
resolvesAtstring (date-time) | null
listedbooleanOn the website's lists
negRiskbooleanEvery market in the group is neg-risk: exactly one of them resolves YES
marketsGroupMarket[]

Wallet

FieldTypeDescription
idstring
kind"main" | "private"main: your VPX balance. private: the play money of one private market you joined
marketIdstring | nullThe private market this wallet trades
balanceintegerCash, in cents, including what open orders hold
lockedintegerCash your open buy orders hold
availableintegerCash you can spend now: balance − locked
fundedintegerPlay money VPX has credited to this wallet: the starting balance plus any adjustments

Account

FieldTypeDescription
userIdstring
usernamestring | null
balanceintegerMain wallet cash, in cents
lockedintegerMain wallet cash held by open buy orders
availableintegerMain wallet cash you can spend now
walletsWallet[]
viaobjectThe 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.

FieldTypeDescription
idstringUnique per fill: "trade:<uuid>:buy", "trade:<uuid>:sell", "marriage:<uuid>:yes", "divorce:<uuid>:no", …
kindExecutionKind
orderIdstring
marketIdstring
walletIdstring
sideSide
outcomeOutcome
priceintegerWhat each share traded at, in this outcome's cents
quantityinteger
executedAtstring (date-time)When it executed
botIdstring | nullThe VPX bot whose order this was, if any

Order

FieldTypeDescription
idstring
marketIdstring
walletIdstring
sideSide
outcomeOutcome
typeOrderType
priceintegerLimit price, in this outcome's cents (market orders: 99 to buy, 1 to sell)
quantityinteger
filledQuantityinteger
remainingQuantityintegerShares still on the book (0 once filled or cancelled)
statusOrderStatus
createdAtstring (date-time)When it was placed
updatedAtstring (date-time)When it last changed
canceledAtstring (date-time) | null
botIdstring | nullThe VPX bot that placed it, if any
clientOrderIdstring | nullThe bot's own id for the order (VPX bots only)

OrderWithFills

FieldTypeDescription
idstring
marketIdstring
walletIdstring
sideSide
outcomeOutcome
typeOrderType
priceintegerLimit price, in this outcome's cents (market orders: 99 to buy, 1 to sell)
quantityinteger
filledQuantityinteger
remainingQuantityintegerShares still on the book (0 once filled or cancelled)
statusOrderStatus
createdAtstring (date-time)When it was placed
updatedAtstring (date-time)When it last changed
canceledAtstring (date-time) | null
botIdstring | nullThe VPX bot that placed it, if any
clientOrderIdstring | nullThe bot's own id for the order (VPX bots only)
fillsFill[]Its fills, oldest first

Position

FieldTypeDescription
walletIdstring
marketIdstring
marketQuestionstring
marketStatusMarketStatus
privateboolean
outcomeOutcome
quantityintegerShares held, including those your open sell orders hold
lockedQuantityintegerShares your open sell orders hold
bidinteger | null
askinteger | null
lastPriceinteger | null
payoutinteger | null
updatedAtstring (date-time)When the position last changed

Settlement

A resolved market you held shares in, and what it paid. VPX pays winning shares automatically.

FieldTypeDescription
marketIdstring
marketQuestionstring
walletIdstring
outcomeOutcomeThe winning outcome
resolvedAtstring (date-time)When the market resolved
yesQuantityintegerYES shares you held
noQuantityintegerNO shares you held
yesPayoutintegerWhat each YES share paid
noPayoutintegerWhat each NO share paid
payoutintegerWhat VPX paid you: yesQuantity × yesPayout + noQuantity × noPayout

Snapshot

FieldTypeDescription
datestringThe day (UTC), YYYY-MM-DD
cashintegerMain wallet cash
holdingsValueintegerOpen positions at their last traded price
totalValueintegercash + holdingsValue

Error

FieldTypeDescription
errorstringWhat went wrong, in plain words
codestringA stable code to branch on, e.g. INSUFFICIENT_FUNDS
details ?object[]Which fields were wrong (BAD_REQUEST only)
Objects | VPX API Docs