Skip to main content

Channel Name

Channel: lifecycle (Global channel for all markets)

Subscription

ws.send(JSON.stringify({
  event: 'subscribe',
  data: 'lifecycle'
}));

Event Types

TypeDescription
OPENMarket has opened and is accepting orders
STARTThe underlying event/game has started
ENDThe underlying event/game has ended
CLOSEMarket has closed and is no longer accepting orders
Critical: When a market closes (indicated by a CLOSE event), all outstanding orders on that market are implicitly cancelled. No individual cancellation messages will be sent for these orders.You must use lifecycle events to manage order state for any open orders in the given market.

Message Format

{
  "event": "lifecycle",
  "data": {
    "type": "OPEN",
    "market": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "description": "KC v BUF Total",
      "status": "OPEN",
      "strike": 26.5,
      "type": "TOTAL",
      "volume": 1000000,
      "eventId": "123e4567-e89b-12d3-a456-426614174001",
      "playerId": null,
      "outcomeIds": [
        "outcome-1",
        "outcome-2"
      ],
      "settledAt": null,
      "event": {
        "id": "123e4567-e89b-12d3-a456-426614174001",
        "description": "KC Chiefs vs BUF Bills - Week 14",
        "type": "REGULAR_SEASON",
        "status": "OPEN_PREGAME",
        "game": {
          "id": "game-001",
          "league": "NFL",
          "status": "SCHEDULED",
          "scheduledStart": "2023-12-10T20:00:00Z",
          "homeTeam": {
            "id": "team-buf",
            "name": "Buffalo Bills",
            "shortName": "Bills",
            "symbol": "BUF",
            "mascot": "Bills"
          },
          "awayTeam": {
            "id": "team-kc",
            "name": "Kansas City Chiefs",
            "shortName": "Chiefs",
            "symbol": "KC",
            "mascot": "Chiefs"
          }
        }
      }
    }
  }
}

Market Object

The market object in lifecycle events contains:
FieldTypeDescription
idstringUUID of the market
descriptionstringHuman-readable market description
statusstringMarket status (OPEN, CLOSED, SETTLED)
strikenumberMarket threshold value
typestringMarket type (TOTAL, SPREAD, MONEY, etc.)
volumenumberTotal trading volume
eventIdstringAssociated event UUID
playerIdstring | nullAssociated player UUID (if applicable)
outcomeIdsstring[]Array of outcome UUIDs
settledAtstring | nullSettlement timestamp (if settled)
eventobjectComplete event details including game and teams