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

# Errors

> [!NOTE]
>
> Perpetual, Lending, Margin Trading, and Vault routes are **Testnet-Only**, so references to them on this page apply to Testnet.

Application REST failures normally use this envelope:

```json theme={null}
{"error":{"code":"BAD_REQUEST","message":"invalid market_id: must be hex-encoded"}}
```

Branch on `code` together with HTTP status. Messages are descriptive and can change.

| HTTP | Common code | Action |
| - | - | - |
| 400 | `BAD_REQUEST` | Fix malformed IDs, addresses, enums, time bounds, depth or cursor filters before retrying |
| 404 | `NOT_FOUND` | A single market, order, pool, asset, position or vault was not found; verify scope and indexing |
| 429 | `RATE_LIMITED` | Back off with jitter and reduce polling |
| 500 | `INTERNAL` | Record request context and retry reads with bounded backoff |
| 503 | `SERVICE_UNAVAILABLE` | Read dependency or cached data unavailable; inspect the endpoint's limitation |

Unregistered routes can return a plain-text 404, and hosted gateways can return non-JSON errors.

## Empty, absent and unavailable

An empty collection normally returns an empty array or wrapper array. A Vault activity/redemption collection first checks the vault exists and can return 404. Null valuations mean insufficient pricing/history, not zero balances or safe risk.

A 503 can mean ticker data, paginated history or a required risk view is temporarily unavailable.
Use bounded backoff and inspect the relevant response state before resuming trading.

List limits are generally capped at their maximum; book depth above 20 is rejected. Follow [Pagination](https://docs.aultblockchain.com/dex-api/getting-started/pagination.md) for each collection instead of assuming one global limit rule.

## Rate limiting

REST reads use a per-client-IP token bucket. The configured requests-per-second and burst are deployment values; no per-key trading quota or cancellation reserve is implied. The application does not guarantee a `Retry-After` header. Cache reference data, bound concurrency, and prefer supported streams for frequently changing data.

[WebSocket errors](https://docs.aultblockchain.com/dex-api/websocket/errors.md) have a different frame format. WebSocket command and connection limits are separate from REST reads and native chain transaction budgets.

## Signed transaction outcomes

These errors belong to the read service. A successful read does not mean a signed order was accepted, included in a block, or filled. A broadcast timeout leaves execution uncertain. Reconcile its hash, orders, fills and balances before signing another attempt, using [Trading Operations](https://docs.aultblockchain.com/dex-api/advanced/trading-operations.md#unknown-submission-result).


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