Skip to main content
GET
/
user
/
getOrdersForGame
Get orders for a game
curl --request GET \
  --url https://api.4casters.io/user/getOrdersForGame \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "unmatched": [
      {
        "id": "<string>",
        "txID": "<string>",
        "bet": 123,
        "odds": 123,
        "spread": 123,
        "total": 123,
        "participantID": "<string>",
        "otherParticipantID": "<string>",
        "expiry": "2023-11-07T05:31:56Z",
        "filled": 123,
        "offered": 123,
        "remaining": 123,
        "takenRatio": 123,
        "createdAt": "2023-11-07T05:31:56Z",
        "origin": "<string>",
        "graded": true,
        "closed": true,
        "adminRefund": true,
        "userReference": "<string>",
        "wagerRequestID": "<string>",
        "game": {
          "id": "<string>",
          "league": "<string>",
          "sport": "<string>",
          "start": "2023-11-07T05:31:56Z",
          "ended": true,
          "eventName": "<string>",
          "isFutures": true,
          "participants": [
            {
              "id": "<string>",
              "longName": "<string>",
              "shortName": "<string>",
              "mainPitcher": "<string>",
              "rotationNumber": "<string>",
              "futuresSide": "<string>",
              "score": 123
            }
          ]
        }
      }
    ],
    "matched": [
      {
        "id": "<string>",
        "txID": "<string>",
        "bet": 123,
        "odds": 123,
        "spread": 123,
        "total": 123,
        "participantID": "<string>",
        "market": "<string>",
        "side": "<string>",
        "userReference": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "matchedTime": "2023-11-07T05:31:56Z",
        "graded": true,
        "closed": true,
        "origin": "<string>",
        "adminRefund": true,
        "risk": "<string>",
        "win": "<string>",
        "fee": "<string>",
        "game": {
          "id": "<string>",
          "league": "<string>",
          "sport": "<string>",
          "start": "2023-11-07T05:31:56Z",
          "ended": true,
          "eventName": "<string>",
          "isFutures": true,
          "participants": [
            {
              "id": "<string>",
              "longName": "<string>",
              "shortName": "<string>",
              "mainPitcher": "<string>",
              "rotationNumber": "<string>",
              "futuresSide": "<string>",
              "score": 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.

For a given 4casters game id, returns the caller’s open orders and matched (ungraded) bets for that game. Graded bets are not returned by this endpoint — use Get graded wagers for those.

Request

GET /user/getOrdersForGame
gameID
string
required
4casters game id.
curl "https://api.4casters.io/user/getOrdersForGame?gameID=688c0516fbc14da0c202d426" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

data.unmatched
array
Array of open orders on the game, sorted ascending by game start time. Same shape as Get unmatched orders.
data.matched
array
Array of matched (ungraded) bets on the game. Same shape as Get matched bets.

Example

{
  "data": {
    "unmatched": [/* UnmatchedOrder, ... */],
    "matched":   [/* MatchedBet, ...     */]
  }
}

Errors

StatusMeaning
404gameID missing or not a valid game id.

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.

Query Parameters

gameID
string
required

A 4casters game id (ObjectID). Get game ids from GET /exchange/v2/getGames or GET /exchange/v2/getOrderbook.

Response

Orders and matched bets for the requested game

data
object