Skip to main content
Fetch asset details, prices, OHLCV chart data, and orderbook snapshots.
The examples on this page use Hyperliquid (provider: 'hyperliquid'). Replace the provider value with any supported DEX from getProviders().

getAssets

Returns the token/asset registry for a specified DEX — the base entities referenced by markets (as base/quote legs) and by account balances. Static market metadata (leverage, margin) lives on Market via getMarkets; live data (mark price, funding) lives on MarketContext via getMarketsContext.

Parameters

Returns

AssetsResponse{ assets: Asset[] }: Each Asset: API Reference: GET /assets

getMarkets

Returns all tradeable markets for a specified DEX as static instrument metadata — ids, base/quote assets, decimals, leverage, and margin. Live data (mark price, funding, open interest, volume) comes from getMarketsContext.

Parameters

Returns

MarketsResponse{ markets: Market[] }. A Market is either a PerpsMarket or a SpotMarket; both extend BaseMarket: PerpsMarket adds: Live per-market data (mark price, previous-day price, 24h volume, open interest, funding) comes from getMarketsContext. API Reference: GET /markets

getMarket

Returns a single market by its canonical marketId.

Parameters

Returns

Market — single market object (same shape as above). API Reference: GET /markets

getMarketsContext

Returns live per-market context for all markets: midPrice, markPrice, and (where the venue publishes it) oraclePrice; prevDayPrice, priceChange24h, and volume24h for every market; marketCap where the venue publishes circulating supply; and openInterest and funding for perps. Intended for frequent polling; pair it with the static metadata from getMarkets.

Parameters

Returns

PricesResponse{ prices: MarketContext[] }: Each MarketContext: API Reference: GET /marketsContext

getOhlcv

Returns OHLCV candle data for charts.

Parameters

Returns

OhlcvResponse: Each Candle: API Reference: GET /ohlcv

getOrderbook

Returns current orderbook snapshot with bids and asks.

Parameters

Returns

OrderbookResponse: Each OrderbookLevel: API Reference: GET /orderbook

getMeta

Get platform metadata: the backend version and the list of active platform-level notices. Provider-independent — reads the platform meta surface, so it takes no provider.

Parameters

Returns

Meta{ version: string; notices: Notice[] }. API Reference: GET /meta

getTermsAcceptance

Get the current terms-of-service document (version + full content) and whether a given address has accepted that version. Provider-independent — reads the platform meta surface.

Parameters

Returns

TermsAcceptanceStatus{ termsVersion: string; content: string; accepted: boolean; acceptedAt?: number }. API Reference: GET /meta/terms