Vela, our next-generation charting platform, is live at vela.luxalgo.com.
LuxAlgo

Overview

How Vela Pro connects to market data providers and which provider interfaces each feature requires.

View as Markdown

Vela Pro renders market data from one or more providers registered on your workspace. Each provider implements the DataProvider interface from Vela's open-source core for historical candles, symbol resolution, and live bar streams, and can optionally implement additional interfaces on the same object for market depth (DepthFeed) and footprint data (FootprintFeed).

import { VelaWorkspace } from '@luxalgo/vela/workspace';
import { BinanceProvider } from '@luxalgo/vela/providers/binance';
import type { DataProvider } from '@luxalgo/vela';
import { enableVelaPro } from '@luxalgo/vela-pro';

declare const acme: DataProvider; // custom provider instance

enableVelaPro();

const workspace = new VelaWorkspace('#chart', {
    layout: false,
    symbol: 'BTCUSDT',
    timeframe: '60',
    live: true,
    providers: {
        binance: () => new BinanceProvider(),
        acme: () => acme,
    },
    persist: true,
});

The providers option maps a provider key to a factory function. The workspace invokes each factory once, and all charts in the workspace share that provider instance and its in-memory bar cache. Explicit symbol prefixes such as acme:AAPL route directly to the matching provider key, while unprefixed symbols resolve in the key order of providers.

Only getBars is required on DataProvider. Every other method unlocks an optional capability, and charts remain functional when optional methods are omitted.

Provider requirements by feature

FeatureProvider interface or methodDocumentation
Candles, drawings, bar replay, Pine Script® indicators and strategiesgetBarsCustom data providers
Live candlessubscribe (falls back to polling getBars when omitted)Custom data providers
Unprefixed symbols and symbol searchlistSymbolsSymbol search, Symbology
Price precision, syminfo.*, exchange time zone, session togglegetSymbolInfoSymbology
Market status badge, session profiles on markets with trading hoursgetCalendarTimeframes and sessions
TPO chart type and indicatorgetBars at the block interval ('5' to '240')Timeframes and sessions
Quotes in the watchlist and symbol searchDaily bars from getBars, or a custom QuoteSourceQuotes and market depth
Order book (depth view, DOM ladder, trades tape)DepthFeedQuotes and market depth
Footprint chart type, order-flow indicators, TPO order-flow coloringFootprintFeedFootprint data
request.footprint() in Pine Script®A FootprintSource callback backed by your feedFootprint data

Capability detection

DepthFeed and FootprintFeed are separate TypeScript interfaces rather than members of DataProvider. A provider implements them on the same instance alongside getBars. When a feature needs market depth or footprint slices, Vela Pro resolves the chart's symbol to its owning provider, retrieves the provider object via chart.data.providerInstance(name), and checks it with a runtime type guard.

import type { Vela } from '@luxalgo/vela';
import { hasDepthFeed, hasFootprints } from '@luxalgo/vela-pro';

export function surfacesOf(chart: Vela, symbol: string): { footprints: boolean; depth: boolean } {
    const resolved = chart.data.resolve(symbol); // { provider, ticker }, or null
    const provider = resolved ? chart.data.providerInstance(resolved.provider) : undefined;
    return {
        footprints: hasFootprints(provider), // getFootprints, subscribeFootprints and footprintCaps
        depth: hasDepthFeed(provider), // subscribeBook or subscribeTrades
    };
}

Capability detection runs per symbol against the provider serving that symbol. When multiple providers are registered, footprint and depth features can be active for symbols on one provider while remaining unavailable for symbols on another. Because workspace.chart references the active chart, calling surfacesOf(workspace.chart, 'acme:AAPL') reports the feeds available for that symbol.

Quotes follow a separate pattern. Instead of reading methods from a DataProvider instance, the watchlist and symbol search consume a QuoteSource port passed in configuration options. When no custom QuoteSource is provided, the default implementation derives quotes from daily bars returned by your registered providers.

Fallback behavior

When an optional method or feed interface is absent, Vela Pro degrades gracefully without throwing runtime errors:

Omitted capabilityFallback behavior
listSymbolsSymbols on that provider resolve only when explicitly prefixed (acme:XYZ), and none of its symbols appear in symbol search.
subscribeWhen live: true is set, the chart polls getBars for the latest two bars every 3 seconds.
getSymbolInfoPine Script® receives placeholder syminfo.* values, the price axis infers decimal precision from the visible price range, and the market is treated as continuous (24x7).
getCalendarThe market status badge remains on Market Open, and session profiles align to UTC day, week, and month boundaries.
DepthFeedThe Order Book panel displays "No order book" in the book view and "No trades feed" in the trades view.
FootprintFeedThe Footprint chart type renders no cells and logs a console warning. Order-flow indicators are hidden from the indicator menu for that symbol. TPO remains available because it computes profiles from OHLCV bars.

Bundled crypto providers

The core includes three providers for public cryptocurrency venues (BinanceProvider, CoinbaseProvider, and HyperliquidProvider under @luxalgo/vela/providers/) that run directly in the browser without API keys or a backend proxy. They implement historical bars, symbol lists, symbol metadata, and live candle streams, which lets you test candle-based features before building a custom provider. None of the bundled providers implement DepthFeed or FootprintFeed. See Data providers in the core documentation for venue details.

On this page