REST API — Market data

Public market data shapes, plus the WebSocket stream endpoints. Market data needs no trading credentials.


GET/v1/markets

List markets

Listed markets with precision and limits.

SDK

await client.markets({ venue: 'hl' })

Response — MarketInfo[]

[
  {
    "symbol": "BTC",
    "sizeDecimals": 4,
    "priceDecimals": 1,
    "tickSize": "0.1",
    "lotSize": "0.0001",
    "minSize": "0.0001",
    "maxLeverage": 40,
    "isActive": true
  }
]

GET/v1/markets/{market}/ticker

Ticker

The cheapest fresh price reference — a single round-trip. Prefer this over the orderbook on Decibel, where the WS-derived orderbook can deliver a stale first frame.

SDK

await client.ticker({ venue: 'hl', market: 'BTC' })
// → { markPrice, midPrice, oraclePrice,
//     fundingRateBps, openInterest, timestamp }

GET/v1/markets/{market}/orderbook

Orderbook

L2 snapshot — bids descending, asks ascending, plus a snapshot timestamp. Optional depth (default 25).

SDK

await client.orderbook({ venue: 'hl', market: 'BTC', depth: 25 })
// → OrderBook

GET/v1/markets/{market}/candles

Candles

OHLC bars. interval: 1m | 5m | 15m | 1h | 4h | 1d. Optional from / to (unix ms).

SDK

await client.candles({ venue: 'hl', market: 'BTC', interval: '1h' })
// → Candle[]

GET/v1/markets/{market}/trades

Recent trades

Last N public taker prints. Optional limit (default 50).

SDK

await client.recentTrades({ venue: 'hl', market: 'BTC', limit: 50 })
// → PublicTrade[]

WS/v1/stream/*

Streams

WebSocket endpoints back the SDK's subscribe* methods: /v1/stream/orders, /v1/stream/account, plus fills and positions. The SDK normalizes both venues into the same callback shapes with reconnect catch-up — see Market data & streams.

SDK

const off = await client.subscribeFills({ venue: 'hl' }, (fill) =>
  console.log(fill),
)
off()

Was this page helpful?