Getting Started

Place your first prediction market order in 5 minutes. All curl — no SDK required.

Use sandbox for this walkthrough. Sandbox mints test USDT (via faucet), lets you settle markets on demand via mock oracle, and resets on request. Everything happens on sandbox.predictasiax.com — zero risk to real funds.

Step 1 — Mint a sandbox API key

Sign in on sandbox.predictasiax.comSettings → API KeysMint new key. You'll get three secrets shown once:

{
  "key_id":     "sk_test_ABC123def456",
  "secret":     "1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890",
  "passphrase": "correct-horse-battery-staple"
}

Store all three securely — they cannot be re-fetched. Use sk_test_* keys on sandbox only; sk_live_* keys work on production only. Wrong-env keys return 401 WRONG_ENV_KEY.

Step 2 — Faucet test USDT

Sandbox accounts start at 0. Mint 10,000 test USDT (max 1 call per hour per key):

curl -X POST https://sandbox.predictasiax.com/api/v1/sandbox/faucet \
  -H "X-Api-Key: sk_test_ABC123def456"

Response:

{
  "ok": true,
  "data": {
    "account_id": "acc_kL9m8n7p6q5r",
    "balance_free": "10000.000000",
    "asset": "USDT",
    "mode": "sandbox"
  },
  "meta": { "request_id": "req_01hj...", "server_ts_ms": 1786190400000 }
}

Step 3 — List seeded evergreen markets

Sandbox pre-seeds 4 evergreen markets that never close (auto-recreated on settlement). Pick one:

curl https://sandbox.predictasiax.com/api/v1/markets?category=crypto&market_type=fast \
  -H "X-Api-Key: sk_test_ABC123def456"

Response (excerpt):

{
  "ok": true,
  "data": [
    {
      "market_id":  "m_sbx_btc_binary_60s",
      "template_id":"crypto_price_binary_60s",
      "title":      "BTC > $100,000 in 60s?",
      "market_type":"fast",
      "outcome_schema":"binary",
      "outcomes": [
        { "id": "yes", "label": "Yes", "price": "0.520000" },
        { "id": "no",  "label": "No",  "price": "0.480000" }
      ],
      "status": "active",
      "closes_at_ms": 1786190460000
    }
  ],
  "meta": { "next_cursor": null }
}

Step 4 — Place an order

Buy 100 "Yes" shares at market price. The engine routes to AMM or CLOB automatically — response's meta.fill_venue tells you which if you care.

curl -X POST https://sandbox.predictasiax.com/api/v1/orders \
  -H "X-Api-Key: sk_test_ABC123def456" \
  -H "Content-Type: application/json" \
  -d '{
    "market_id":  "m_sbx_btc_binary_60s",
    "outcome_id": "yes",
    "side":       "buy",
    "order_type": "market",
    "size":       "100",
    "client_order_id": "my-first-order-001"
  }'

Response:

{
  "ok": true,
  "data": {
    "order_id": "ord_9x8y7z6w5v",
    "status": "filled",
    "filled_size": "100",
    "avg_fill_price": "0.521000",
    "created_at_ms": 1786190410123
  },
  "meta": { "fill_venue": "amm" }
}

Step 5 — Subscribe to real-time fills

Open WebSocket, AUTH with your API key, subscribe to account channel for private fill events:

# pipx install websocket-client
wscat -c wss://sandbox.predictasiax.com/ws

> {"method":"AUTH","token":"sk_test_ABC123def456"}
< {"type":"authenticated","email":"partner@example.com"}

> {"method":"SUBSCRIBE","params":["account","fast_round_settled"]}
< {"type":"subscribed","channels":["account","fast_round_settled"]}

# When your market settles, you'll receive:
< {"type":"fast_round_settled","market_id":"m_sbx_btc_binary_60s","winning_outcome_id":"yes","settle_price":"100234.50"}
< {"type":"account","balance_free":"10052.100000","balance_reserved":"0"}

Step 6 (optional) — Force settlement for testing

Don't want to wait 60s for the real oracle? Force outcome via sandbox-only endpoint:

curl -X POST https://sandbox.predictasiax.com/api/v1/sandbox/mock-oracle \
  -H "X-Api-Key: sk_test_ABC123def456" \
  -H "Content-Type: application/json" \
  -d '{
    "market_id": "m_sbx_btc_binary_60s",
    "winning_outcome_id": "yes"
  }'

Settlement fires immediately, your account balance updates, and you receive the WS fast_round_settled event.

Reset sandbox state anytime

curl -X POST https://sandbox.predictasiax.com/api/v1/sandbox/reset \
  -H "X-Api-Key: sk_test_ABC123def456"

Wipes positions, cancels open orders, resets balance to 0. Idempotent.

Next steps

Going to production? Mint a sk_live_* key on production dashboard, swap base URL to https://predictasiax.com/api, and follow the Authentication guide for HMAC signing. Test API keys will not authenticate on production.