Developer APIScripts API

Candle Script API

Server-side compile, run, and backtest endpoints require a signed-in session for a workstation or service account. For language syntax, see the language reference.

MethodPathSummary
POST/v1/scripts/compileCompile source and return diagnostics.
POST/v1/scripts/runExecute a compiled script against supplied bars.
POST/v1/scripts/diagnosticsList built-ins, namespaces, and diagnostic codes.
POST/v1/backtests/runRun a synchronous strategy backtest.
POST/v1/backtests/jobsQueue an asynchronous backtest job.
GET/v1/backtests/jobsList backtest jobs.
GET/v1/backtests/jobs/{id}Fetch one job result.
bash
curl -s http://localhost:4000/v1/scripts/compile \
  -H "Content-Type: application/json" \
  -H "Cookie: session=..." \
  -d '{"source":"indicator \"RSI\" { plot(rsi(close, 14), \"RSI\") }"}'
Candle Script API