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

API Documentation

REST API reference for the Vancouver Prediction Exchange

GET

Get Markets

Retrieve all markets with their UUIDs and info. Hidden markets are excluded. Optionally filter by market status.

Endpoint

GET /api/v1/markets

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter by market status: OPEN, CLOSED, RESOLVED, or CANCELED

Response

Returns an object containing an array of market objects (status 200).

FieldTypeDescription
idUUIDMarket ID
urlstring | nullMarket URL slug
questionstringThe market question
descriptionstring | nullMarket description and resolution criteria
categorystringMarket category (e.g. SPORTS, POLITICS, OTHER)
statusstringOPEN, CLOSED, RESOLVED, or CANCELED
closesAtISO 8601When the market stops accepting orders
resolvesAtISO 8601 | nullExpected resolution date
resolvedbooleanWhether the market has been resolved
labelAstringLabel for the YES outcome
labelBstringLabel for the NO outcome
createdAtISO 8601When the market was created
updatedAtISO 8601When the market was last updated
{
  "markets": [
    {
      "id": "clxyz...",
      "url": "leafs-stanley-cup-2026",
      "question": "Will the Leafs win the Stanley Cup?",
      "description": "Resolves YES if...",
      "category": "SPORTS",
      "status": "OPEN",
      "closesAt": "2026-06-15T00:00:00.000Z",
      "resolvesAt": "2026-06-20T00:00:00.000Z",
      "resolved": false,
      "labelA": "Yes",
      "labelB": "No",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-03-17T00:00:00.000Z"
    }
  ]
}

Example

import requests

API_KEY = "your_api_key"
BASE_URL = "https://www.vancouverpx.ca/api/v1"

def get_markets(status: str | None = None) -> dict:
    params = {}
    if status:
        params["status"] = status

    response = requests.get(
        f"{BASE_URL}/markets",
        params=params,
        headers={"Authorization": f"Bearer {API_KEY}"},
    )
    response.raise_for_status()
    return response.json()

# Get all markets
data = get_markets()
for market in data["markets"]:
    print(f"{market['id']} — {market['question']} [{market['status']}]")

# Get only open markets
open_markets = get_markets(status="OPEN")
Get Markets | VPX API Docs