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

# API reference

> Interactive reference for every XOXNO endpoint, covering REST APIs with playground, WebSocket actions, and event schemas.

XOXNO provides three REST services and one WebSocket service. All use JSON encoding and require no authentication.

## REST APIs

Each endpoint includes an interactive playground with request builder and live responses. Select an endpoint from the sidebar to try it.

### Relayer API

Base URL: `https://relayer.xoxno.com`

| Method | Endpoint                    | Description                                                    |
| ------ | --------------------------- | -------------------------------------------------------------- |
| `POST` | `/v1/broadcast`             | Submit pre-signed transactions for direct P2P broadcast        |
| `POST` | `/v1/sign`                  | Enterprise: co-sign gasless transactions with the Relayer (V3) |
| `GET`  | `/v1/network-stats/history` | Fetch historical network statistics                            |

### Aggregator API

Base URL: `https://swap.xoxno.com`

| Method | Endpoint              | Description                                         |
| ------ | --------------------- | --------------------------------------------------- |
| `GET`  | `/api/v1/quote`       | Compute swap routes with ready-to-sign transactions |
| `GET`  | `/api/v1/pair-config` | Validate token pairs and check decimal precision    |
| `GET`  | `/health`             | Service health check                                |

### Gateway API

Base URL: `https://rust-gateway.xoxno.com`

80 endpoints across 13 categories. The sidebar provides a full interactive playground.

| Category    | Endpoints | Examples                                         |
| ----------- | --------- | ------------------------------------------------ |
| Address     | 18        | Account data, balance, ESDT tokens, storage keys |
| Transaction | 9         | Send, simulate, status, pool                     |
| Network     | 18        | Config, economics, token supply, staking         |
| Block       | 5         | By nonce, by hash, altered accounts              |
| Hyperblock  | 2         | Cross-shard unified blocks                       |
| VM values   | 4         | Smart contract queries                           |
| Validator   | 2         | Statistics, auction list                         |
| Other       | 22        | Node, proof, internal, status, about             |

## WebSocket API

A full-duplex connection for streaming data and submitting transactions.

<CardGroup cols={2}>
  <Card title="subscribe" icon="bell" href="/api-reference/ws/subscribe">
    Subscribe to real-time topics: gas stats, network stats, account deltas, and tx status.
  </Card>

  <Card title="unsubscribe" icon="bell-slash" href="/api-reference/ws/unsubscribe">
    Remove an active topic subscription.
  </Card>

  <Card title="broadcast" icon="radio" href="/api-reference/ws/broadcast">
    Submit pre-signed transactions for P2P broadcast via WebSocket.
  </Card>

  <Card title="relay" icon="zap" href="/api-reference/ws/relay">
    Enterprise: co-sign and broadcast gasless transactions via the Relayer.
  </Card>
</CardGroup>

## Event schemas

The server pushes these payloads to your connection after you subscribe.

<CardGroup cols={2}>
  <Card title="gasStats" icon="chart-bar" href="/api-reference/events/gas-stats">
    Per-shard gas prices with percentile breakdowns, every 50 ms.
  </Card>

  <Card title="networkStats" icon="globe" href="/api-reference/events/network-stats">
    Full network snapshot: TPS, blocks, mempool, validators, health.
  </Card>

  <Card title="accountDelta" icon="user" href="/api-reference/events/account-delta">
    Balance and nonce changes for subscribed addresses.
  </Card>

  <Card title="txStatus" icon="circle-check" href="/api-reference/events/tx-status">
    Transaction confirmation events with status and optional reason.
  </Card>
</CardGroup>

## Base URLs

| Protocol  | Endpoint                           | Purpose                         |
| --------- | ---------------------------------- | ------------------------------- |
| WebSocket | `wss://relayer.xoxno.com/ws`       | Subscriptions, broadcast, relay |
| WebSocket | `wss://relayer.xoxno.com/ws/stats` | Read-only network stats stream  |
| REST      | `https://relayer.xoxno.com`        | Relayer endpoints               |
| REST      | `https://swap.xoxno.com`           | Aggregator endpoints            |
| REST      | `https://rust-gateway.xoxno.com`   | Gateway RPC endpoints           |
