Machine-readable specs + Postman collection. Codegen your own SDK, or import into any HTTP tool.
Public REST specification — 147 paths / 163 operations across 17 tag groups: Discovery, Builders, Apps, Attribution, Revenue, Orders, Auth, Subaccounts, Composer, Liquidity, Data, Webhooks, Marketplace, Oracle, Sandbox, Audit, Portfolio. Audit chain (/v1/audit/head, /root, /batches, /health, /anchor) is public and no-auth. Admin/team/settle endpoints exist in the runtime but are intentionally omitted from the public spec. Codegen with openapi-generator (50+ target languages).
| Format | File | Size | Use |
|---|---|---|---|
| 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
WebSocket specification — 57 event messages (Ev*) + 6 client command messages (Cmd*), 63 total in components.messages. Client commands: AUTH / SUBSCRIBE / UNSUBSCRIBE / LOCALE / RFQ_SUBSCRIBE / RFQ_UNSUBSCRIBE (the two RFQ verbs require an approved market-maker account). Counts are generated from the AsyncAPI JSON at build time so any drift shows up immediately in the diff.
| Format | File | Size | Use |
|---|---|---|---|
| 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
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:
PredictAsiaX API · 1 collection + 2 environments (production + sandbox).PAX Sandbox environment and set apiKey to your sk_live_* from POST /v1/sandbox-keys.Direct downloads (mirror for airgapped / audit review):
| File | Purpose | Size |
|---|---|---|
| postman.json | Collection — public REST paths with example bodies (regenerated from openapi.json) | 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 |
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
apiKey = your sk_live_* sandbox key (from POST /v1/sandbox-keys, tier=sandbox). Save.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:
| Field | Value |
|---|---|
| Registry name | com.predictasiax/mcp |
| Server URL | https://mcp.predictasiax.com |
| Transport | SSE + Streamable HTTP |
| Auth | Bearer sk_live_* (self-serve mint at POST /v1/sandbox-keys) |
| Tools (44) | market_search, market_get, market_orderbook, market_price_history, probability_movers, markets_top_volume, category_list, portfolio_read, portfolio_history, balance_get, positions_list, subaccount_list, place_order, cancel_order, cancel_all_orders, orders_open, orders_history, fee_estimate, mm_stipend_estimate, mm_stipend_history, liquidity_leaderboard, subaccount_create, subaccount_transfer, subaccount_close, composer_templates_list, composer_template_get, composer_proposal_submit, resolution_evidence, mm_quote_post, mm_quotes_list, rfq_create, rfq_accept, builder_me, builder_apps_list, builder_apikeys_list, tier_status, fee_ledger_read, webhook_endpoints_list, webhook_create, webhook_deliveries, access_request_create, access_request_status, sandbox_agent_examples, health — namespaced pax.* via tools/list |
Native SDKs are available. Both target the gateway at https://api.predictasiax.com (methods add the /v1/… paths) with Bearer or HMAC (PAX-* headers) auth, an offline audit verifier, auto-Idempotency-Key generation on writes, and safe defaults (HTTPS-only, streamed response cap, CRLF-header guard, response body size cap 10 MB).
| Language | Package | Version | Install |
|---|---|---|---|
| Python | pax-api |
3.1.0 LIVE | pip install "pax-api>=3" |
| TypeScript / JavaScript | @predictasiax/api |
3.1.0 LIVE | npm i @predictasiax/api@3 |
| Go | via OpenAPI codegen | — | oapi-codegen -package pax https://docs.predictasiax.com/downloads/openapi.yaml |
| Rust | via OpenAPI codegen | — | openapi-generator generate -g rust -i https://docs.predictasiax.com/downloads/openapi.json |
| 50+ other languages | via OpenAPI codegen | — | openapi-generator generate -g <lang> -i https://docs.predictasiax.com/downloads/openapi.json |
# npm i @predictasiax/api@3 (2.x cannot authenticate against the current gateway)
import { PaxClient } from '@predictasiax/api';
// 1. Public endpoints need no key; mint a sandbox key (api_key is shown once)
const pub = new PaxClient();
const minted = await pub.sandboxKeys.mint({ orgName: 'my-app' });
// 2. Use the key: Authorization: Bearer sk_live_...
// (or { apiKey, keyId: 'api_...' } to HMAC-sign with PAX-* headers instead)
const pax = new PaxClient({ apiKey: minted.api_key });
for await (const market of pax.markets.list({ category: 'crypto' })) {
console.log(market.id, market.title);
}
// Limit BUY of one outcome. Idempotency-Key and client_order_id are generated
// once per call and reused across retries.
const { data, requestId } = await pax.orders.place({
marketId: 'hadjar-f1-2026', side: 'yes', price: '0.05', size: '20',
}).withResponse();
console.log('Order:', data, 'Request:', requestId);
// Offline audit verification
console.log((await pub.audit.verify(110841)).ok);
// WebSocket streaming
import { PaxWSClient } from '@predictasiax/api';
const ws = new PaxWSClient({ apiKey: minted.api_key, subscribeOnConnect: ['fast_tick', 'account'] });
ws.on('fast_tick', (e) => console.log(e));
await ws.connect();
# pip install "pax-api>=3" (2.x cannot authenticate against the current gateway)
from pax_api import PaxClient
# 1. Public endpoints need no key; mint a sandbox key (api_key is shown once)
key = PaxClient().mint_sandbox_key(org_name="my-app")["data"]["api_key"]
# 2. Use the key: Authorization: Bearer sk_live_...
# (or PaxClient(api_key=key, key_id="api_...") to HMAC-sign instead)
pax = PaxClient(api_key=key)
print(pax.get_balance())
# 3. Limit BUY of one outcome; client_order_id + Idempotency-Key fixed across retries
order = pax.place_order(market_id="hadjar-f1-2026", side="yes", price="0.05", size="20")
# Offline audit verification
print(PaxClient().verify_audit_event(110841)["ok"])
# 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-3.0.1-py3-none-any.whl · pax_api-3.0.1.tar.gz.
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.