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

# API Overview

The Notional API exposes a unified REST surface plus a WebSocket stream for real-time updates.

## Base URLs

```text theme={null}
REST:      https://api.notional.xyz
WebSocket: wss://ws.notional.xyz
```

## Info Requests

Read-only queries are sent to:

```text theme={null}
POST /info
```

Example:

```json theme={null}
{
  "type": "account",
  "user": "0x1234..."
}
```

Dedicated read replica endpoints use separate paths:

```text theme={null}
POST /portfolio
POST /leaderboard
```

## Exchange Requests

State-changing actions are sent to:

```text theme={null}
POST /exchange
```

Example:

```json theme={null}
{
  "action": {
    "type": "order",
    "orders": [],
    "grouping": "na"
  },
  "nonce": 1701234567890,
  "signature": {
    "r": "0x...",
    "s": "0x...",
    "v": 27
  }
}
```

`reportDeposit` is the only exchange action that does not require a signature.

## Errors

```json theme={null}
{
  "error": "Missing 'action.type' field",
  "code": "MISSING_FIELD",
  "field": "action.type",
  "timestamp": 1701234567890
}
```

Some errors return only the `error` field. `503` responses may also include `retryAfter`.
