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

API Documentation

REST API reference for the Vancouver Prediction Exchange

Overview

The VPX REST API allows you to programmatically interact with the Vancouver Prediction Exchange. You can retrieve market data, place and cancel orders, and view recent trades. New to the API? Start by building a trading bot.

Base URL

https://www.vancouverpx.ca/api/v1

Authentication

All endpoints require an API key passed via the Authorization header using the Bearer scheme. You can generate an API key from your Developer Settings page.

Authorization: Bearer your_api_key_here

Endpoints

Use with AI agents (MCP)

Every endpoint is also a tool on the VPX MCP server, so coding agents like Claude Code can read markets and trade with your API key:

claude mcp add --transport http vpx https://www.vancouverpx.ca/api/mcp --header "Authorization: Bearer YOUR_API_KEY"

Error Handling

All errors return a JSON object with an error field describing what went wrong. Validation errors also include a details field with specific field-level errors.

{
  "error": "Insufficient funds"
}
StatusMeaning
200Success
201Created (order placed, market returned)
400Bad request (validation error, insufficient funds, market not open)
401Unauthorized (missing, invalid, or revoked API key)
404Not found
500Internal server error
API Overview | VPX Docs