Skip to main content
The Apexium API is built for clients that trade on it. This page explains how it is designed to stay available, the signals it gives you when something is wrong, and what your client should do with each.
Uptime targets, support response times and remedies are agreed per account. Contact contact@apexiumbet.com to discuss them.

Status and health

A degraded API still places orders. Use the per-service states to decide what to pause: betPlacement for new orders, betUpdates for the freshness of bet statuses.

Two independent paths

  • REST and WebSocket reach the same data by separate paths. If the socket drops, /v1/{lang} and /v1/orders keep your state current.
  • Market data and execution are separate too. An interruption of the feed does not stop orders: FEED_UNAVAILABLE and FEED_TIMEOUT concern the market data, UPSTREAM_UNAVAILABLE the bookmaker gateway.

Recovery

Market data on the WebSocket

The feed channels carry changes only, and they have no resume: there is no cursor to replay from. Recovery is always a reload:
  1. Connect and log in first, and keep the messages that arrive.
  2. Load the state from /v1/{lang} and merge it in. Per oddsId, the newer changedAt wins.
  3. On snapshot_required, reload the channels it lists and keep applying messages.
Apexium sends snapshot_required when the feed source was interrupted, or when it fell behind the feed by more than one second: it drops what it could not send in time rather than deliver old prices. A connection gets it at most once every 10 seconds. See Feed channels. After a reconnect, a 4002 close or a 1006 that follows a burst, reload the feed channels the same way: some changes were not delivered.

Orders on the WebSocket

The orders channel does resume. Keep the highest eventId you received and log in again with it as sinceEventId. Up to 1 000 missed changes less than 10 minutes old are replayed; beyond that you get snapshot_required and a fresh snapshot of your orders. See Orders channel.

Restarts and maintenance

  • reconnect frame, then 1012: the server is restarting. Reconnect at once.
  • 1013 public_api_disabled or 503 PUBLIC_API_DISABLED: the API is switched off for maintenance or an incident. Reconnect with backoff and watch the status page.
  • 1006 without a close frame: the connection was cut. Reconnect with backoff.
See Close codes for every code.

Orders over REST

  • Idempotent placement. Every order carries your clientOrderId. Resending the same request returns the same order and never places twice. See Idempotency.
  • Unknown outcome. On 502 UPSTREAM_UNAVAILABLE, or a timeout, the order may or may not exist. Resend the same request with the same clientOrderId to read it.
  • Always cancellable. Cancellations are not rate-limited per key, so you can pull your working orders even when your other budgets are spent.

Latency and freshness

Every odds update carries the timestamps to measure its delay:
  • Observation delay: changedAt − bookmakerChangedAt, per update.
  • Delivery hop: your receipt time minus ts. Run NTP on your servers, or readings under 100 ms mean little.
Apexium relays the odds payloads unchanged, so changedAt and bookmakerChangedAt are OddsPapi’s. Feed messages carry no entryId.

Per-bookmaker freshness

GET /v1/{lang}/bookmakers publishes, per bookmaker, the maximum expected refresh delay of each delivery mode: maxDelayLiveInSec, maxDelayPregameInSec and maxDelayPregameMainInSec. They are measured from observed versus bookmaker change times where the bookmaker publishes usable timestamps, and estimated otherwise. Rolling p50 observation delays of the Apexium bookmakers, as OddsPapi measures them: For 3et (3et), BetAmapola (betamapola), Punter.io (punter.io), Sharp (sharp.ag), SharpBet (sharpbet) and Vertex (vertex), read the live values on GET /v1/{lang}/bookmakers, which also has the current values of the three above. You only receive the bookmakers of your account. How these numbers are produced is in OddsPapi’s latency methodology.

Bookmaker staleness: staleOdds

Two different things can fail: the platform (the API, your connection) and the link to one bookmaker. staleOdds covers the second: it says this bookmaker’s odds on this fixture can no longer be trusted, even while everything else is healthy. It arrives in the bookmakers map next to the odds, in GET /v1/{lang}/fixtures/odds and on the bookmakers channel. Apexium passes it through unchanged, limited to your bookmakers:
The price row looks normal; the verdict is in the map next to it.

What sets it

  1. Lost contact: a block, maintenance or downtime at the bookmaker. Its prices can no longer be observed.
  2. Unusual inactivity: a whole bookmaker shows no odds movement for longer than its threshold, so all its fixtures are marked stale out of caution. A genuinely quiet stretch can set it too: the flag then means “quiet” cannot be told from “broken”.
  3. Mismapping: a fixture found mapped to the wrong bookmaker event is marked stale until it is remapped. Its prices are not old, they are wrong.

One level: fixture × bookmaker

staleOdds is never per market or selection, and never one bookmaker-wide message: Store it keyed by fixtureId:bookmaker. For a bookmaker-wide view, derive it yourself, for example from the share of its fixtures flagged.

What it is not

Not a suspension. suspended is the bookmaker’s own stop on the fixture; active and marketActive on an odds row are its stops on a selection and a market. staleOdds is about the visibility of the bookmaker. Either can be true without the other, and both mean “do not trade this bookmaker right now”.

What to do

  • Pause pricing and ordering on that bookmaker for that fixture.
  • Treat held prices as unvalidated. Do not take a minPrice from them.
  • Resume when the flag returns to false. Every update is the full latest state, so the next updates revalidate your store.
  • Or fall back to another bookmaker of your account of similar sharpness, and back when the flag clears.
The betslip and the price checks of an order still apply at placement: they decide whether a bet is taken. staleOdds tells you not to rely on the market data of that bookmaker to decide what to send.

Server location

The market data comes from OddsPapi, whose infrastructure runs in central Europe and US East. The Apexium API runs in central Europe. For the lowest latency to the Apexium API, deploy your servers in central Europe, for example on Hetzner or in AWS eu-central-1. Servers close to the API receive feed messages and order updates with fewer hops, and get bookmaker answers back sooner.

Your side of operations

  • Check staleOdds per fixtureId:bookmaker before you act on a price.
  • Handle snapshot_required, reconnect and the close codes as described above.
  • Respect the rate limits and WebSocket limits; ask to raise them before you design around them.
  • Watch the status page for platform incidents.
The Go-live checklist turns these into a list to work through before production.

Support and incident reports

When you report an issue, include:
  • the x-request-id header of the failing response;
  • the connectionId of the WebSocket connection, from login_ok or the error frame;
  • the order id or clientOrderId;
  • the endpoints or channels concerned and UTC timestamps.