Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sx.bet/llms.txt

Use this file to discover all available pages before exploring further.

Subscribe to best odds changes across all order books. You will receive updates when orders are filled, cancelled, or posted. Note that for performance reasons, updates are delayed by at most 100ms. CHANNEL NAME best_odds:global
The channel no longer includes a baseToken parameter. All token denominations are now broadcast on this single global channel.
MESSAGE PAYLOAD FORMAT
NameTypeDescription
baseTokenstringThe token for the best odds result order
marketHashstringThe market for the best odds result
isMakerBettingOutcomeOnebooleanWhether the maker is betting outcome one
percentageOddsstringThe odds the maker receives in the sportx protocol format. To convert to implied odds divide by 10^20. To get taker implied odds: takerOdds = 1 - percentageOdds / 10^20. See unit conversion for more details.
updatedAtnumberTimestamp in milliseconds for when these became the best odds
sportIdnumberThe sport ID for this market
leagueIdnumberThe league ID for this market
Messages are sent in batches as an array.
// To subscribe
const sub = client.newSubscription("best_odds:global");

sub.on("publication", (ctx) => {
  const data = ctx.data;
  // message handler logic
});

sub.subscribe();
The above returns JSON structured like this:
[
  {
    "baseToken": "0x1BC6326EA6aF2aB8E4b68c83418044B1923b2956",
    "marketHash": "0xddaf2ef56d0db2317cf9a1e1dde3de2f2158e28bee55fe35a684389f4dce0cf6",
    "isMakerBettingOutcomeOne": true,
    "percentageOdds": "750000000000000000000",
    "updatedAt": 1747500000000,
    "sportId": 1,
    "leagueId": 1236
  }
]
Last modified on March 27, 2026