> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apexiumbet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reliability & Operations - Status, recovery, latency, staleness and server location

> How the Apexium API stays available and how your client should operate on it: status page and health check, recovery of the WebSocket and of orders, latency stamps and per-bookmaker freshness, the staleOdds flag, server location, and support.

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.

> [!NOTE]
>
> Uptime targets, support response times and remedies are agreed per account. Contact [contact@apexiumbet.com](mailto:contact@apexiumbet.com) to discuss them.

***

## Status and health

| Signal | Use it for |
| - | - |
| [Status page](https://apexium-v1.instatus.com) | Ongoing incidents, scheduled maintenance and uptime history. Subscribe to be notified. |
| [`GET /v1/health`](https://docs.apexiumbet.com/api-reference/overview#health) | A machine-readable check, without an API key: `healthy`, `degraded` or `unhealthy` per service. Poll it every 15 seconds at most; the result is not refreshed faster. |
| [OddsPapi status page](https://oddspapi-v5.instatus.com) | Incidents of the market data source. The market data of the Apexium API is OddsPapi v5. |

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](https://docs.apexiumbet.com/websocket/feed-channels.md#reload-on-snapshot_required).

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](https://docs.apexiumbet.com/websocket/orders.md#resume).

### 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](https://docs.apexiumbet.com/websocket/close-codes.md) 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](https://docs.apexiumbet.com/guides/idempotency.md).
* **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:

| Stamp | Field | Meaning |
| - | - | - |
| t0 | `bookmakerChangedAt` | The bookmaker's own change time, when it publishes one. |
| t1 | `changedAt` | When OddsPapi observed the change at the bookmaker. |
| t2 | `ts` (envelope) | When Apexium received the message from the feed. |
| t3 | — | When you received it, measured on your side. |

* **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:

| Bookmaker | Slug | In-play | Pregame |
| - | - | -: | -: |
| Polymarket | `polymarket` | 0.05 s | 0.05 s |
| Betfair Exchange | `betfair-ex` | 0.10 s | 0.10 s |
| Pinnacle | `pinnacle` | 0.28 s | 0.28 s |

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](https://docs.oddspapi.io/guides/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](https://docs.apexiumbet.com/websocket/feed-channels). Apexium passes it through unchanged, limited to your bookmakers:

```json theme={null}
{
  "odds": {
    "singbet": {
      "id1100013273682356:singbet:111470:0": {
        "price": 1.952, "active": true, "marketActive": true,
        "changedAt": 1776717657402
      }
    }
  },
  "bookmakers": {
    "singbet": { "bookmaker": "singbet", "hasOdds": true, "suspended": false, "staleOdds": true }
  }
}
```

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:

| Underlying event | What arrives |
| - | - |
| One fixture mismapped | One message: that fixture × that bookmaker |
| Bookmaker-wide block, maintenance or inactivity | One message per fixture of that bookmaker you follow |
| Platform issue (API, your connection) | Not `staleOdds`: `snapshot_required`, a close code, the status page |

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](https://docs.apexiumbet.com/api-reference/limits.md) and WebSocket limits; ask to raise them before you design around them.
* Watch the status page for platform incidents.

The [Go-live checklist](https://docs.apexiumbet.com/guides/go-live.md) turns these into a list to work through before production.

***

## Support and incident reports

| Channel | Use for |
| - | - |
| [contact@apexiumbet.com](mailto:contact@apexiumbet.com) | Technical support, incident reports, API access, raising limits, service terms |
| [Status page](https://apexium-v1.instatus.com) | Live availability and incident updates |

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.