Datafeed API
The minimum required contract is MarketDataFeed with symbol resolution and historical Bar loading; realtime, quotes, depth, and sessions are optional capabilities layered on top.
Search 303 supported datafeed contracts below. Expand a result to see its TypeScript declaration, properties, methods, parameters, return values, and errors. Share a filtered URL or a symbol anchor when another engineer needs the same contract.
Start here
MarketDataFeed— the datafeed contract the chart calls — start withresolveSymboland historical barsBar— the OHLCV bar shape every history and realtime path sharesSymbolInfo— resolved symbol metadata: pricescale, session, timezone, capabilitiesBarHistoryRequest— Window parameters the chart passes to the datafeed's history method: the requested time range, target bar count, and the pagination direction being loaded.- Implement a datafeed step by step
- Historical bars: request/response semantics
Browse the reference
Classes 1
Wraps a host-implemented
MarketDataFeed behind the public MarketDataControllerApi: it validates and normalizes requests, assigns subscription ids, tracks live subscriptions for teardown, caches the feed's declared configuration, and reports effective capabilities as the intersection of what the feed declares and what it actually implements. Constructing one binds the feed as the controller's permanent authority; unimplemented feed methods surface as datafeed.unsupported SdkErrors.Interfaces 183
Typed detail payload for
analyst-rating market events, describing the analyst action plus any rating and price-target change.One OHLCV bar in the public datafeed contract, timestamped at the bar's opening time in Unix milliseconds (UTC).
A persisted cache entry for one (symbol, interval) series. Holds the bars the cache knows about plus the boundary flags that tell the loader whether older / newer history still exists upstream.
Identifies one cached bar series: the symbol descriptor plus the chart interval its bars were fetched at. Stores serialize it to a stable
<ticker>::<interval> string key.Pluggable persistence for cached bars. Modeled on the SDK's ChartStorageAdapter: a small async interface a consumer can implement to back the cache with IndexedDB, a server, Redis, or nothing. Implementations own their own TTL / eviction;
get MUST return null for entries they consider expired or missing.Window parameters the chart passes to the datafeed's history method: the requested time range, target bar count, and the pagination direction being loaded.
Datafeed response for one history page: the bars in ascending timestamp order plus coverage flags that drive further pagination.
Common configuration shared by the built-in bar cache stores: a TTL (entries older than it read as missing),
maxEntries (default 200), an optional maxBars cap across all series, an opt-in per-series bar cap keeping the most recent N, a pluggable eviction policy (LRU by default), and an injectable clock for tests.Request for raw retained L2 snapshots used by the liquidity heatmap fallback warm start.
Raw retained L2 snapshot history for one resolved symbol.
One recorded L2 book snapshot for the heatmap's historical warm-load.
Configuration for
createCachingDatafeed: the cache policy (none, memory, or persistent) and an optional explicit store, TTL and eviction limits, a namespace for the default IndexedDB store, opt-in synthetic aggregation and empty-bar generation, the resolution rebuild policy, and an injectable clock for tests.Resolved per-symbol session policy for a calendar-scoped series: session filtering, shading, and aggregation require a session calendar, and a missing calendar is a typed integration error — never an empty successful result.
Native interval-family policy, set via
features.intervalFamilies, that widens the eligible interval set (tick-count intervals, second intervals, or additional exact intervals) before datafeed and symbol capability narrowing.Detail payload attached to corporate-action market events (merger-acquisition, spinoff, offering, buyback, rights-redemption, reorganization, symbol-name-change, and listing-status) via
MarketEvent.details. All fields are optional so feeds supply whatever the action type provides.Request passed to
MarketDataFeed.getDataWindow (and MarketDataControllerApi.getDataWindow) asking the feed for the labeled values shown in the SDK's data-window panel, optionally pinned to the current crosshair position.Feed-supplied set of labeled values rendered in the SDK's data-window panel. The panel re-requests a snapshot as the crosshair, live bars, symbol, or interval change.
One labeled row of a data-window snapshot, supplied by the datafeed and rendered as-is by the data-window panel.
One price level on the bid or ask side of an
SdkMarketDepth book snapshot.Parameters for a one-shot market-depth read via
MarketDataFeed.getDepth; also the base shape extended by DepthSubscription for streaming depth.Identifies one streaming market-depth subscription passed to
MarketDataFeed.subscribeDepth, extending DepthRequest with a subscription identity.Typed detail block carried by
dividend market events, covering the dividend classification, amount, and key calendar dates.Typed detail block carried by
earnings market events, covering the fiscal period, session timing, and EPS/revenue comparisons.Typed detail block carried by
economic-release market events describing a macroeconomic data release.Options object form of
EmptyBarGenerationSetting controlling how createCachingDatafeed synthesizes flat empty bars for missing in-session slots, including which session-calendar source determines the slots that should exist.Exact loaded-range coverage requested from a mounted chart's own history pipeline.
Outcome of an
ensureHistory call: loaded-range snapshots taken before and after the call, how much history was loaded, and why loading stopped.Per-entry stats handed to an eviction policy. One entry == one (market-data series, interval) series. Timestamps are epoch ms.
Capacity limits handed to a
BarCacheEvictionPolicy: an optional maximum number of retained (symbol, interval) series (maxEntries) and an optional maximum total bar count across all series (maxBars). With neither set, no eviction occurs.Options for
exportCsv, extending the data-export options with CSV serialization controls: a field-id column filter, an opt-in UTF-8 byte-order mark, and the line ending (CRLF by default).Options for
exportData controlling which column families are included (comparisons, indicators, volume) and an optional millisecond time range restricting the exported rows.Columnar snapshot returned by
exportData: a schema of field descriptors plus parallel numeric and display-formatted columns over a merged time axis.One time/value sample in an external instrument series such as open interest or funding rate.
Request passed to
MarketDataFeed.getExternalSeries for a derivatives-family series (open interest or funding rate) that is not derivable from OHLCV.Response from
MarketDataFeed.getExternalSeries: the series kind served and its sampled points.Describes one exported data column: its identity, value kind, producing source, and display formatting hints. Returned in
ExportedData.schema.Type-specific details attached to
regulatory-filing market events.Bid/ask footprint options — ladders built from the datafeed's time & sales tape.
One complete or forming server-materialized footprint ladder.
Row-size-aware request for server-materialized footprint ladders.
Materialized footprint history and coverage for one symbol, interval, and price-row size.
Exact aggressor totals at one already-resolved integer ladder row.
Type-specific details attached to futures lifecycle market events:
futures-roll, futures-expiry, futures-first-notice, and futures-last-trade.Request for one page of market events for a symbol over a time window, passed to
MarketDataFeed.getEvents and MarketEventProvider.getEvents; supports type and provider filtering plus cursor pagination.Type-specific details attached to
guidance market events describing company-issued financial guidance.One interval closing-book fact retained for heatmap history.
Materialized interval-closing book history and coverage for one symbol and chart interval.
Options for
createIndexedDbBarStore: the common BarStoreOptions (TTL, entry/bar limits, eviction policy, clock) plus an optional namespace that prefixes the database name (<namespace>-bar-cache) so instances or tenants do not collide.One indicator plot's column in exported chart data, supplied by the chart engine to the data/CSV export pipeline with its per-time values and display attributes.
One time/value sample of an exported indicator plot inside
IndicatorExportColumn.values.Reference profile of an instrument returned by the datafeed's
getInstrumentDetails operation. Extends the resolved SdkSymbolInfo with descriptive and fundamental data (exchange, sector, market cap, etc.) for host UI such as instrument-info surfaces.Request payload for the datafeed and market-data controller
getInstrumentDetails operation, identifying the instrument whose reference profile is wanted.One complete liquidation-surface column for a source time window.
Render payload: the source snapshot plus host-selected presentation only.
One time/price intensity cell in the liquidation surface.
One leverage allocation disclosed by the backend estimator.
Complete method and unit metadata required to interpret estimated intensity.
Public SDK switch for the independently sourced liquidation heatmap.
Product-owned rendering controls for the liquidation heatmap.
Datafeed history request for the independently sourced liquidation heatmap.
Historical or live backend snapshot for one liquidation heatmap.
Streaming liquidation request with caller-owned subscription identity.
Canonical loaded-range state shared by the chart engine and public SDK history APIs.
Per-channel delivery-quality declaration for one market-data channel, splitting the snapshot (get/read) and stream (subscription) operations into separate
MarketDataDeliveryQualityCapability contracts. Used by MarketDataQualityCapabilities for channels such as depth.Exact quality contract for one provider operation. This is separate from method support: a mounted method with no declaration is supported but unqualified, so sequence-sensitive agents must not infer continuity.
Authorization-bound constructors for non-visual market-data products.
The host-implemented datafeed contract the chart consumes. Only
loadBars is required; each optional method progressively unlocks a capability — symbol search, live streaming, quotes, depth, liquidation surfaces, tape, events, sessions, news, watchlists, options — and the SDK treats unimplemented methods as unsupported.Capability and configuration manifest a datafeed returns from
MarketDataFeed.onReady, telling the chart which optional feed operations (search, marks, streaming, quotes, depth, liquidation surfaces, news, and so on) it may discover and how to call them. An explicit false removes the matching optional operation from capability discovery; when a flag is omitted, method presence remains the backward-compatible availability signal. A direct chart setter is an explicit host activation and still requires its underlying method even when built-in discovery is hidden.Portable per-frame evidence.
observedAt - sourceTime is the data age at receipt when sourceTime exists; its absence is an explicit lack of source freshness evidence rather than an invitation to infer it from transport.Provider-declared quality for agent-relevant microstructure channels.
Exact sequence discontinuity observed between delivered update frames.
Inclusive source sequence range carried by one frame.
Provider-owned delivery and content contract for time-and-sales data.
One order-book frame delivered by
MarketDataFeed.getDepth or a depth subscription — bid and ask levels plus optional per-frame quality evidence — feeding the depth and order-flow heatmap surfaces.Fields shared by every market event regardless of type: source-scoped identity, event type, affected symbols, timing and precision, display copy, and optional classification data such as importance, entities, and sentiment.
The set of event-type descriptors a feed, provider, or the merged controller declares; it defines which event types exist, how their markers render, and how their detail fields format.
Payload of the
market-event-catalog-change chart event, emitted whenever the merged event-type catalog changes through provider or type registration and removal.Describes one field of an event's details payload for the built-in detail view: the payload key, its display label, and how its value formats.
A structured entity referenced by a market event — a company, person, instrument, or other named thing — with a source-defined kind and a display label.
Constraints for
MarketEventsControllerApi.get and clear, selecting events by source ids, type ids, and time range; omitted fields match everything.Names the timeline group an event type belongs to — a built-in group like news or corporate actions, or a custom group — for grouping and ordering types in the events UI.
Visual styling of an event type's chart marker badge — label, glyph, or icon content plus shape, colors, border, and size. Applied in layers: descriptor default, then feature-option override, then user display-setting override.
A dated sub-step of a market event's lifecycle (e.g. an ex-date or payable date), listed in the event's detail view.
One page of events returned by
getEvents; a present nextCursor tells the controller to re-issue the request with that cursor for the next page.A pluggable source of market events registered through
MarketEventsControllerApi.registerProvider: it declares its event-type catalog, serves paged history, and can stream live updates.Payload of the
market-event-provider-error chart event, describing one provider's fetch or streaming failure; failures are reported per provider instead of rejecting the whole refresh.Payload of the
market-events-change chart event, emitted whenever the controller's event set changes; it carries the full current event list plus what caused the change.Controller for the chart's market-events subsystem, obtained from
chart.marketEvents(). Hosts use it to register providers and custom event types, manage host-owned events, query the merged set, drive the events center, and refresh from providers.Scope options for
MarketEventsControllerApi.refresh: which providers and event types to refetch, the time window, and the per-request page size.Identifies one live event stream passed to
subscribeEvents: the same parameters as a GetEventsRequest (minus the paging cursor) plus a stable subscription id.Declares one event type for the catalog: its identity and ownership, display label, timeline group, default marker styling, detail-field formatting, and default visibility.
Actual/estimate/previous value triple used in event details — for example earnings EPS and revenue, or an economic indicator — with an optional unit or currency.
Exchange session calendar consumed by
resolveMarketSessionInfo for symbols that are not 24x7 or 24x5: a timezone, wall-clock daily hours, and an optional per-day resolver for holidays and early closes. Without a resolveDay resolver, weekdays are open and weekends closed.Authorization-bound market-session computations, providers, and feed decorators.
Details payload for
trading-halt and trading-resumption market events: the halt code, its reason, and the expected resumption time.Range request passed to
MarketDataFeed.getMarks (and, as TimeScaleMarksRequest, to getTimescaleMarks) asking for marks covering a symbol, interval, and time span.One headline returned by the datafeed's
getNews. The built-in news control and news rail panel render these items for the chart's active symbol.Query passed to the datafeed's
getNews describing which headlines to load. The built-in news control issues one with the chart's current symbol and a default item limit.One option contract row within an
OptionSeriesSnapshot — identity (code, expiration, strike, right), quote and size fields, greeks, and provenance metadata as delivered by the options datafeed. Also exported under the OptionContract alias.Request for an option-chain snapshot.
expiration narrows to a single expiry when provided.Option facts carried by a resolved chart symbol that charts an option contract. The exact resource identity round-trips through the selection so hosts never reconstruct it from OCC or provider string parsing.
Request for refreshed option quotes/greeks for a symbol (optionally one expiry).
One option contract row within an
OptionSeriesSnapshot — identity (code, expiration, strike, right), quote and size fields, greeks, and provenance metadata as delivered by the options datafeed. Also exported under the OptionContract alias.Canonical option-series payload returned by the options endpoints: the contract list for an underlying together with its expiration and strike axes, quote freshness, and per-field provenance and availability metadata.
One sampled order-book column handed to the chart's heatmap layer.
Render payload for the in-chart heatmap layer (mirrors the engine contract).
Host-facing switches for the in-chart order-flow liquidity heatmap.
Visual controls for the liquidity heat field. All of these apply live — changing them never restarts the book sampler.
Server proof for a retained interval-aware order-flow history request.
Optional typed extension for independently materialized footprint and heatmap history.
Shared request for server-materialized footprint or heatmap bars.
Decomposed form of a chart interval token as produced by
parseChartInterval, pairing the canonical token with its span, unit, and semantic kind.Exact event, market, and tradable-outcome facts carried by a resolved prediction-contract symbol. Providers originate this contract; tickets and brokers transport it without parsing ticker text or inferring an outcome from order side.
Cash amount paid by one winning prediction contract after authoritative resolution.
Provider-authored rules used to determine a prediction market's winning outcome.
Describes how a symbol's prices should be formatted for display. Mirrors common charting-library price-format fields so feeds can express decimal, fractional, fraction-of-a-fraction, pip, and variable-tick pricing. - Decimal:
priceScale is 10^n where n is the number of decimals; the tick size is minMove / priceScale. - Fractional: fractional is true and priceScale is 2^n (the number of fractions, e.g. 32). Rendered as x'yy (e.g. 133'21). - Fraction of a fraction: additionally minMove2 > 0 splits each fraction, rendered as x'yy'z (e.g. ZB futures 119'16'2).One symbol's quote snapshot delivered by
MarketDataFeed.getQuotes and subscribeQuotes, feeding legend quote fields, watchlist rows, and the extended-hours price line.Parameters for a one-shot quote read via
MarketDataFeed.getQuotes.Describes a streaming quote subscription passed to
MarketDataFeed.subscribeQuotes: which symbols to quote and which of them need the fastest update cadence.Related pages
- Realtime Bars — update versus append semantics and correction handling
- Resolutions — which intervals you serve natively and which the SDK derives
- Market Data Types — mapping your backend payloads onto these contracts