Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: 0xArchive Lighter on Robinhood Chain - Candles API
description: 'REST API for current and historical market data from Hyperliquid and Lighter. Hyperliquid coverage includes core perpetuals, Spot, HIP-3 builder perpetuals, and HIP-4 outcome markets. Lighter coverage includes two deployments: Lighter mainnet under /v1/lighter and Lighter on Robinhood Chain under /v1/rh-lighter. Account positions are available for Hyperliquid core, HIP-3, and both Lighter deployments. Coverage and access requirements vary by route. See https://docs.0xarchive.io/ for authentication, limits, and examples.'
version: 1.9.0
termsOfService: https://0xarchive.io/terms
contact:
name: 0xArchive Support
url: https://0xarchive.io
email: support@0xarchive.io
license:
name: Proprietary
url: https://0xarchive.io/terms
servers:
- url: https://api.0xarchive.io
description: Production API
security:
- ApiKeyAuth: []
tags:
- name: Lighter on Robinhood Chain - Candles
description: 'Lighter on Robinhood Chain OHLCV candles derived from canonical trades from June 26, 2026. Intervals: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w. The route answers with an error until candles are enabled for this deployment.'
paths:
/v1/rh-lighter/candles/{symbol}:
parameters:
- $ref: '#/components/parameters/ApiVersion'
get:
tags:
- Lighter on Robinhood Chain - Candles
summary: Get Lighter on Robinhood Chain OHLCV candles
description: 'Get Lighter on Robinhood Chain OHLCV candles derived from canonical trades, from June 26, 2026. Supports intervals from 1 minute to 1 week. Until candles are enabled for this deployment the route answers with an error instead of empty data.
**Available Intervals:** 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w
**Pagination:** Use the `cursor` parameter with the value from the previous response''s `next_cursor` for efficient pagination.'
operationId: getRhLighterCandles
parameters:
- name: symbol
in: path
required: true
schema:
type: string
example: BTC
description: Market symbol on Lighter on Robinhood Chain. Perpetuals use the uppercase base symbol (BTC); spot pairs are dashed and USDG-quoted (AAPL-USDG). List markets with GET /v1/rh-lighter/instruments.
example: BTC
- name: start
in: query
description: Start timestamp. Defaults to 24h ago. Accepts Unix milliseconds or an RFC 3339 UTC string such as `2026-01-01T00:00:00Z`.
schema:
$ref: '#/components/schemas/TimeInput'
- name: end
in: query
description: End timestamp. Defaults to now. Accepts Unix milliseconds or an RFC 3339 UTC string such as `2026-01-01T00:00:00Z`.
schema:
$ref: '#/components/schemas/TimeInput'
- name: interval
in: query
description: 'Candle interval (default: 1h)'
schema:
type: string
enum:
- 1m
- 5m
- 15m
- 30m
- 1h
- 4h
- 1d
- 1w
default: 1h
- name: cursor
in: query
description: 'Opaque pagination cursor: pass `meta.next_cursor` from the previous page unchanged, with the same filters. Omit it for the first page.'
schema:
type: string
- name: limit
in: query
description: 'Maximum number of candles (default: 100, max: 10000).'
schema:
type: integer
default: 100
maximum: 10000
minimum: 1
responses:
'200':
description: List of OHLCV candles with cursor for next page
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponseCandleArray'
headers:
0xArchive-Version:
$ref: '#/components/headers/ApiVersion'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
default:
$ref: '#/components/responses/Error'
components:
schemas:
ApiResponseCandleArray:
type: object
description: API response containing an array of candle data
properties:
success:
type: boolean
example: true
data:
type: array
items:
$ref: '#/components/schemas/Candle'
meta:
$ref: '#/components/schemas/ResponseMeta'
ErrorResponse:
type: object
description: Body of every non-2xx JSON response. `code` repeats the HTTP status, `error_code` is the stable machine-readable code (see `ErrorCode`), `error` is a human-readable message, and `request_id` identifies the request for support. Validation failures add `param` and, where the accepted set is fixed, `valid_values`. A 404 for a datatype the venue does not offer (`unsupported_for_venue`) adds `venue`, `datatype` and `available_on`; any other unknown path answers 404 `route_not_found`.
required:
- success
- code
- error_code
- error
- request_id
properties:
success:
type: boolean
enum:
- false
description: Always `false` on an error.
code:
type: integer
description: HTTP status code.
example: 400
error_code:
$ref: '#/components/schemas/ErrorCode'
error:
type: string
description: Human-readable message. Wording can change; do not parse it.
request_id:
type: string
format: uuid
description: Unique request ID for support.
param:
type: string
description: The parameter that failed validation, when one did.
example: side
valid_values:
type: array
items:
type: string
description: Accepted values of `param`, when the set is fixed.
example:
- buy
- sell
venue:
type: string
description: '`unsupported_for_venue` only: the venue the request asked.'
example: spot
datatype:
type: string
description: '`unsupported_for_venue` only: the datatype the request asked for, as `GET /v1/capabilities` names it.'
example: order_flow
available_on:
type: array
description: '`unsupported_for_venue` only: the venues and routes that serve the datatype.'
items:
type: object
required:
- venue
- route
properties:
venue:
type: string
example: hyperliquid
route:
type: string
example: /v1/hyperliquid/orders/{symbol}/flow
credits_used:
type: integer
format: int64
description: '`insufficient_credits` only: credits used this period.'
credits_limit:
type: integer
format: int64
description: '`insufficient_credits` only: the period''s credit allowance.'
max_concurrent:
type: integer
description: '`rate_limited` concurrency refusals only: simultaneous queries the plan allows.'
suggestion:
type: object
description: 'Present when the symbol exists on another venue: where to request it instead.'
properties:
venue:
type: string
example: hip3
symbol:
type: string
example: xyz:TSLA
endpoint:
type: string
example: /v1/hyperliquid/hip3/trades/xyz:TSLA
Candle:
type: object
description: OHLCV candle data
required:
- timestamp
- open
- high
- low
- close
- volume
properties:
timestamp:
type: string
format: date-time
description: Candle start timestamp (ISO 8601 UTC)
example: '2026-01-01T12:00:00Z'
open:
type: number
format: double
description: Opening price
example: 42500.5
high:
type: number
format: double
description: Highest price during interval
example: 42750
low:
type: number
format: double
description: Lowest price during interval
example: 42300.25
close:
type: number
format: double
description: Closing price
example: 42650.75
volume:
type: number
format: double
description: Trading volume in base asset
example: 1250.5
quote_volume:
type: number
format: double
description: Trading volume in quote asset (USD)
example: 53187500
trade_count:
type: integer
description: Number of trades in interval
example: 4520
ErrorCode:
type: string
description: 'Stable, machine-readable error code. Branch on this value, not on the `error` text.
**Contract codes**
| Code | HTTP | Meaning |
|---|---|---|
| `invalid_parameter` | 400 | A parameter failed to parse or validate. `param` names it and `valid_values` lists accepted values where the set is fixed. |
| `invalid_symbol` | 400 | The symbol is not listed on this venue. |
| `invalid_interval` | 400 | The `interval` (bucket width) is not one this route accepts. |
| `invalid_cursor` | 400 | The `cursor` is malformed, stale, or was issued for other filters. Restart pagination without a cursor. Trades, liquidations, L2 and L4 diffs, order history and TP/SL routes currently return the first page for a malformed cursor instead. |
| `invalid_time_range` | 400 | `start` is after `end`, or a time value could not be parsed. |
| `range_before_coverage` | 400 | The whole requested range ends before the first instant this dataset is served from. |
| `historical_range_exceeded` | 403 | The requested span is longer than the plan allows in one request or replay. |
| `historical_depth_exceeded` | 403 | The request reaches further back than the plan''s history window. |
| `unsupported_for_venue` | 404 | The venue does not offer this datatype. The message, `datatype` and `available_on` name where it is served. |
| `route_not_found` | 404 | No route matches the path or method. `GET /v1/capabilities` lists the routes each venue serves. |
| `not_found` | 404 | The route exists but the requested resource (for example an incident, endpoint or outcome id) does not. |
| `unauthorized` | 401 | The API key is missing or invalid. |
| `forbidden` | 403 | The key is valid but not allowed to make this request. |
| `insufficient_credits` | 429 | The monthly credit allowance is spent (402 on pay-per-request routes). |
| `rate_limited` | 429 | Too many requests or concurrent queries. Retry after the interval in the rate-limit headers. |
| `conflict` | 409 | The request conflicts with the current state of the resource. |
| `upstream_unavailable` | 503 | A dependency is unavailable or saturated. Retry shortly; the response carries `Retry-After`. |
| `internal_error` | 500 | An unexpected server error. Quote `request_id` when contacting support. |
**WebSocket only** (sent in `{"type":"error"}` messages, never by REST)
| Code | Where | Meaning |
|---|---|---|
| `endpoint_unsupported` | WebSocket | This WebSocket endpoint does not serve the channel or operation. The message names the endpoint that does. |
| `slow_consumer` | WebSocket | The connection fell behind a stream and messages were dropped. Re-subscribe, or restart the replay, to resynchronise. |
**Route-specific codes**
| Code | HTTP | Meaning |
|---|---|---|
| `positions_unavailable` | 503 | Account positions are temporarily unavailable for this venue. |
| `reconstruction_unavailable` | 503 | The as-of positions state for this instant cannot be reconstructed right now. |
| `snapshot_advanced` | 409 | A positions market cursor pinned a snapshot that has since been replaced or expired. Restart pagination. |
| `pagination_unavailable` | 503 | The next positions page cannot be served right now. Retry the same cursor shortly. |
| `api_key_limit_reached` | 403 | The account already holds the maximum number of API keys for its plan. |
| `wallet_requires_plan` | 402 | A wallet-authenticated key needs an active plan for this request. |
| `wallet_account_required` | 403 | Wallet sign-in needs an existing account linked to the wallet. |
| `wallet_free_signup_retired` | 410 | Free wallet sign-up is no longer offered. |
| `account_disabled` | 403 | The account is disabled. |
| `oauth_not_permitted` | 403 | This route is not available to OAuth access tokens. |
| `insufficient_scope` | 403 | The OAuth access token lacks the scope this route requires. |
**Legacy names.** Requests without `0xArchive-Version: 2026-10-01` keep the four names that predate the contract; with the header they receive the contract names instead.
| Code | HTTP | Meaning |
|---|---|---|
| `invalid_query_params` | 400 | Legacy name of `invalid_parameter` (query parameter), or of `invalid_cursor` when the parameter is `cursor`, sent without the version header. |
| `invalid_path_params` | 400 | Legacy name of `invalid_parameter` (path parameter), sent without the version header. |
| `history_window_exceeded` | 403 | Legacy name of `historical_depth_exceeded`, sent without the version header. |
| `request_range_exceeded` | 403 | Legacy name of `historical_range_exceeded`, sent without the version header. |
Treat any value not listed here as a generic error of the HTTP status.'
enum:
- invalid_parameter
- invalid_symbol
- invalid_interval
- invalid_cursor
- invalid_time_range
- range_before_coverage
- historical_range_exceeded
- historical_depth_exceeded
- unsupported_for_venue
- route_not_found
- not_found
- unauthorized
- forbidden
- insufficient_credits
- rate_limited
- conflict
- upstream_unavailable
- internal_error
- endpoint_unsupported
- slow_consumer
- positions_unavailable
- reconstruction_unavailable
- snapshot_advanced
- pagination_unavailable
- api_key_limit_reached
- wallet_requires_plan
- wallet_account_required
- wallet_free_signup_retired
- account_disabled
- oauth_not_permitted
- insufficient_scope
- invalid_query_params
- invalid_path_params
- history_window_exceeded
- request_range_exceeded
example: invalid_parameter
ResponseMeta:
type: object
description: Response metadata. Every 2xx JSON response carries `meta.request_id`; list payloads add `count`; cursor-paged routes add `has_more` and, when another page follows, `next_cursor`; per-symbol routes add `symbol` and `venue`. Fields that do not apply to a route are omitted.
properties:
count:
type: integer
description: Number of records returned
has_more:
type: boolean
description: 'Cursor-paged routes: whether another page follows. `next_cursor` is present exactly when this is `true`. A final page can be empty when the previous page was exactly full; `has_more` is `false` on it.'
next_cursor:
type: string
description: Opaque cursor for the next page, present exactly when `has_more` is `true`. Pass it back unchanged as `cursor` with the same filters. Do not parse or construct it.
request_id:
type: string
format: uuid
description: Unique request ID for support
symbol:
type: string
description: 'Per-symbol routes: the canonical public symbol the response describes (for example `BTC`, `xyz:TSLA`, `HYPE-USDC`, `#0`).'
example: BTC
venue:
type: string
enum:
- hyperliquid
- hip3
- hip4
- spot
- lighter
- rh-lighter
description: 'Per-symbol routes: the venue the response describes.'
example: hyperliquid
coverage_from:
type: string
format: date-time
description: Earliest coverage for the requested symbol and data type. Present only when the requested window ends before coverage begins.
notice:
type: string
description: Human-readable advisory about the response. Used when the requested window ends before coverage begins for the symbol, and on CVD responses that are one page of several; may carry other advisories in future.
finalized_through:
type: string
format: date-time
description: 'Two-tier datasets (Lighter trades): data at or before this instant is final; later data is preliminary.'
requested_end:
type:
- string
- 'null'
format: date-time
description: The `end` the request asked for, echoed when it was clamped to `finalized_through`.
clamped_to:
type:
- string
- 'null'
format: date-time
description: The boundary the request's `end` was clamped to, when clamping occurred.
preliminary_row_count:
type:
- integer
- 'null'
description: Number of preliminary rows in this response, on routes that intentionally serve preliminary data (Lighter `/recent`).
required:
- request_id
TimeInput:
description: 'An instant: Unix milliseconds, or an RFC 3339 string such as `2026-01-01T00:00:00Z` (encode a `+` offset as `%2B`). An unparsable value answers 400 `invalid_time_range`.'
oneOf:
- type: integer
format: int64
description: Unix milliseconds.
example: 1767225600000
- type: string
format: date-time
description: RFC 3339 instant.
example: '2026-01-01T00:00:00Z'
headers:
ApiVersion:
description: The contract version the response was shaped with. Present only when the request sent `0xArchive-Version`.
schema:
type: string
enum:
- '2026-10-01'
example: '2026-10-01'
RetryAfter:
description: Seconds to wait before retrying.
schema:
type: integer
example: 2
responses:
Unauthorized:
description: 'Authentication required: the API key is missing or invalid.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
success: false
code: 401
error_code: unauthorized
error: Missing authentication credentials. Provide X-API-Key header or Bearer token.
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
headers:
0xArchive-Version:
$ref: '#/components/headers/ApiVersion'
Error:
description: Any other error. The body is an `ErrorResponse`; branch on `error_code`. A 503 (`upstream_unavailable`) carries `Retry-After`.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
upstream_unavailable:
value:
success: false
code: 503
error_code: upstream_unavailable
error: The service is temporarily unavailable. Retry shortly.
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
internal_error:
value:
success: false
code: 500
error_code: internal_error
error: Internal server error
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
0xArchive-Version:
$ref: '#/components/headers/ApiVersion'
RateLimited:
description: Rate limit, concurrency limit or monthly credits exceeded. See `error_code`.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
rate_limited:
value:
success: false
code: 429
error_code: rate_limited
error: Rate limit exceeded
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
insufficient_credits:
value:
success: false
code: 429
error_code: insufficient_credits
error: Monthly credit limit exceeded. Please upgrade your plan.
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
credits_used: 50000
credits_limit: 50000
headers:
X-RateLimit-Limit:
schema:
type: integer
description: Requests per second limit
X-RateLimit-Remaining:
schema:
type: integer
description: Remaining requests this second
X-RateLimit-Reset:
schema:
type: integer
description: Unix timestamp when limit resets
0xArchive-Version:
$ref: '#/components/headers/ApiVersion'
Forbidden:
description: The request is outside the plan's history window or per-request span, or the key is not allowed to make it.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
historical_depth_exceeded:
value:
success: false
code: 403
error_code: historical_depth_exceeded
error: 'Your plan includes the most recent 30 days of history: this request starts at 2026-01-01T00:00:00Z, before the earliest allowed timestamp 2026-08-30T00:00:00Z. Requests cannot be chunked across the age boundary.'
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
historical_range_exceeded:
value:
success: false
code: 403
error_code: historical_range_exceeded
error: Maximum range is 30 days per request on your plan. Requested range is 45 days.
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
headers:
0xArchive-Version:
$ref: '#/components/headers/ApiVersion'
BadRequest:
description: 'Invalid request: a parameter, symbol, interval, cursor or time range failed validation. See `error_code`.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
invalid_parameter:
value:
success: false
code: 400
error_code: invalid_parameter
error: Invalid side 'up'. Use buy or sell.
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
param: side
valid_values:
- buy
- sell
invalid_symbol:
value:
success: false
code: 400
error_code: invalid_symbol
error: The symbol 'ZZZ' does not exist. Please see /v1/hyperliquid/instruments for available symbols.
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
param: symbol
invalid_time_range:
value:
success: false
code: 400
error_code: invalid_time_range
error: start must be <= end
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
legacy_invalid_query_params:
value:
success: false
code: 400
error_code: invalid_query_params
error: 'Failed to deserialize query string: limit: invalid digit found in string'
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
current_main:
value:
code: 400
error: 'Failed to deserialize query string: limit: invalid digit found in string'
error_code: invalid_query_params
param: limit
request_id: 3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05
success: false
headers:
0xArchive-Version:
$ref: '#/components/headers/ApiVersion'
parameters:
ApiVersion:
name: 0xArchive-Version
in: header
required: false
description: 'Selects the 2026-10 response contract. Send `2026-10-01`; any dated version on or after it selects the same shapes. Without the header every response keeps its existing shape. With it:
- The data quality routes, `/v1/status/coverage` and `/v1/symbols` answer the standard `{success, data, meta}` envelope.
- Record times that are integer milliseconds by default become RFC 3339 UTC strings with millisecond precision, and the integer moves to a `*_ms` field: L4 resting-order `timestamp` (`timestamp_ms`), CVD buckets, HIP-3 oracle reads, Lighter and Lighter on Robinhood Chain liquidations and liquidation volume. Levels and trigger-levels `snapshot_ts` become RFC 3339 with `snapshot_ts_ms`.
- Error bodies carry the contract `error_code` names: `invalid_parameter` instead of `invalid_query_params` and `invalid_path_params`, `historical_depth_exceeded` instead of `history_window_exceeded`, and `historical_range_exceeded` instead of `request_range_exceeded`; a malformed cursor that fails to parse answers 400 `invalid_cursor` instead of `invalid_query_params`. With `0xArchive-Version: 2026-10-01`, malformed cursors on trades, liquidations, L2 and L4 diffs, order history, TP/SL and order-flow routes answer 400 `invalid_cursor`. Without the header, the first six route families treat a malformed cursor as no cursor and return the first page; order flow answers 400 `invalid_query_params`. Malformed trade time inputs answer 400 `invalid_time_range` with the header and 400 `invalid_query_params` without it.
The response echoes the selected version in its own `0xArchive-Version` header.'
schema:
type: string
enum:
- '2026-10-01'
example: '2026-10-01'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: API key for authentication. Get yours at https://0xarchive.io/dashboard
externalDocs:
description: 0xArchive Developer Docs
url: https://docs.0xarchive.io/
x-0xarchive-docs-language-overlay:
name: data-quality-supported-venue-language
reason: Public OpenAPI language must describe supported venue-family coverage instead of broad exchange coverage.
updated_at: '2026-05-24'
remove_when: Public source OpenAPI uses supported venue-family wording for data-quality coverage and latency descriptions.
x-0xarchive-docs-overlay:
name: hyperliquid-spot
reason: Hyperliquid Spot routes are included in the local REST contract.
source: live endpoint behavior and public CLI/MCP/Skill surface truth
updated_at: '2026-05-08'
remove_when: Public source contract includes the same Spot route family.