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

# Overview

> Base URL, authentication, and error model for the Ledger API

## Base URL

```
https://ledger.predexon.com
```

## Authentication

Same `x-api-key` model as the rest of Predexon. One API key may own multiple Ledger accounts.

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  https://ledger.predexon.com/v1/accounts
```

## Errors

All errors return a JSON body with an `error` field.

| Status | Meaning                                                                  |
| ------ | ------------------------------------------------------------------------ |
| 400    | Invalid request, insufficient available balance, or invalid `predexonId` |
| 401    | Missing or invalid API key                                               |
| 403    | Account not owned by this API key                                        |
| 404    | Account, order, trade, position, or withdrawal not found                 |
| 409    | Concurrent modification (e.g., order cancelled mid-fill)                 |
| 429    | Rate limited                                                             |
| 503    | No liquidity available for this market right now                         |

Retry `5xx` with exponential backoff. Do not retry `4xx` — the request itself needs to change.
