Market data
Add market discovery and reference charts without connecting a wallet.
On this page
Read a market
Public data client
import { create_depth_data } from "@depthhq/sdk/data";
const data = create_depth_data({ environment: "devnet" });
const market = await data.market("SOL-USD");
const candles = await data.candles("SOL-USD", {
interval: "15m",
limit: 200,
});Subscribe to updates
Reference price stream
const stop = data.subscribe({
marketId: "SOL-USD",
interval: "15m",
onUpdate: (page) => updateChart(page.items),
onError: (error) => showDataError(error),
});
// Call when the chart unmounts.
stop();Understand the price sources
Candles are SOL reference prices from Hyperliquid. They do not represent Depth executions, trading volume, or open interest. The market’s pinned Pyth oracle supplies protocol marks.
Candle pages include stale and nextCursor. Show stale data explicitly; use nextCursor as the before value when loading older candles.
HTTP endpoints
| GET | Returns |
|---|---|
| /v1/markets | Public market catalog. |
| /v1/markets/SOL-USD | Market policy and public status. |
| /v1/markets/SOL-USD/candles?interval=15m&limit=200 | Reference candle page. |
| /v1/markets/SOL-USD/stream?interval=15m | Server-sent reference price updates. |