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

# Error Codes

> Reference of all error codes returned by the SX Bet API.

## Overview

When a request fails, the API returns an `errorCode` field in the response body alongside `"status": "failure"`. This page lists every error code by endpoint.

```json theme={null}
{
  "status": "failure",
  "errorCode": "INVALID_ODDS"
}
```

## POST /orders/new

These are returned in the `statuses` array for each submitted order. See [`POST /orders/new`](/api-reference/post-new-order).

| Status                 | Description                         |
| ---------------------- | ----------------------------------- |
| `OK`                   | Order created successfully          |
| `INSUFFICIENT_BALANCE` | Insufficient maker token balance    |
| `INVALID_MARKET`       | Non-unique `marketHashes` specified |
| `ORDERS_ALREADY_EXIST` | The order already exists            |

Request-level errors:

| Error code                          | Description                                          |
| ----------------------------------- | ---------------------------------------------------- |
| `TOO_MANY_DIFFERENT_MARKETS`        | More than 3 different markets in a single request    |
| `ORDERS_MUST_HAVE_IDENTICAL_MARKET` | All orders must be for the same network (SXN or SXR) |
| `BAD_BASE_TOKEN`                    | All orders must be for the same base token           |

## POST /orders/fill/v2

See [`POST /orders/fill/v2`](/api-reference/post-fill-order).

| Error code                   | Description                                                                                |
| ---------------------------- | ------------------------------------------------------------------------------------------ |
| `INSUFFICIENT_KYC`           | The taker has not met the minimum KYC level to fill                                        |
| `AFTER_ORDER_EXPIRY`         | One of the orders has expired                                                              |
| `BASE_TOKENS_NOT_SAME`       | All orders must be for the same `baseToken`                                                |
| `MARKETS_NOT_SAME`           | All orders must be for the same market                                                     |
| `DIRECTIONS_NOT_SAME`        | All orders must be betting on the same side (`isMakerBettingOutcomeOne`)                   |
| `INVALID_ORDERS`             | Order is now inactive                                                                      |
| `INVALID_ODDS`               | Invalid `desiredOdds` — must be less than 10^20                                            |
| `INVALID_ODDS_SLIPPAGE`      | Invalid `oddsSlippage` — must be an integer between 0 and 100                              |
| `MATCH_STATE_INVALID`        | The fixture is in an invalid state and is no longer bettable                               |
| `TAKER_SIGNATURE_MISMATCH`   | The taker signature generated for the request is invalid                                   |
| `PROXY_ACCOUNT_INVALID`      | The proxy account is invalid (only applicable if `proxyTaker` was specified)               |
| `TAKER_AMOUNT_TOO_LOW`       | The `stakeWei` specified is too low for the current token                                  |
| `META_TX_RATE_LIMIT_REACHED` | Cannot have more than 10 meta transactions at once                                         |
| `INSUFFICIENT_SPACE`         | Not enough space to fill the matched orders due to other pending fills                     |
| `FILL_ALREADY_SUBMITTED`     | The fill has already been submitted                                                        |
| `ODDS_STALE`                 | No orders found for the `desiredOdds` and `oddsSlippage` — try again with greater slippage |

## POST /orders/cancel

See [`POST /orders/cancel`](/api-reference/post-cancel-orders).

| Error code                         | Description                                  |
| ---------------------------------- | -------------------------------------------- |
| `CANCEL_REQUEST_ALREADY_PROCESSED` | This cancellation has already been processed |

## POST /orders/cancel/event

See [`POST /orders/cancel/event`](/api-reference/post-cancel-event).

| Error code                         | Description                                  |
| ---------------------------------- | -------------------------------------------- |
| `CANCEL_REQUEST_ALREADY_PROCESSED` | This cancellation has already been processed |

## POST /orders/cancel/all

See [`POST /orders/cancel/all`](/api-reference/post-cancel-all).

| Error code                         | Description                                  |
| ---------------------------------- | -------------------------------------------- |
| `CANCEL_REQUEST_ALREADY_PROCESSED` | This cancellation has already been processed |

## GET /orders

See [`GET /orders`](/api-reference/get-orders).

| Error code                                | Description                                                                |
| ----------------------------------------- | -------------------------------------------------------------------------- |
| `RATE_LIMIT_ORDER_REQUEST_MARKET_COUNT`   | More than 1,000 `marketHashes` queried                                     |
| `BOTH_SPORTXEVENTID_MARKETHASHES_PRESENT` | Cannot send both `marketHashes` and `sportXEventId` — use one or the other |

## GET /markets/find

See [`GET /markets/find`](/api-reference/get-markets-find).

| Error code          | Description                                                   |
| ------------------- | ------------------------------------------------------------- |
| `BAD_MARKET_HASHES` | Invalid `marketHashes` or more than 30 `marketHashes` queried |
