MarketLab Docs
ScriptingSources

Sources

Market data sources available to Market Lab scripts.

Sources

Script sources decide what Market Lab fetches and what appears under input.<source> inside onData.

Source config is passed with:

--source <source>:<key>=<value>

Examples:

--source candles:timeframe=60
--source orderbook:depth=100
--source vd:timeframe=60
--source vd:bucket=1
--source oi:timeframe=60
--source volumes:timeframe=60

Available scripting sources:

SourceBacktestLive runConfig
candlesYesYestimeframe
orderbookYesYesbacktest: timeframe, depth; live: depth
vdYesYestimeframe, bucket
oiYesYestimeframe
volumesYesYestimeframe

In live mode, input.source tells you which source emitted the current update. Multi-source live scripts should guard missing source state because not every source arrives at the same time.

Use Data Types when you need the exact JavaScript input shape.

On this page