Skip to main content

Market Data API

Base URL: https://market.liquideuclid.com

Quick Navigation

  • REST Endpoints: health and historical kline retrieval.
  • WebSocket Channels: channel list, normalized shapes, and runtime key mapping.
  • Depth Snapshot: full book snapshot payload.
  • Depth Diff: incremental book update payload and key mapping.
  • Trade: live trade event payload and key mapping.
  • Kline: streaming candle payload and key mapping.
  • Book Ticker: top-of-book payload and key mapping.

REST Endpoints

EndpointUse it forResponse shape
GET /healthcheck market-data availability"ok"
GET /klines/:pair_idfetch OHLCV candles{ pair_id, interval, candles[] }

Health

Endpoint: GET /health

Request

  • no request body

Response example

"ok"

Klines

Endpoint: GET /klines/:pair_id

Path params

  • pair_id: market pair id, for example ETH-USDC

Query params

  • interval: candle interval such as 1m, 5m, 1h, 1d
  • limit (optional, default 100, max 1000)

Response example

{
"pair_id": "ETH-USDC",
"interval": "1m",
"candles": [
{
"start_ms": 1700000000000,
"open": 100000,
"high": 101000,
"low": 99000,
"close": 100500,
"volume_base": 123,
"volume_quote": 12345678,
"trades": 7
}
]
}

WebSocket Channels

Endpoint: wss://market.liquideuclid.com/ws

Connection

  • WebSocket handshake only
  • no HTTP request body
ChannelUse it forPayload shape (normalized)Runtime keys actually returned by WebSocket
depthfull order book snapshot{ pair_id, lastUpdateId, bids, asks }same as normalized
depth_diffincremental order book updates{ event_type, event_time_ms, pair_id, first_update_id, final_update_id, bids, asks }{ e, E, s, U, u, b, a }
tradelive trades{ event_type, event_time_ms, pair_id, trade_seq, trade_id, price, size, trade_time_ms, is_buyer_maker }{ e, E, s, t, trade_id, p, q, T, m, M }
klinestreaming candle updates{ event_type, event_time_ms, pair_id, candle }{ e, E, s, k }
bookTickerbest bid and ask only{ update_id, pair_id, best_bid_price, best_bid_size, best_ask_price, best_ask_size }{ u, s, b, B, a, A }

Depth Snapshot

Channel: depth

Payload example

{
"pair_id": "ETH-USDC",
"lastUpdateId": 42,
"bids": [[99000, 10], [98000, 5]],
"asks": [[100000, 4], [101000, 3]]
}

Depth Diff

Channel: depth_diff

Payload example

{
"event_type": "depthUpdate",
"pair_id": "ETH-USDC",
"event_time_ms": 1700000000000,
"first_update_id": 42,
"final_update_id": 42,
"bids": [[99000, 10]],
"asks": [[100000, 4]]
}

Normalized field to runtime key mapping

Normalized fieldRuntime keyDescription
event_typeeEvent type label (depthUpdate).
event_time_msEEvent timestamp in milliseconds.
pair_idsMarket pair symbol.
first_update_idUFirst update ID covered by this diff payload.
final_update_iduFinal update ID covered by this diff payload.
bidsbBid-side level updates ([price, size]).
asksaAsk-side level updates ([price, size]).

Trade

Channel: trade

Payload example

{
"event_type": "trade",
"event_time_ms": 1700000000000,
"trade_time_ms": 1700000000000,
"is_buyer_maker": true,
"trade_id": "3f5b8b86-4b67-4b1f-a1cc-3f3bafc6c2b3",
"trade_seq": 101,
"pair_id": "ETH-USDC",
"price": 100000,
"size": 2
}

Normalized field to runtime key mapping

Normalized fieldRuntime keyDescription
event_typeeEvent type label (trade).
event_time_msEEvent timestamp in milliseconds.
pair_idsMarket pair symbol.
trade_seqtPer-pair incremental trade sequence number.
trade_idtrade_idDurable UUID trade identifier.
pricepTrade price in integer base units.
sizeqTrade size in integer base units.
trade_time_msTTrade execution timestamp in milliseconds.
is_buyer_makermtrue when buyer is maker; false when seller is maker.

Kline

Channel: kline

Payload example

{
"event_type": "kline",
"event_time_ms": 1700000000000,
"pair_id": "ETH-USDC",
"candle": {
"start_ms": 1700000000000,
"close_time_ms": 1700000059999,
"interval": "1m",
"open": 100000,
"high": 101000,
"low": 99000,
"close": 100500,
"volume_base": 123,
"volume_quote": 12345678,
"trade_count": 7,
"is_closed": false
}
}

Normalized field to runtime key mapping

Normalized fieldRuntime keyDescription
event_typeeEvent type label (kline).
event_time_msEEvent timestamp in milliseconds.
pair_idsMarket pair symbol.
candlekCandle payload container.
candle.start_msk.tCandle start timestamp in milliseconds.
candle.close_time_msk.TCandle close timestamp in milliseconds.
candle.intervalk.iCandle interval label (for example 1m).
candle.openk.oOpen price for the candle window.
candle.closek.cLatest/closing price for the candle window.
candle.highk.hHigh price for the candle window.
candle.lowk.lLow price for the candle window.
candle.volume_basek.vBase-asset traded volume in window.
candle.volume_quotek.qQuote-asset traded volume in window.
candle.trade_countk.nNumber of trades in the window.
candle.is_closedk.xtrue once the interval has closed.

Book Ticker

Channel: bookTicker

Payload example

{
"update_id": 42,
"pair_id": "ETH-USDC",
"best_bid_price": 99000,
"best_bid_size": 10,
"best_ask_price": 100000,
"best_ask_size": 4
}

Normalized field to runtime key mapping

Normalized fieldRuntime keyDescription
update_iduLast applied book update ID.
pair_idsMarket pair symbol.
best_bid_pricebCurrent best bid price.
best_bid_sizeBSize at current best bid price.
best_ask_priceaCurrent best ask price.
best_ask_sizeASize at current best ask price.