Get orderbook (v2)
curl --request GET \
--url https://api.4casters.io/exchange/v2/getOrderbook \
--header 'Authorization: Bearer <token>'{
"data": {
"games": [
{
"id": "<string>",
"parentGameID": "<string>",
"cheapDataUID": "<string>",
"league": "<string>",
"sport": "<string>",
"start": "2023-11-07T05:31:56Z",
"ended": true,
"live": true,
"featured": true,
"eventName": "<string>",
"tournamentName": "<string>",
"periodName": "<string>",
"isSpecials": true,
"participants": [
{
"id": "<string>",
"longName": "<string>",
"shortName": "<string>",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
],
"homeMoneylines": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"awayMoneylines": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"homeSpreads": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"awaySpreads": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"over": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"under": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"homeMoneylines1x2": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"awayMoneylines1x2": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"draw1x2": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"openInterest": 123,
"matchedVolume": 123
}
]
}
}Markets
Get orderbook
Read the orderbook for a league or game (v2, recommended)
GET
/
exchange
/
v2
/
getOrderbook
Get orderbook (v2)
curl --request GET \
--url https://api.4casters.io/exchange/v2/getOrderbook \
--header 'Authorization: Bearer <token>'{
"data": {
"games": [
{
"id": "<string>",
"parentGameID": "<string>",
"cheapDataUID": "<string>",
"league": "<string>",
"sport": "<string>",
"start": "2023-11-07T05:31:56Z",
"ended": true,
"live": true,
"featured": true,
"eventName": "<string>",
"tournamentName": "<string>",
"periodName": "<string>",
"isSpecials": true,
"participants": [
{
"id": "<string>",
"longName": "<string>",
"shortName": "<string>",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
],
"homeMoneylines": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"awayMoneylines": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"homeSpreads": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"awaySpreads": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"over": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"under": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"homeMoneylines1x2": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"awayMoneylines1x2": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"draw1x2": [
{
"id": "<string>",
"createdBy": "<string>",
"sumUntaken": 123,
"odds": 123,
"bet": 123,
"gameID": "<string>",
"takenRatio": 123,
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"mockOrder": true,
"gameStartExpiry": true,
"isPostArb": true,
"participantID": "<string>",
"spread": 123,
"total": 123,
"market": "<string>"
}
],
"openInterest": 123,
"matchedVolume": 123
}
]
}
}Returns the orderbook for a league or single game in flat form: each market is an array of orders rather than an object keyed by spread / total. This is the recommended orderbook endpoint. Pair it with the WebSocket Streaming price feed for real-time updates.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.
Request
GET /exchange/v2/getOrderbook
League code, e.g.
NBA (case-insensitive). Required when gameID is not provided.Sport name, e.g.
basketball (case-insensitive). Optional filter when league is set.Single game id. When provided,
league and sport are ignored.curl "https://api.4casters.io/exchange/v2/getOrderbook?league=NBA" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
Each
game is the standard Game shape with the following additional per-market arrays:Show Per-game orderbook fields
Show Per-game orderbook fields
Resting moneyline orders backing the away team. Sorted best-price first.
Resting moneyline orders backing the home team.
Resting away-side spread orders, flattened across spread numbers.
Resting home-side spread orders.
Resting
over orders, flattened across totals.Resting
under orders.Soccer only. Three-way money line orders backing the away team.
Soccer only. Three-way money line orders backing the home team.
Soccer only. Three-way money line orders on the draw.
Sum of
bet across every resting order on the game.Total volume matched on this game.
Example (trimmed)
{
"data": {
"games": [
{
"id": "67aaba04c32f13ae2e8aa070",
"league": "NBA",
"sport": "basketball",
"start": "2025-02-12T00:10:00.000Z",
"ended": false,
"live": false,
"featured": false,
"eventName": "TORONTO RAPTORS VS PHILADELPHIA 76ERS",
"isSpecials": false,
"periodName": "Full Time",
"participants": [/* away, home */],
"awayMoneylines": [
{
"id": "67ab79fc786aa2c2cfe7524f",
"type": "moneyline",
"sumUntaken": 1151.04,
"odds": 330,
"bet": 3798.43,
"gameID": "67aaba04c32f13ae2e8aa070",
"takenRatio": 0,
"participantID": "61a3917a8afa5950306490fd",
"expiry": "2025-02-12T00:10:06.000Z",
"createdAt": "2025-02-11T16:25:32.354Z",
"gameStartExpiry": true
}
],
"homeMoneylines": [/* ... */],
"awaySpreads": [/* ... */],
"homeSpreads": [/* ... */],
"over": [/* ... */],
"under": [/* ... */],
"openInterest": 12450.30,
"matchedVolume": 27916.55
}
]
}
}
Authorizations
Pass your auth token in the Authorization header. The Bearer prefix is optional; the server also accepts a signed auth cookie or a token field in the request body.
Query Parameters
League code, e.g. NBA (case-insensitive).
Sport name, e.g. basketball (case-insensitive). Optional filter when league is set.
Single game id. When provided, league and sport are ignored.
Response
Orderbook for one or more games
Show child attributes
Show child attributes
Was this page helpful?
⌘I