The 4casters REST API lets you log in, query games and the orderbook, place / edit / cancel orders, and read your bet history programmatically. It is the same API that powers the 4casters web app.Documentation Index
Fetch the complete documentation index at: https://docs.4casters.io/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All endpoints in this section are rooted at:Conventions
- Transport: HTTPS only.
- Encoding: JSON. Send
Content-Type: application/jsonon every request that has a body. - Response envelope: With a couple of well-marked exceptions (
/affiliate/getAffiliateCommission,/exchange/getOddsForAveragePrice), every successful response is wrapped:{ "data": <payload> }. - Identifiers: Game ids, participant ids, and order ids are MongoDB
ObjectIDstrings (24-character hex). - Odds: All odds are American format (negative for favorites, positive for underdogs) unless noted otherwise.
- Time: All timestamps are ISO 8601 with
Z(UTC).
Authentication
Almost every endpoint requires authentication. Log in once via POST/user/login, then send the returned auth token on every request — see Authentication for details.
Per-order errors vs HTTP errors
The “place” and “edit” endpoints accept batches and return per-order results. A successful HTTP200 response can still contain individual order failures inside data.createdSessions[i]. See the per-order error shape on each endpoint page.
HTTP-level errors (4xx, 5xx) are returned as { "error": "<message>" }.
Rate limiting
Authentication routes (/user/login, password reset, signup) are rate-limited per IP. Place / edit / cancel routes are rate-limited per account. If you exceed the limit you’ll receive 429 Too Many Requests.
Real-time updates
The REST API pairs with the WebSocket Streaming API for real-time orderbook ticks and per-account fill / settle events. The auth token returned by/user/login works for both.
Endpoint index
Authentication
Log in and obtain an auth token.
User
Account info, balance, bets, and orders.
Orders
Place, edit, look up, and cancel orders.
Markets
Browse leagues, games, participants, and the orderbook.
Affiliate
Affiliate commission.
Legacy Postman collection
The previous documentation lived as a Postman collection. It is preserved for reference, but these Mintlify docs are now the source of truth — the Postman collection may lag behind for new endpoints, parameters, or response shapes.4Casters API — Postman collection
View the legacy Postman documentation