Market LabDocs
Scripting

Scripting

Write local JavaScript scripts for Market Lab.

Scripting

Market Lab scripting lets you write JavaScript over normalized live and historical market data.

Market Lab owns provider access, market data loading, validation, simulation, execution routing, and output envelopes. Your script owns the market logic and decides when to call ctx.trade or ctx.cancel.

Use script backtest to run execution calls against the historical simulator. Use script run to deploy a detached live job, and add --venue bulk only when that job should execute real orders.

Start here:

On this page