Choose your API
REST API
Request / response over HTTPS. Use for login, account state, history, market lookups, and batch place / edit / cancel.
Orders WebSocket
Persistent low-latency channel for placing and cancelling orders. Use when you care about round-trip latency.
Streaming WebSocket
Push feeds for orderbook ticks and per-account fills / settles. Use to keep state in sync without polling.
When to use which
Authentication
All three APIs take one credential in theAuthorization header (REST requests and WebSocket handshakes alike). There are two kinds:
- An API key, created once on your account page. For programs: no login step, no rotation, optional IP ranges (IPv4 or IPv6) and expiry, revocable on its own.
- A login token, from
POST /user/loginwith your username and password. What the website uses; valid 30 days, then rotated in place.
Conventions
- Transport: HTTPS / WSS only.
- Encoding: JSON everywhere.
- Response envelope (REST):
{ "data": <payload> }on success;{ "error": "<message>" }on HTTP errors. - Identifiers: Game ids, participant ids, and order ids are MongoDB
ObjectIDstrings (24-char hex). - Odds: American format (negative for favorites, positive for underdogs) unless noted.
- Time: ISO 8601 with
Z(UTC).
A typical integration
Most non-trivial clients combine all three:- REST — with your API key, call
GET /user/getMeandGET /games/v2/leaguesto bootstrap state. - Streaming WebSocket — open the price feed for the markets you care about and the user feed to react to your own fills / settles.
- Orders WebSocket — open a persistent connection and place / cancel orders with low latency, correlating responses by
requestID. - REST — fall back to
POST /myBets/getMatchedBets,/myBets/getOrdersForGame, etc. for history and reconciliation.
Need the old docs?
The previous documentation lived as a Postman collection. It’s 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