API Documentation

Create a key, point your software at it, trade. Read data is open to everyone.

Base URL

/api (same origin)

Auth

Bearer uak_… / x-user-token

Rate Limit

120 read / 60 write per min

Format

JSON

Endpoint reference

70 verified endpoints. Base URL /api on this origin.

WS
/wspublic

WebSocket stream of live market data, same origin as the site: wss://<your-domain>/ws. Open to everyone — it carries market data only. Account streams require sending your own userId after connecting.

GET
/api/healthpublic

Liveness probe. Cached market count, open WebSocket connections, upstream feed WS state.

GET
/api/geo/checkpublic

Geo gate plus white-label brand resolution for the calling Host. The frontend calls it before render.

GET
/api/sync/statuspublic

Upstream market-cache freshness: last and next sync time, cached market count, cache age against its TTL in seconds.

GET
/api/partner/resolve-configpublic

White-label brand config for the calling Host: platform name, colour theme, layout template. The only /api/partner/* path useful to a normal developer.

GET
/api/marketspublic

Main market list. Pinned custom and short-term markets are merged in as a prefix and are not affected by sort.

GET
/api/markets/cardspublic

Same paging and filtering as /api/markets but a trimmed card payload: top two outcomes only, volume and liquidity floored. Cheaper for list views.

GET
/api/homepublic

Single-call homepage bootstrap: the category list plus a first page of markets. Saves a round trip.

GET
/api/markets/:idOrSlugpublic

Full market detail including the complete outcome set, description and resolution text. Accepts the id or the slug.

GET
/api/market-rules/:slugpublic

Just the resolution rules text for a market, without the full detail payload.

GET
/api/categoriespublic

Category list enriched with live marketCount and totalVolume. The `all` row carries the totals.

GET
/api/categories/:category/tagspublic

Sub-category tags with counts for one category. These tag values are exactly what /api/markets?tag= accepts.

GET
/api/searchpublic

Weighted full-text search across title, outcomes, tags, category and description. Results are split into events and markets.

GET
/api/markets/search-by-newspublic

Find markets related to news keywords.

GET
/api/market-holders/:marketIdpublic

Position holders for a long-form market, with the outcome each one holds.

GET
/api/orderbook/:marketId/:outcomeIdpublic

Bid and ask ladder for one outcome of a long-form market.

GET
/api/markets/5mpublic

Currently tradeable 5-minute up/down markets, de-duplicated to one per asset (the soonest that has not expired).

GET
/api/markets/15mpublic

Currently tradeable 15-minute up/down markets, one per asset.

GET
/api/markets/5m/current/:assetpublic

The single active 5m market for an asset. This is the auto-switch helper a bot should poll to know what to trade right now.

GET
/api/markets/15m/current/:assetpublic

The single active 15m market for an asset.

GET
/api/markets/5m/futurepublic

Scheduled but not yet started 5m markets, so a bot can pre-position.

GET
/api/markets/15m/futurepublic

Scheduled but not yet started 15m markets.

GET
/api/markets/5m/historypublic

Recent and resolved 5m markets with settlement data and an embedded price series. Heavy — every row carries priceHistory.

GET
/api/markets/15m/historypublic

Resolved 15m market history with priceHistory, capped at 240 points per market.

GET
/api/markets/5m/:idOrSlugpublic

Full 5m market detail with the quoted price, delta and time remaining. Accepts the id or the slug.

GET
/api/markets/15m/:idOrSlugpublic

Full 15m market detail with the quoted price and time remaining.

GET
/api/markets/5m/:marketId/orderbookpublic

Resting limit orders for a 5m market, aggregated per side plus the raw order rows.

GET
/api/markets/15m/:marketId/orderbookpublic

Resting limit orders for a 15m market.

GET
/api/pricespublic

Live spot snapshot for every tracked asset, keyed by symbol.

GET
/api/prices/:assetpublic

Live spot snapshot for one asset.

GET
/api/candles/:assetpublic

OHLCV candles for an asset. Proxied live to an external price feed.

GET
/api/guided-candles/:assetpublic

The candle series the short-term markets are settled against.

GET
/api/market-stats/:assetpublic

Aggregate traded volume and trade count for an asset.

GET
/api/holders/:assetpublic

Current holders for a short-term asset market, largest first.

GET
/api/live-trades/:assetpublic

Live trade tape for a short-term asset market. This is the read side of a copytrading loop.

GET
/api/event-live-trades/:eventIdpublic

Live trade tape for one long-form event, with the outcome traded on each row.

GET
/api/leaderboardpublic

Ranked traders. Use it to pick a leader to copy.

GET
/api/leaderboard/rank/:userIdpublic

One account’s standing without pulling the whole board.

GET
/api/users/:userId/profilepublic

Public profile card for any account: identity plus aggregate stats.

GET
/api/users/:userId/tradespublic

Trade history for any account. This is the feed a copytrading bot follows.

GET
/api/users/:userId/positionspublic

Open positions for any account, across every market type.

GET
/api/users/:userId/balancekey: read

Real and demo balance for your own account.

GET
/api/users/:userId/positions/15mkey: read

Your open 15m positions, each enriched with the live market state. positionId for a claim comes from here.

GET
/api/users/:userId/positions/5mkey: read

Your open 5m positions, enriched with the live market state.

GET
/api/users/:userId/orderskey: read

Your AMM order history.

GET
/api/users/:userId/limit-orders/15mkey: read

Your 15m limit orders. The orderId a cancel needs comes from here.

GET
/api/users/:userId/limit-orders/5mkey: read

Your 5m limit orders.

GET
/api/users/:userId/transactionskey: read

Your ledger: deposits, trades, settlements.

GET
/api/users/:userId/pointskey: read

Your points balance, recent activity and achievements.

POST
/api/users/:userId/api-keyssession only

Create an API key. The plaintext key is returned exactly once, in this response, and is never recoverable afterwards — only its sha256 is stored.

GET
/api/users/:userId/api-keyssession only

List your API keys. Never returns key material — prefix only. Revoked keys stay visible with their revokedAt stamp, because they still explain trades in your history.

DELETE
/api/users/:userId/api-keys/:keyIdsession only

Revoke one of your API keys. Idempotent — revoking an already-revoked key returns 200.

POST
/api/users/:userId/orders/placekey: trade

Primary order placement route. Auto-detects the market timeframe from the id (tries 15m, then 5m, then long-form/event). Handles market and limit, buy and sell.

POST
/api/users/:userId/orderskey: trade

The older AMM order route. Still live and still reachable with a key. Same money path as /orders/place but a narrower body and stricter type checking. Prefer /orders/place for new integrations.

POST
/api/markets/15m/:marketId/buykey: trade

Buy UP or DOWN shares in a 15-minute market. Market order when you send amount; limit order when type is "limit" or when you send both price and shares. A 0.5% fee is charged on top of amount.

POST
/api/markets/15m/:marketId/sellkey: trade

Sell shares back and close a 15m position. This is the correct way to close a position. A 0.5% fee is deducted from the proceeds.

POST
/api/markets/15m/:marketId/claimkey: trade

Settle a position on a RESOLVED 15m market. A winning position pays shares x 1.00; a losing position is closed at 0. Both outcomes return 200 — read data.isWinner.

POST
/api/markets/5m/:marketId/buykey: trade

Buy UP or DOWN shares in a 5-minute market. Same contract as the 15m buy.

POST
/api/markets/5m/:marketId/sellkey: trade

Sell shares back and close a 5m position. The supported way to close a 5m position.

POST
/api/markets/5m/:marketId/claimkey: trade

Settle a position on a RESOLVED 5m market. Winning positions pay shares x 1.00; losing positions close at 0. Both return 200.

POST
/api/limit-orders/15m/:orderId/cancelkey: trade

Cancel a resting 15m limit order and refund the unfilled stake.

POST
/api/limit-orders/5m/:orderId/cancelkey: trade

Cancel a resting 5m limit order and refund the unfilled stake.

DELETE
/api/markets/5m/:marketId/orders/:orderIdkey: trade

Second cancel path for a 5m limit order, addressed by market and order. Ownership is re-checked in the handler.

GET
/api/clob/pricepublic

Best price for one side of an outcome, in the standard CLOB response shape.

GET
/api/clob/bookpublic

Full ladder for an outcome in the CLOB shape, prices and sizes as strings.

GET
/api/clob/midpointpublic

Midpoint between best bid and best ask.

GET
/api/clob/spreadpublic

Absolute and percentage spread for an outcome.

GET
/api/clob/prices-historypublic

Price series for a market in the CLOB shape.

GET
/api/clob/fee-ratepublic

Current maker and taker fee rates.

POST
/api/clob/preview-tradepublic

Dry-run an order: shares out, average price, price impact, fee and the resulting prices. Pure calculation — nothing is written and no balance moves.