> ## 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.

# Enumerations - Status IDs, periods, order, bet and settlement statuses

> Every fixed value of the Apexium API in one place: the OddsPapi v5 fixture statusId and period keys of the market data, and the order, bet, settlement, health and cancellation values of the /v1 account endpoints.

This page lists every **fixed vocabulary** of the Apexium API. Two families meet here:

* **Market data** under `/v1/{lang}` and on the feed channels: OddsPapi v5 values, unchanged.
* **Account and execution** endpoints of `/v1`: Apexium's own values for orders, bets, settlement and health.

> [!NOTE]
>
> **The enum contract.** Existing values are **frozen**: they never change meaning and never disappear. New values are only ever **appended**. Handle a value you do not know gracefully: log it and treat it like the closest value you do know, never crash on it.

***

## Market data (OddsPapi v5)

### `statusId`: fixture life cycle

| statusId | Slug | Live | Meaning |
| -: | - | :-: | - |
| `0` | `pregame` | no | Scheduled, has not begun. |
| `1` | `live` | yes | In play. |
| `2` | `finished` | no | Finished; the final scores are available. |
| `3` | `cancelled` | no | Cancelled: it will not be played. |
| `4` | `removed` | no | Withdrawn from the schedule: it should never have existed. |

* **Branch on the ID.** `statusName` is the translated label and follows the `lang` of the path; `statusId` is the stable key.
* **Status only moves forward.** `0 → 1 → 2`, any status → `3`, any status → `4`. It never goes back.
* **`3` vs `4`.** `cancelled` is a real fixture that will not be played: called off, abandoned, postponed indefinitely. `removed` is a fixture that should not have been listed: a duplicate, a test entry, a fixture that was not real.
* **`4` is final.** Any status can move to `4`, `3` included, and a removed fixture stays removed. No scores are published for it. Stop following it.

Your bets on a fixture that becomes `3` or `4` are graded by the bookmakers that took them: see [Settlement status of a bet](#settlement-status-of-a-bet).

### `period`

Scores and markets are keyed by one **generic period vocabulary**, so the same keys work in every sport. What a period means depends on the sport: read the fixture's `expectedPeriods` and `periodLength`. `p1` is a half in soccer, a quarter in NBA basketball, a set in tennis, a map in esports.

**Whole match**

| Value | Meaning |
| - | - |
| `result` | The overall score: the headline scoreline including everything played so far. |
| `fulltime` | Regulation time only, without overtime and penalties. Not every sport has it. |
| `overtime` | The overtime or extra-time segment only. |
| `penalties` | The penalty shootout. Today it carries the score **after** penalties (cumulative), not the shootout alone; OddsPapi will change it to the segment only. |

**Numbered periods**

| Value | Meaning |
| - | - |
| `p1` … `p12` | Period *N* of the sport: half, quarter, set, map, inning or round (`p10` to `p12` cover boxing rounds). |

**Combined segments**: sums of consecutive periods, for markets offered on a combined segment.

| Value | Typical use |
| - | - |
| `p1+p2` | First half in quarter-based sports, such as basketball. |
| `p3+p4` | Second half in quarter-based sports. |
| `p1+p2+p3+p4+p5` | Combined multi-period segment. |
| `fulltime+overtime` | Regulation plus overtime. |
| `p3+p4+overtime` | Second half including overtime. |
| `p4+overtime` | Final period including overtime. |
| `p6+p7+p8+p9+overtime` | Late innings, for example in baseball. |
| `p1o1+p1o2` … `p1o1+…+p1o20` | The first *N* overs of an innings in cricket, innings 1 and 2, *N* up to 20. |

**Sub-periods**: one shape, `p{X}{axis}{Y}`, unit *Y* within period *X*.

| Value | Meaning |
| - | - |
| `p1g1` … `p5g13` | **`g` = game.** Game *Y* of set *X* in tennis: sets 1 to 5, games 1 to 12, and `g13` the tiebreak. Markets use only `g2`, `g4` and `g6`; scores use the full grid. |
| `p1r1` … `p5r36` | **`r` = round.** Round *Y* of map *X* in esports. |
| `p1o1`, `p2o1`, … | **`o` = over.** Over *Y* of innings *X* in cricket. `p1` stays the whole innings. |
| `p1o1b1` … `p2o20b6` | **`b` = ball,** inside an over: delivery *d* of over *n* of innings *i* (`p{i}o{n}b{d}`). The only two-level key. |
| `currentgame` | Pointer to the game **in progress**, for example the current tennis game score. Settled games use the `pXgY` keys. |

> [!WARNING]
>
> The period vocabulary is **append-only**: a new sport can bring new keys and a new axis can join `g`, `r` and `o`. Never hard-code an exhaustive list. Parse the axes you know and ignore the rest. OddsPapi keeps the per-sport table in [Periods per sport](https://docs.oddspapi.io/guides/periods).

### Open taxonomies

These are **string sets that grow** over time. Each value is stable, but the list is never complete:

* **`marketType`**: the kind of market (`1x2`, `totals`, `spreads`, `bothteamsscore`, `players-shots`, …). The full list of a sport is in `GET /v1/{lang}/markets?sportId=…`. See [Markets and outcomes](https://docs.apexiumbet.com/api-reference/market-data.md#markets-and-outcomes).
* **`bookmaker`**: the bookmaker slug (`pinnacle`, `sharpbet`, …). Yours are listed by [`GET /v1/me`](https://docs.apexiumbet.com/api-reference/overview#account).

Treat them as opaque identifiers: match the values you support and ignore the others.

***

## Orders and bets

### Order `status`

| Status | Meaning | Final |
| - | - | :-: |
| `PREVIEW` | Answer of a preview (`mode: "preview"`). Nothing was placed or stored. | n/a |
| `PENDING` | Sent to the bookmakers, nothing filled yet. | no |
| `PARTIALLY_FILLED` | Part of the stake is filled, and some is still being worked. | no |
| `FILLED` | The whole stake is filled, or what the order accepted to fill. | yes |
| `EXPIRED` | `expiresAt` passed before the whole stake filled. | yes |
| `CANCELLED` | Cancelled before it completed, by you or by a bookmaker. | yes |
| `REJECTED` | Nothing filled: every bet was declined. | yes |

`PENDING` and `PARTIALLY_FILLED` are the **working** statuses. Compare `filledStake` with `requestedStake` to know how much of a final order filled. See [Order and bet life cycle](https://docs.apexiumbet.com/guides/order-lifecycle.md).

### Bet `status`

| Status | Meaning |
| - | - |
| `PENDING` | Sent to the bookmaker, no answer yet. |
| `WAITING` | Received by the bookmaker, not confirmed yet, for example during an in-play delay. |
| `PARTIALLY_PLACED` | Part of the bet's stake is accepted, for example on an exchange. |
| `PLACED` | Accepted by the bookmaker. |
| `REJECTED` | Declined by the bookmaker; `declineReason` says why. |
| `CANCELLED` | Cancelled, or expired at the bookmaker, before it was accepted. |
| `SETTLED` | Graded by the bookmaker; see `settlement`. |

### Settlement status of a bet

`settlement.status` grades a bet. `settlement.amount` is your profit or loss on it.

| Value | Meaning |
| - | - |
| `UNSETTLED` | Not graded yet. |
| `WON` | Won: full payout. |
| `LOST` | Lost. |
| `VOID` | Voided by the bookmaker, for example a cancelled fixture or a market that was not actionable: stake returned. |
| `HALF_WON` | Half the stake wins, half is returned (Asian quarter lines). |
| `HALF_LOST` | Half the stake loses, half is returned (Asian quarter lines). |
| `PUSH` | Tie on the line: stake returned. |
| `CASHOUT` | Closed early by a cash-out at the bookmaker. |

### Order fields

| Field | Values |
| - | - |
| `mode` | `preview`, `place`. Required; there is no default. |
| `side` | `back`. Laying is not available in v1. |

### Cancellation outcomes

| Field | Value | Meaning |
| - | - | - |
| `remainder` | `cancelled` | The expiry remainder was being worked and is now stopped. |
| | `alreadyTerminal` | The remainder had already ended: filled, expired or cancelled. |
| | `none` | The order has no expiry, so there is no remainder. |
| `cancellation` (per bet) | `cancelled` | The bet was cancelled before the bookmaker accepted it. |
| | `alreadyTerminal` | The bet had already ended: rejected or settled. |
| | `notRecallable` | The bookmaker accepted the bet; it stands and will settle. |

See [Cancellation](https://docs.apexiumbet.com/guides/cancellation.md).

### Grouping

| Endpoint | `groupBy` |
| - | - |
| `GET /v1/positions` | `outcome`, `fixture`, `bookmaker` |
| `GET /v1/pnl` | `day`, `bookmaker`, `sport`, `tournament` |

***

## Platform

### Health

`GET /v1/health` gives each service and the API as a whole one of:

| Value | Meaning |
| - | - |
| `healthy` | Working normally. |
| `degraded` | Working, with reduced performance or a failing dependency. A degraded API still places orders. |
| `unhealthy` | Not working. The endpoint answers `503`. |

The services are `database`, `caching`, `betPlacement` and `betUpdates`. `status` is the worst of them. See [Health](https://docs.apexiumbet.com/api-reference/overview.md#health) and [Reliability](https://docs.apexiumbet.com/api-reference/reliability.md).

### Languages

`lang` in `/v1/{lang}`: `en`, `es`, `fr`, `pt`, `de`, `it`, `ru`, `zh`.

### Error codes and close codes

* **Error codes**: every `code` with its HTTP status and whether to retry is in [Errors](https://docs.apexiumbet.com/api-reference/errors.md).
* **WebSocket close codes**: `4001` to `4004` and `1011` to `1013`, with what to do for each, are in [Close codes](https://docs.apexiumbet.com/websocket/close-codes.md).


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