Skip to main content
This WebSocket API will be deprecated on July 1, 2026. See the Migration Guide to move to the Centrifuge-based API.
Subscribe to all line changes. Messages are sent for particular combinations of event IDs and market types. Note that only market types with lines will have updates sent. See the active markets section for details on which types have lines. CHANNEL NAME FORMAT main_line MESSAGE PAYLOAD FORMAT
NameTypeDescription
marketHashstringThe market which is now the main line for this event ID
marketTypenumberThe type of market this update refers to.
sportXEventIdstringThe event ID for this update
To get the actual line, you’ll have to fetch the market using the marketHash
const channel = realtime.channels.get('main_line');
channel.subscribe((message) => {
  console.log(message.data);
});
The above command returns JSON structured like this:
{
  "marketHash": "0x38cceead7bda65c18574a34994ebd8af154725d08aa735dcbf26247a7dcc67bd",
  "marketType": 3,
  "sportXEventId": "L7178624"
}