API Documentation

Build with the PredictON API

Base URL

/api (same origin)

Auth

x-user-token

Rate Limit

Fair use

Format

JSON

Authentication

Public endpoints (markets, leaderboard, vault listings) need no credentials. Endpoints marked as requiring a session accept either the predicton-session httpOnly cookie that is set when you log in through the site, or an x-user-token request header carrying that same JWT. Both are equivalent.

curl -X POST /api/markets/15m/$MARKET_ID/buy \
  -H "Content-Type: application/json" \
  -H "x-user-token: $YOUR_TOKEN" \
  -d '{"userId":"$YOUR_USER_ID","outcome":"UP","amount":10}'

Treat this token like a password. It carries no expiry claim, so it stays valid until your credentials change. Never paste it into a URL, a query string, a screenshot, or a shared terminal — anyone holding it can act as you. Send it only in the x-user-token header, over HTTPS.

  • Scoped to you. If a request carries a userIdin its body, params or query that differs from the token's subject, the API returns 403. A token only ever works for its own account.
  • Authorization: Bearer is not player auth. That header is reserved for partner/affiliate panel keys and will not authenticate a user account.
GET
/api/markets

Get list of all prediction markets

GET
/api/markets/:id

Get detailed information about a specific market

GET
/api/markets/15m

Get the currently active 15-minute UP/DOWN markets

GET
/api/markets/15m/history

Get past 15-minute markets, each enriched with its price history

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

Get the order book for a 15-minute market

POST
/api/markets/15m/:marketId/buy

Buy UP or DOWN shares in a 15-minute market. Requires a session (see Authentication). A 0.5% fee is added on top of amount.

POST
/api/markets/15m/:marketId/sell

Sell shares back into a 15-minute market before it ends. Requires a session.

POST
/api/markets/15m/:marketId/claim

Claim winnings from a resolved 15-minute market. Requires a session.

GET
/api/users/:id/positions

Get open positions for a user

GET
/api/users/:id/trades

Get a user trade history

GET
/api/users/:id

Get user profile

GET
/api/users/:id/balance

Get a user balance. Requires a session.

GET
/api/users/:id/referral

Get user referral data

PUT
/api/users/:id/referral/code

Update custom referral code

GET
/api/vaults

Get available vaults

POST
/api/vaults/flex/stake

Stake tokens in flex vault

POST
/api/vaults/deposits/:depositId/unstake

Unstake a specific vault deposit

POST
/api/vaults/deposits/:depositId/claim

Claim accrued yield from a vault deposit

GET
/api/users/:userId/vaults

Get a user active vault deposits

GET
/api/leaderboard

Get leaderboard rankings

GET
/api/users/:id/points

Get points balance and history for a user. Requires a session.