> For the complete documentation index, see [llms.txt](https://exliquid.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://exliquid.gitbook.io/docs/developers/rest-api.md).

# REST API

The REST API is the synchronous integration surface for network discovery, market/account queries, signed transaction submission and confirmation.

The versioned path prefix is:

```
/api/v1
```

The public base URL is listed in [Networks and versions](/docs/reference/networks-and-versions.md) when the network is open.

## Network and transactions

| Method | Path                                 | Purpose                                   |
| ------ | ------------------------------------ | ----------------------------------------- |
| `GET`  | `/status`                            | Network and version status                |
| `GET`  | `/blocks/{height}`                   | Block summary                             |
| `GET`  | `/transactions/{tx_id}`              | Transaction detail or known pending state |
| `GET`  | `/transactions/{tx_id}/confirmation` | Committed confirmation status             |
| `GET`  | `/transactions/{tx_id}/receipts`     | Transaction receipts                      |
| `GET`  | `/transactions/{tx_id}/events`       | Transaction events                        |
| `GET`  | `/validators`                        | Active validator set where exposed        |

## Markets

| Method | Path                       | Purpose                  |
| ------ | -------------------------- | ------------------------ |
| `GET`  | `/markets`                 | List markets             |
| `GET`  | `/markets/{market}`        | Market definition        |
| `GET`  | `/markets/{market}/prices` | Current price references |
| `GET`  | `/markets/{market}/book`   | Order-book snapshot      |
| `GET`  | `/markets/{market}/trades` | Recent trades            |

## Accounts

| Method | Path                                      | Purpose                                  |
| ------ | ----------------------------------------- | ---------------------------------------- |
| `GET`  | `/accounts/{address}/balances`            | Balance state                            |
| `GET`  | `/accounts/{address}/orders`              | Orders, with optional filters/pagination |
| `GET`  | `/accounts/{address}/positions`           | Open positions                           |
| `GET`  | `/accounts/{address}/nonce`               | Nonce for signer/subaccount/domain       |
| `GET`  | `/accounts/{address}/conditional-intents` | Conditional intents                      |
| `GET`  | `/accounts/{address}/risk`                | Account risk state                       |
| `GET`  | `/accounts/{address}/liquidations`        | Liquidations affecting the account       |

## Liquidation and insurance

| Method | Path                      | Purpose                |
| ------ | ------------------------- | ---------------------- |
| `GET`  | `/liquidations`           | Liquidation history    |
| `GET`  | `/liquidations/{id}`      | Liquidation detail     |
| `GET`  | `/insurance-fund`         | Insurance-fund state   |
| `GET`  | `/insurance-fund/history` | Insurance-fund history |

## Authorization and sessions

| Method   | Path                        | Purpose                             |
| -------- | --------------------------- | ----------------------------------- |
| `GET`    | `/authorizations`           | List authorizations                 |
| `GET`    | `/authorizations/{auth_id}` | Authorization detail                |
| `POST`   | `/session/challenges`       | Create wallet session challenge     |
| `POST`   | `/session/verifications`    | Verify challenge and create session |
| `DELETE` | `/session`                  | Revoke current session              |

Account-specific WebSocket channels require an authenticated session when the network configuration enables them.

## Submit a transaction

```
POST /api/v1/transactions
Idempotency-Key: <16-64 character key>
Content-Type: application/json
```

The request contains a complete signed transaction. The server does not invent or alter the user's trading intent after signing.

Important outcomes include:

* `202` — accepted for broadcast/submission processing;
* `400` — malformed or validation error;
* `409` — idempotency conflict or concurrent submission conflict;
* `422` — transaction rejected by the network submission path;
* `429` — rate/admission quota exceeded;
* `503` — required service unavailable.

A timeout or ambiguous submission outcome must be resolved by transaction confirmation before creating a new nonce/action.

See [Errors, retries and idempotency](/docs/developers/errors-retries-idempotency.md).

## Faucet

The testnet contract can expose simulated-collateral Faucet operations under `/faucet/*` when that public surface is enabled.

Faucet balances are simulated test assets and have no external redemption value.

## Schema authority

The exact request/response schemas are defined by the versioned OpenAPI contract shipped with the supported network/API release. This GitBook explains how to use the contract; it should not maintain a second incompatible schema by hand.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://exliquid.gitbook.io/docs/developers/rest-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
