# REST API

> Read exchange, market, and account state over HTTP.

The REST API is read-only apart from `POST /action`, which is how every state
change is submitted — see [Signed actions](/developers/api/actions). No
authentication is needed for reads.

Base URLs are listed in
[Networks and endpoints](/developers/getting-started/networks). The interactive,
always-current reference is generated from the live schema:
[Nord API and Proton API](/api?api=nord).

## Exchange and markets

| Endpoint | Purpose |
| --- | --- |
| `GET /info` | Markets, tokens, decimals, and IDs — fetch this first |
| `GET /markets/live` | Live pricing state for every market |
| `GET /market/{market_id}/live` | Live pricing state for one market |
| `GET /market/{market_id}/orderbook` | Orderbook snapshot with an `updateId` |
| `GET /market/{market_id}/stats` | Rolling market statistics |
| `GET /market/{market_id}/history/PT1H` | Hourly market history |
| `GET /trades` | Trades, filterable and paginated |
| `GET /order/{order_id}` and `/order/{order_id}/trades` | One order and its fills |
| `GET /tokens/{token_id}/stats` | Token statistics |
| `GET /fee/brackets/info` | Fee tier brackets |
| `GET /timestamp` | Server time, required when signing actions |

## Accounts

| Endpoint | Purpose |
| --- | --- |
| `GET /user/{pubkey}` | Accounts owned by a wallet |
| `GET /account/{account_id}` | Balances, positions, and margin state |
| `GET /account/{account_id}/orders` | Order history |
| `GET /account/{account_id}/orders/open` | Open orders |
| `GET /account/{account_id}/position/summary` | Position summary |
| `GET /account/{account_id}/pnl/summary` | Realized and unrealized PnL |
| `GET /account/{account_id}/history/{kind}` | Paginated history |
| `GET /account/{account_id}/triggers` | Triggers on the account |
| `GET /account/{account_id}/fee/tier` | Effective fee tier |
| `GET /account/{account_id}/fees/withdrawal` | Quoted withdrawal fee |
| `GET /event/last-acked-nonce` | Highest acknowledged nonce for a signer |
| `GET /action/last-executed-id` | Last executed action ID |

History `kind` is one of `deposit`, `withdrawal`, `transfer`, `funding`, `pnl`,
`position`, `liquidation`, `fee-tier`, `vault/deposit`, or `vault/withdrawal`.

Accounts are addressed by numeric account ID, not by wallet address — see
[Accounts and sessions](/developers/getting-started/accounts-and-sessions) for how
to resolve one.

## Vaults

`GET /vaults`, `GET /vault/{vault_id}`,
`GET /vault/{vault_id}/user/{account_id}`, and
`GET /account/{account_id}/vault-user-states`.

## Conventions

- **Scaled integers.** Prices, sizes, and amounts are integers scaled by the
  market's `priceDecimals` / `sizeDecimals` or the token's `decimals`. Read them
  from `/info` and descale before displaying. A `BTCUSD` price of `724336` with
  `priceDecimals: 1` is `72433.6`.
- **Pagination.** History endpoints take `pageSize` and a cursor
  (`startInclusive`), plus `since` / `until` RFC3339 bounds where applicable.
- **Timestamps.** RFC3339 in requests; `/timestamp` is the authority for signing.
- **Schemas.** `GET /openapi.json`, `GET /proton/openapi.json`, and
  `GET /schema.proto` are served by every deployment, so you can generate clients
  and protobuf bindings for the exact version you are talking to.

For anything latency-sensitive, stream instead of polling —
[WebSocket streams](/developers/api/websocket-streams).
