Subscribe to changes in a particular order book. 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 FORMATDocumentation Index
Fetch the complete documentation index at: https://docs.sx.bet/llms.txt
Use this file to discover all available pages before exploring further.
order_book_v2:{token}:{marketHash}
| Name | Type | Description |
|---|---|---|
| token | string | Restrict updates to only orders denominated in this token |
| marketHash | string | The market to subscribe to |
status and updateTime field.
| Name | Type | Description |
|---|---|---|
| orderHash | string | A unique identifier for this order |
| status | string | ”ACTIVE” if this order is still valid, “INACTIVE” if cancelled, “FILLED” if completely filled |
| fillAmount | string | How much this order has been filled in Ethereum units up to a max of totalBetSize. See the token section of how to convert this into nominal amounts |
| pendingFillAmount | string | What amount is pending fill in Ethereum units up to a max of totalBetSize. See the token section of how to convert this into nominal amounts |
| maker | string | The market maker for this order |
| totalBetSize | string | The total size of this order in Ethereum units. See the token section for how to convert this into nominal amounts. |
| percentageOdds | string | The odds that the maker receives in the sportx protocol format. To convert to an implied odds divide by 10^20. To convert to the odds that the taker would receive if this order would be filled in implied format, use the formula takerOdds=1-percentageOdds/10^20. See the unit conversion section for more details. |
| expiry | number | Depcreated field: the time in unix seconds after which this order is no longer valid. Always 2209006800 |
| apiExpiry | number | The time in unix seconds after which this order is no longer valid |
| salt | string | A random number to differentiate identical orders |
| isMakerBettingOutcomeOne | boolean | true if the maker is betting outcome one (and hence taker is betting outcome two if filled) |
| signature | string | Signature of the maker on this order |
| updateTime | string | Server-side clock time for the last modification of this order. |
| sportXeventId | string | The event related to this order |
orderHash within an update, you can order them by updateTime after converting the updateTime to a BigInt or BigNumber.
