1. Market data state
- Connect the WebSocket first, then load the state from
/v1/{lang}and merge it in. PeroddsId, the newerchangedAtwins. - Store odds keyed by
oddsId. The key is the same on REST, the WebSocket and the history endpoints. - Follow only the fixtures you trade with
fixtureIds: odds come fixture by fixture, within 500 fixtures per account. - Log in with
receiveType: "zstd". Production accepts nothing else.
2. Reconnect and reload
- On
snapshot_required, reload the listed channels from/v1/{lang}and keep applying messages. The feed channels have no resume. - Reload the feed channels after every reconnect, and after a
4002or a1006that follows a burst of traffic. - Persist the last
eventIdof theorderschannel and log in withsinceEventIdafter a reconnect. - Act on the
reconnectframe as soon as it arrives: reconnect at once. - Treat
4003as final: do not reconnect with that key. Treat4004as a limit to fix, not to retry.
3. Bookmaker staleness
- Subscribe to the
bookmakerschannel alongsideodds. - Keep
staleOddsperfixtureId:bookmakerpair and check it before you price or order on that bookmaker. - When it is
true, pause that bookmaker on that fixture, or fall back to another one. Resume when it returns tofalse. - Keep it apart from
suspended,activeandmarketActive: those are the bookmaker’s own stops. - Expect a bookmaker-wide incident as one message per fixture, not one message.
4. Orders
- Give every order a unique
clientOrderIdand store it before you send the request. - On a timeout or
502 UPSTREAM_UNAVAILABLE, resend the same request with the sameclientOrderId. Never send a new one for the same intent. - Take
minPricefrom the betslipprice, not from the market data. - Follow working orders on the
orderschannel, or poll them withversion. - Have a kill switch:
POST /v1/orders/cancel-allis never rate-limited.
5. Rate limits and connections
- Per key and per minute: 600 placements and previews, 60 betslip reads, 600 for everything else, market data included.
- On
429, wait theretry-afterseconds. Spread placements over the minute rather than bursting. - Use the stream for changes and REST for loads. Polling odds in a loop is the usual cause of rate-limit trouble.
- Stay within 8 connections per key and 50 betslip selections per account.
- Check a key before retrying it: 20 failed authentications in a minute lock out your address for the rest of that minute.
6. Monitoring
- Poll
GET /v1/healthevery 15 seconds and alert onunhealthy, and ondegradedforbetPlacement. - Track the delivery hop: your receipt time minus the message
ts. Run NTP. - Track observation delay per bookmaker,
changedAt − bookmakerChangedAt, againstmaxDelayLiveInSecandmaxDelayPregameInSecfromGET /v1/{lang}/bookmakers. - Alert on reconnects,
snapshot_requiredand the share of fixtures flaggedstaleOddsper bookmaker. - Subscribe to the status page.
- Deploy close to the API if latency matters: central Europe.
7. Changes and support
- Follow the changelog. Entries tagged Breaking need action on your side.
- Ignore unknown fields, and handle unknown enum values and error codes gracefully. See Enumerations.
- When you report an issue to contact@apexiumbet.com, include the
x-request-id, theconnectionId, the orderidorclientOrderId, and UTC timestamps.
Ready when
- A forced disconnect recovers through a reload in a time you have measured.
- A lost answer to an order is resolved by resending it, without a second bet.
- A
staleOddsflag stops trading on that bookmaker and fixture without anyone stepping in. - A
429slows your client down instead of breaking it. - Your dashboards show health, delivery hop, observation delay and stale share per bookmaker.