Skip to content
CTRL K
    Live market data

    Live market data

    Use sdk.live to keep a pair or instrument fresh. Nutrimatic bootstraps over HTTPS, streams updates over SSE, merges locally, and (in the browser) pauses when the tab is hidden.

    You do not need to invent poll intervals for the default path.

    watchPair

    const sub = sdk.live.watchPair({
      pair: '42-USDT',
      chart: { interval: '1h', limit: 100 },
      channels: ['spot', 'pool', 'trades', 'chart'],
      onUpdate: (snap) => {
        // snap.spot, snap.pool, snap.chart, snap.trades, …
      },
      onError: (err) => {
        console.error(err.code, err.message)
      },
    })
    
    // later
    sub.unsubscribe()
    FieldMeaning
    pairListed pairLabel
    chartOptional — bootstrap candles (interval, limit)
    channelsOptional SSE channels (default includes spot, pool, trades, chart)
    onUpdateCalled after bootstrap and on each stream update
    onErrorTyped failures (INFRASTRUCTURE_UNAVAILABLE, …)

    Returns { unsubscribe, getSnapshot() }.

    watchInstrument

    const sub = sdk.live.watchInstrument({
      instrumentId: 'evm:421018:instrument:42',
      onUpdate: (snap) => {
        // snap.telemetry
      },
    })

    Advanced (optional)

    One-shot reads (easy.read.getChart, feed windows, etc.) remain for paging history, diagnostics, and custom UIs. Composition of candle/feed windows (bootstrap / after / before) is documented under Chart windows and Activity feeds — those pages are not the default live path.