Downloads

Machine-readable specs + Postman collection. Codegen your own SDK, or import into any HTTP tool.

OpenAPI 3.1 (REST)

Complete REST specification — 38 paths / 42 operations + 6 public verifier endpoints across 14 tag groups: Discovery, Builders, Apps, Attribution, Revenue, Connect, Subaccounts, Composer, Liquidity, Data, Webhooks, Marketplace, Oracle, Sandbox. Codegen with openapi-generator (50+ target languages).

FormatFileSizeUse
YAML openapi.yaml 16 KB Human-readable, easy diff
JSON openapi.json 27 KB Redoc / Swagger UI / codegen tools
# Codegen Python client
openapi-generator generate -i https://docs.predictasiax.com/downloads/openapi.json -g python -o pax-python-client

# Codegen TypeScript axios client
openapi-generator generate -i https://docs.predictasiax.com/downloads/openapi.json -g typescript-axios -o pax-ts-client

# Codegen Go client
openapi-generator generate -i https://docs.predictasiax.com/downloads/openapi.json -g go -o pax-go-client

AsyncAPI 2.6 (WebSocket)

Complete WebSocket specification — 48 event types (5 meta, 9 market data, 4 fast round, 6 signals/AI, 12 account private, 6 security, 8 ops public, 3 admin) + 4 client methods (SUBSCRIBE / UNSUBSCRIBE / AUTH / LOCALE).

FormatFileSizeUse
YAML asyncapi.yaml 24 KB Human-readable, easy diff
JSON asyncapi.json 34 KB AsyncAPI Studio, codegen tools
# Codegen Node.js WebSocket client from AsyncAPI
npm i -g @asyncapi/generator
ag https://docs.predictasiax.com/downloads/asyncapi.json @asyncapi/nodejs-ws-template -o pax-ws-client

Postman Collection

PredictAsiaX is published on Postman as a Public Workspace. Fork it into your own Postman workspace and it stays in sync as we bump the spec:

Direct downloads (mirror for airgapped / audit review):

FilePurposeSize
postman.json Collection — all 36 REST paths + example bodies 220 KB
pax-sandbox.postman_environment.json Sandbox environment — baseUrl, apiKey, HMAC secrets <1 KB
pax-production.postman_environment.json Production environment — same structure, prod URLs <1 KB

Import into Postman

  1. Open Postman → Import (top-left).
  2. Drag all 3 files (collection + 2 environments), or paste the URLs:
    https://docs.predictasiax.com/downloads/postman.json
    https://docs.predictasiax.com/downloads/pax-sandbox.postman_environment.json
    https://docs.predictasiax.com/downloads/pax-production.postman_environment.json
  3. Top-right environment selector → pick PAX Sandbox.
  4. Environment tab → fill in apiKey = your sk_live_* sandbox key (from POST /v1/sandbox-keys, tier=self_serve). Save.
  5. Open any request → hit Send. Done.
Postman → cURL: After configuring a request in Postman, click the Code button (top-right of request panel) to copy the equivalent cURL, Python, Node, or Go snippet.

MCP Server

PredictAsiaX is published in the official MCP Registry as com.predictasiax/mcp v2.0.0. AI-agent apps (Claude Desktop, Cursor, Windsurf, custom agents) can discover the server via the MCP client registry search and connect directly:

FieldValue
Registry namecom.predictasiax/mcp
Server URLhttps://mcp.predictasiax.com
TransportSSE + Streamable HTTP
AuthBearer sk_live_* (self-serve mint at POST /v1/sandbox-keys)
Tools (7)market_search, probability_movers, resolution_evidence, portfolio_read, place_order, cancel_order, sandbox_agent_examples

SDKs

Native SDKs are available. Both wrap the canonical api.predictasiax.com/v1 surface with typed responses, isomorphic HMAC signing, auto-Idempotency-Key generation on writes, and safe defaults (HTTPS-only, streamed response cap, CRLF-header guard, response body size cap 10 MB).

LanguagePackageVersionInstall
Python pax-api 2.4.0 LIVE pip install pax-api
TypeScript / JavaScript @predictasiax/api 2.4.0 LIVE npm i @predictasiax/api
Govia OpenAPI codegenoapi-codegen -package pax https://docs.predictasiax.com/downloads/openapi.yaml
Rustvia OpenAPI codegenopenapi-generator generate -g rust -i https://docs.predictasiax.com/downloads/openapi.json
50+ other languagesvia OpenAPI codegenopenapi-generator generate -g <lang> -i https://docs.predictasiax.com/downloads/openapi.json

TypeScript quickstart

# npm i @predictasiax/api    (v2.0.0+ from npm)
import { PaxClient } from '@predictasiax/api';

// 1. Mint an anonymous sandbox key (30 sec, no email, tier=self_serve)
const boot = new PaxClient({ apiKey: 'anonymous' });
const key = await boot.sandboxKeys.mint({ orgName: 'my-app' });
console.log('Save once:', key.api_key);   // sk_live_...

// 2. Use the key
const pax = new PaxClient({ apiKey: key.api_key });

// Auto-pagination across markets
for await (const market of pax.markets.list({ category: 'crypto' })) {
  console.log(market.id, market.title);
}

// Place order — auto Idempotency-Key generated + reused across retries
const { data, response, requestId } = await pax.orders.place({
  marketId: 'm_btc_150k_2026',
  outcomeId: 'yes',
  side: 'buy',
  orderType: 'limit',
  size: '10',
  price: '0.55',
}).withResponse();
console.log('Order:', data.id, 'Request:', requestId,
            'RateLimit-Remaining:', response.headers.get('x-ratelimit-remaining'));

// WebSocket streaming (multiplexed, sequence# gap detection built-in)
import { PaxWSClient } from '@predictasiax/api';
const ws = new PaxWSClient({
  apiKey: key.api_key,
  subscribeOnConnect: ['fast_tick', 'account'],
});
ws.on('fast_tick', (e) => console.log(e));
await ws.connect();

Python quickstart

# pip install pax-api    (v2.0.0+ from PyPI)
import os
from pax_api import PaxClient

# 1. Mint an anonymous sandbox key (30 sec, no email, tier=self_serve)
boot = PaxClient(api_key="anonymous")
key = boot.mint_sandbox_key(org_name="my-app")
print("Save once:", key["api_key"])   # sk_live_...

# 2. Use the key
pax = PaxClient(api_key=key["api_key"])

markets = pax.list_markets(category="crypto", limit=5)
for m in markets["data"]["markets"]:
    print(m["id"], m["prices"]["yes"])

# 3. Trade (capped at $10/order + $100/day on self_serve tier)
order = pax.place_order(
    market_id="m_btc_150k_2026",
    outcome_id="yes",
    side="buy",
    order_type="limit",
    size="10",
    price="0.55",
)
print(order["data"]["order"]["order_id"])

# WebSocket streaming (multiplexed subscriptions, sequence# gap detection)
from pax_api import PaxWSClient
ws = PaxWSClient(api_key=key["api_key"])
ws.on("fast_tick", lambda evt: print("tick:", evt))
ws.subscribe(["fast_tick", "orderbook", "account"])
ws.run_forever()

Direct downloads (mirror for airgapped / audit review): pax_api-2.4.0-py3-none-any.whl · pax_api-2.4.0.tar.gz.

Mock server (Prism)

Spin up a local mock server against the OpenAPI spec for offline development:

npm i -g @stoplight/prism-cli
prism mock https://docs.predictasiax.com/downloads/openapi.json
# → mock server on http://localhost:4010

Prism generates fake responses per the OpenAPI examples — great for CI or client development before sandbox access is provisioned.