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

# Overview

> Unified market data — reference, pricing, and perps primitives across trading venues, blended from on-chain and off-chain sources.

> [!WARNING]
>
> **Alpha** — The Market Data API is in alpha. Schema and response format may change. To request access, [contact us](https://www.allium.so/contact) or reach out to your account manager.

Allium's Market Data API provides a single interface for navigating tradeable markets — reference metadata, latest and historical pricing, and perps primitives (funding, open interest, liquidations) — across trading venues.

## Key Features

> [card] Unified Market Reference
>
> List, filter, and search markets across venues and instrument types with a
> single canonical `market_id`.

> [card] Pricing & Candles
>
> Latest price snapshots and historical OHLCV candles at standard
> institutional intervals.

> [card] Perps Primitives
>
> Funding rates, open interest, and liquidations for perpetual markets.

## Resource model

Market data is organized around two resources:

* **Market** — a tradeable instrument on a specific venue, keyed by a canonical slug `{venue}:{instrument_type}:{pair}`, e.g. `hl:perp:BTC-USDC`, `dydx:perp:ETH-USD`, `hl:spot:HYPE-USDC`.
* **Asset** — a canonical entity (e.g. `asset:bitcoin`) that aggregates a token across all of its deployments and markets. *Asset-keyed endpoints are [coming soon](https://docs.allium.so/api/developer/market-data/assets.md).*

`instrument_type` is one of `perp`, `spot`, or `pred` today. `pred` identifies Hyperliquid prediction markets (`hl:pred:<id>`) — they don't appear in market listings and carry candle data only. `future` and `option` are reserved for future use.

## Supported venues

| Venue | `venue` filter | `market_id` prefix | Instruments |
| - | - | - | - |
| **Hyperliquid** | `hyperliquid` | `hl:` (or `hl-{dex}:` for builder-deployed perp DEXs) | `perp`, `spot`, `pred` |
| **Aster** | `aster` | `aster:` | `perp` |
| **dYdX** | `dydx` | `dydx:` | `perp` |
| **Jupiter Perpetuals** | `jupiter` | `jupiter:` | `perp` |
| **GMX v2** | `gmx-arbitrum`, `gmx-avalanche`, `gmx-botanix` | `gmx-{network}:` | `perp` |

GMX v2 is one venue per chain — the same market on two chains is two markets (e.g. `gmx-arbitrum:perp:BTC-USD` and `gmx-avalanche:perp:BTC-USD`).

The endpoint surface is identical for every venue. Some series are still backfilling for the newest venues: Jupiter and GMX currently serve market metadata and candles. Their price snapshots, funding, and open interest have no data yet, so those endpoints return `404` (price) or an empty `items` array (timeseries) until the ingestion lands — a `404` from a price endpoint means "no data in the freshness window", not "unknown market".

> [!NOTE]
>
> More venues are **coming soon** — major CEX spot venues (Binance, Coinbase,
> Kraken, and others) are already in Allium's ingestion pipeline and will be
> exposed through this API. To request prioritization of a specific venue,
> reach out to your account manager.

The endpoint surface does not change as venues are added — the `venue` dimension simply grows, and the same `market_id` shape extends to new venues.

## Conventions

> [tab] Decimals as strings
>
> All numeric response fields are returned as JSON **strings** to preserve
> precision. Several values (notional, open interest in base units) exceed
> JSON's `2^53` safe-integer range, so parsing them as numbers would silently
> round. Parse them with an arbitrary-precision decimal type.

> [tab] Timestamps
>
> Timestamp inputs are parsed as ISO 8601; a naive datetime (no offset) is
> treated as **UTC**, and a non-UTC offset (e.g. `+05:00`) is normalised to
> UTC. Timestamp outputs always carry an explicit `+00:00` suffix.
>
> Any timestamp the API emits is accepted back as input, so a value copied
> straight out of a response can be replayed. The `+` may be percent-encoded
> as `%2B` or left unescaped — both are understood.

> [tab] Pagination
>
> List endpoints use opaque **cursor** pagination. When a response includes a
> `cursor`, pass it back on the next request to fetch the following page; its
> absence means there are no more results.

## Authentication

All endpoints require an API key passed in the `X-API-KEY` header. The base URL is `https://api.allium.so`.

```bash theme={null}
curl --url "https://api.allium.so/api/v1/markets?venue=hyperliquid&instrument_type=perp" \
  --header "X-API-KEY: YOUR_API_KEY"
```
