Skip to main content
POST
/
exchange
/
getOrderbook
Get orderbook (v1, deprecated)
curl --request POST \
  --url https://api.4casters.io/exchange/getOrderbook \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "leagueRequested": "NBA"
}
'
{
  "data": {
    "market": "<string>",
    "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": {},
        "awaySpreads": {},
        "over": {},
        "under": {},
        "homeMoneylines1x2": {},
        "awayMoneylines1x2": {},
        "draw1x2": {},
        "mainHomeSpread": "<unknown>",
        "mainAwaySpread": "<unknown>",
        "mainTotal": "<unknown>",
        "openInterest": 123,
        "matchedVolume": 123
      }
    ]
  }
}

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.

Deprecated. Use GET /exchange/v2/getOrderbook for the simpler, recommended flat format.This endpoint is kept for backwards compatibility with older clients.
Returns the orderbook for an entire league in nested form, keyed by spread / total number. Same per-game shape as Get single orderbook, but for every game in the league.

Request

POST /exchange/getOrderbook
leagueRequested
string
required
League code (case-insensitive).
curl -X POST https://api.4casters.io/exchange/getOrderbook \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"leagueRequested": "NBA"}'

Response

data.market
string
Always null in this endpoint.
data.games
array
Array of games with nested-orderbook fields. See Get single orderbook for the per-game shape — awayMoneylines / homeMoneylines arrays plus awaySpreads / homeSpreads / over / under objects keyed by spread or total number.
Each individual order in those buckets has the standard order shape:

Authorizations

Authorization
string
header
required

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.

Body

application/json
leagueRequested
string
required

League code (case-insensitive).

Response

Nested-orderbook response

data
object