Skip to content
Docs
Developers

Market data

Discover markets, handle exact prices and quantities, and subscribe to books, trades and candles.

Discover instruments and trading rules

GET /v1/markets returns marketId, underlyingSymbol, marketType, current status, priceScale, quantityScale, price and quantity bounds, initial margin, maintenance-margin tiers, maximum leverage, maker/taker fees and settlementAsset. Use these values for validation and formatting. Do not infer collateral eligibility from a settlementAsset field or assume all markets have the same scale.

Edel Markets perpetuals trade 24/7, subject to market status and venue controls. An underlying stock or other reference asset does not turn the perpetual into spot ownership. Status values include draft, backfilling, open, paused, halted, cancel_only and reduce_only. An advertised symbol alone does not mean risk-increasing orders are currently allowed.

Client market-data flow

Client market-data flow

100%
Diagram preview

Drag to pan, or use arrow keys when the diagram is focused. Use plus and minus to zoom, and zero to fit. On a touch screen, pinch to zoom.

Validate incoming data before it reaches shared state, and make lost continuity visible to every consumer.

A market-data client needs a clear path from incoming frames to the state used for trading decisions. Validate message shape, market identity and sequence before applying an update. Preserve exact amounts throughout processing.

Bound processing work. Use a bounded queue and keep expensive parsing or aggregation away from the rendering path. If the client cannot keep up, mark the affected data stale and recover according to the channel contract.

Publish coherent state. Share validated market state across charts, books and order-entry views. Coalesce visual updates without discarding the events needed to maintain correct state.

Preserve channel boundaries. Candle replay has its own cursor and series. It does not establish an atomic snapshot across prices, the order book and account data.

Read an initial snapshot

Use snapshots when connecting, opening a historical view or performing documented recovery. WebSockets supply subsequent live updates. This Node.js example selects an open market from the catalogue and reads its book without credentials or order submission. Set EDEL_API_URL using environments and endpoints.

Read-only catalogue example using a supplied venue URL
const api = process.env.EDEL_API_URL;
if (!api) throw new Error('Set EDEL_API_URL to the venue URL supplied by Edel');
async function read(path) {
  const response = await fetch(api + path);
  if (!response.ok) throw new Error(`Read failed: ${response.status}`);
  return response.json();
}
const catalogue = await read('/v1/markets');
const market = catalogue.markets.find((item) => item.status === 'open');
if (!market) throw new Error('This venue has no open market');
const book = await read(`/v1/markets/${encodeURIComponent(market.marketId)}/book`);
console.log({ marketId: market.marketId, ...book });
REST routeContents
GET /v1/markets/{marketId}Market snapshot: mark/index, status and funding
GET /v1/markets/{marketId}/stats24-hour activity, prices, open interest and funding timing
GET /v1/markets/{marketId}/bookAggregated bids/asks with snapshot and resync metadata
GET /v1/markets/{marketId}/candlesHistorical index or trade candles

Choose market channels

Market channels are public and market-scoped. The source status identifies how each feed is produced. Check subscription acceptance and source availability in your environment. Trade and price channels have no direct REST snapshot replacement in the channel catalogue; use their supported stream replay behavior for recovery.

ChannelPurposePublished source status
market.bookComplete aggregated book snapshotsprojection
market.tradesExecuted public tradeslive
market.tickerLatest trade price and sizederived
market.priceMark/index and price-source observationslive
market.fundingFunding rate and timinglive
market.statusCurrent market statusprojection
market.candlesCandle updates for a required serieslive; mark series unavailable

Preserve exact amounts and snapshot meaning

Atom fields are integer strings. Use BigInt or decimal arithmetic with the market's scale; JavaScript Number can lose precision. Formatted decimal fields are useful for display; use exact arithmetic when calculating balances. Placement price and quantity are decimal strings; order-preview fields use atoms, so do not reuse one body unmodified for the other.

A REST book includes snapshotSequence, readModelDigest, checksum and resync. Its realtime payload contains marketId, snapshotSequence, bids and asks; each level carries exact priceAtoms and sizeAtoms plus formatted values. Apply the complete level arrays as a new snapshot. Neither the public channel nor its schema defines price-level insert/delete delta messages.

A projection digest identifies change for that producer. It may not be reproducible from the payload. Use only a verification algorithm documented for that specific field.

Request candles with the correct series and window

REST candles default to series=index and tf=1m. Supported declared timeframes are 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w and 1M. from and to use epoch milliseconds and define a half-open [from, to) window; align boundaries to the requested timeframe.

The trade and index series are served. The mark series is declared but returns 400 operation_not_available on REST and is refused on the socket. A candle subscription requires series; it does not accept a tf field in the public subscribe envelope. Read each candle payload's timeframe instead of assuming a REST query parameter is also a socket option.

Use each instrument’s decimal scales

Read priceScale, quantityScale and settlementAssetDecimals independently. A market symbol’s spelling does not tell you the collateral or its decimal scale. Keep exact wire amounts as strings or exact integers until the appropriate conversion boundary; avoid binary floating-point multiplication when constructing commands.

The v2 CCXT-shaped surface uses JSON numbers for compatibility and therefore cannot preserve arbitrary exact atom precision. Use v1 atom strings for exact accounting and reconciliation. Last trade, mark, index and candle-series values also have different meanings; do not silently replace one with another.