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

# Lighter on Robinhood Chain quickstart

> Make a first request to Lighter on Robinhood Chain, served under /v1/rh-lighter, for USDG-quoted perp and spot order books, trades, funding, OI, and freshness.

Make your first request to Lighter on Robinhood Chain: create a key, list the markets, call an order book under `/v1/rh-lighter/*`, and confirm the response shape. Robinhood Chain is Lighter's second deployment; for Lighter mainnet, start with the [Lighter quickstart](/lighter-api-quickstart).

<Steps>
  <Step title="Create a key">
    Open the [dashboard](https://0xarchive.io/dashboard?utm_source=docs\&utm_medium=referral\&utm_campaign=docs_referral\&utm_content=rh_lighter_create_key) and create an API key.
  </Step>

  <Step title="Set it in your shell">
    ```bash theme={"theme":"github-dark"}
    export OXARCHIVE_API_KEY="0xa_your_api_key"
    ```
  </Step>

  <Step title="List the markets">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/rh-lighter/instruments" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```
  </Step>

  <Step title="Call the order book">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/rh-lighter/orderbook/BTC?depth=1" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```
  </Step>

  <Step title="Confirm the result">
    Continue when the request returns HTTP `200`, `success: true`, an order-book object in `data`, and `meta.request_id`.
  </Step>
</Steps>

## Expected response

The Robinhood Chain L2 route returns the same shape as Lighter mainnet: aggregated price levels with decimal-string `px` and `sz` fields and an order count in `n`. Prices are in USDG. The values below show the shape only:

```json theme={"theme":"github-dark"}
{
  "success": true,
  "data": {
    "coin": "BTC",
    "symbol": "BTC",
    "timestamp": "2026-09-25T12:00:00.000Z",
    "bids": [{ "px": "<price>", "sz": "<size>", "n": 1 }],
    "asks": [{ "px": "<price>", "sz": "<size>", "n": 1 }],
    "mid_price": "<price>"
  },
  "meta": {
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
```

Keep the deployment, namespace, symbol, response timestamp, and request ID with the result. A `BTC` result from `/v1/rh-lighter/*` is a different market from `BTC` on `/v1/lighter/*`, and account indexes are not shared between the two deployments.

## Symbols

Perpetual markets use uppercase base symbols such as `BTC` and `ETH`. Spot markets use the base and the USDG quote joined by a dash, such as `AAPL-USDG`:

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/rh-lighter/trades/AAPL-USDG/recent?limit=5" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"
```

Funding, open interest, and liquidations exist only for perpetual markets. There is no L3 route on this deployment: the `l3orderbook` paths return `404`, and the order-book route serves its depth.

## If the call fails

| Code | Meaning and what to do |
| - | - |
| `400` | The symbol is not a Robinhood Chain market, or a depth, window, or other parameter is invalid. Check the route, the parameter value, and the message text before retrying |
| `401` | The API key is missing or invalid. Check `X-API-Key` and the key's status |
| `404` | The route does not exist on this deployment, such as `l3orderbook`, or a positions route names a spot market. Check the namespace and `/v1/rh-lighter/instruments` |
| `429` | A rate, concurrency, or credit limit was reached. Honor `Retry-After`; otherwise back off and reduce concurrency |

Keep `meta.request_id`, or the `x-request-id` response header, with a failed request. [Errors](/errors) covers retry decisions and [Rate limits](/rate-limits) covers capacity.

## Check coverage before widening

Trades and liquidations start at the deployment's first trade, 2026-06-26 20:10:26 UTC. Liquidations from before live capture began on 2026-08-22 carry `source: "bucket"` and an empty `raw_json`: they were backfilled from the venue's finalized export. Order-book, open-interest, and funding history start 2026-08-22 18:43 UTC. Finalized trades trail the present by about a day; `meta.finalized_through` reports the boundary, and `/v1/rh-lighter/trades/{symbol}/recent` serves the preliminary rows after it. Check the exact symbol with `/v1/data-quality/coverage/rh-lighter/{symbol}` and `/v1/rh-lighter/freshness/{symbol}` before relying on a window, and see [Data quality](/data-quality) for the checks.

Positions by account index, now or at any instant from 2026-06-26, are on [Account positions](/rest-api/positions). For live order books, trades, open interest, and funding, use [Lighter on Robinhood Chain channels](/websocket/lighter#lighter-on-robinhood-chain), and [WebSocket replay](/websocket/replay) when event order matters. Parquet files use the [export schemas](/export-schemas).

## Next step

Pick the route for your next pull from the route table in [Lighter on Robinhood Chain REST](/rest-api/rh-lighter).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.