PredictAsiaX — Asia's Prediction Market. Real-Time Foresight.

Web3-native prediction market API

REST + WebSocket · Engine-agnostic · Deterministic IDs · HMAC + Bearer + API key auth · self-serve sandbox tier

Get Started → REST Reference WebSocket Reference

Get started in 30 seconds

1

Mint an API key

Sign in on predictasiax.com → Settings → API Keys, or mint an anonymous sandbox key via POST /v1/sandbox-keys. All keys are sk_live_* prefixed; sandbox is differentiated by tier=self_serve on the key (not by prefix).

2

List markets (public)

curl https://api.predictasiax.com/v1/markets \
  -H "X-Api-Key: sk_live_..."
3

Subscribe to fast ticks

wscat -c wss://predictasiax.com/ws
> {"method":"SUBSCRIBE","params":["fast_tick"]}

Design principles

Engine-agnostic

Top-level response never leaks AMM vs CLOB. One price field, one size field. meta.fill_venue optional if you need to debug routing.

Deterministic IDs

Market IDs are m_<sha256[0:16]> — idempotent create. Repeat POST /v1/markets returns the same market.

Web3 privacy first

Email, phone, IP stripped from external responses by default. Self-view paths (/v1/account) preserve. X-PII-Redacted header always present.

Money as string

USDT 6dp, BTC 8dp, ETH 18dp — never JavaScript numbers (loses precision). "1000.234567" not 1000.234567.

Envelope + snake_case

{ok, data, meta} on every canonical response. Deep snake_case keys. Timestamps have *_at_ms sibling for easy Date construction.

Chain-agnostic architecture

Settlement layer is fully abstracted — every core table carries a chain_data JSONB envelope so on-chain metadata (block, tx hash, chain_id) rides alongside off-chain ledger rows without breaking client integrations.

Authentication

API Key sk_live_*

Send X-Api-Key: sk_live_... header (or Authorization: Bearer). Tier flag on the key controls capability — self_serve for sandbox testing, read_live / trade_capped / trade_full / genesis / partner for production. Same prefix, same host, promote by upgrading tier.

HMAC (Polymarket-compatible)

5 headers: 4 POLY_* (POLY_ACCESS_KEY, POLY_TIMESTAMP, POLY_PASSPHRASE, POLY_SIGNATURE) + Content-Type. Signature = base64(HMAC-SHA256(secret, ts + method + path + body)).

Session Bearer

Authorization: Bearer <session_token> — for browser / mobile client flows. Get token via POST /api/auth/login. Not intended for machine partners.

Rate limits

Per API key, sliding-window, per-endpoint-category. Response headers X-RateLimit-Remaining and Retry-After (on 429) surface state on every call.

Read-live baseline sk_live_*

Fair-use quota tuned per endpoint category (read / account / trade / create) with independent bucket accounting. See Rate Limits for the full matrix.

Genesis 10×

Inaugural cohort — 10× the read_live baseline across all endpoint categories, custom bursts negotiable. Partner + institutional tiers scale to 20× and beyond per contract.