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 returns403. A token only ever works for its own account. Authorization: Beareris not player auth. That header is reserved for partner/affiliate panel keys and will not authenticate a user account.
/api/marketsGet list of all prediction markets
/api/markets/:idGet detailed information about a specific market
/api/markets/15mGet the currently active 15-minute UP/DOWN markets
/api/markets/15m/historyGet past 15-minute markets, each enriched with its price history
/api/markets/15m/:marketId/orderbookGet the order book for a 15-minute market
/api/markets/15m/:marketId/buyBuy UP or DOWN shares in a 15-minute market. Requires a session (see Authentication). A 0.5% fee is added on top of amount.
/api/markets/15m/:marketId/sellSell shares back into a 15-minute market before it ends. Requires a session.
/api/markets/15m/:marketId/claimClaim winnings from a resolved 15-minute market. Requires a session.
/api/users/:id/positionsGet open positions for a user
/api/users/:id/tradesGet a user trade history
/api/users/:idGet user profile
/api/users/:id/balanceGet a user balance. Requires a session.
/api/users/:id/referralGet user referral data
/api/users/:id/referral/codeUpdate custom referral code
/api/vaultsGet available vaults
/api/vaults/flex/stakeStake tokens in flex vault
/api/vaults/deposits/:depositId/unstakeUnstake a specific vault deposit
/api/vaults/deposits/:depositId/claimClaim accrued yield from a vault deposit
/api/users/:userId/vaultsGet a user active vault deposits
/api/leaderboardGet leaderboard rankings
/api/users/:id/pointsGet points balance and history for a user. Requires a session.