Developers menu

Developers / LAB / Backtest or optimize an idea

Markdown copy

Backtest or optimize an idea

Run the idea's current conveyor step: backtest first (rule to tested), then quant (tested to ready). One credit, refunded on failure.

POST/api/lab/run
Plan LABKey scope labLimit 1 credit a runVersion 1.0.0Since 2026-08-12

This endpoint serves

Plan: LAB. LAB credits: developing an idea is free, a backtest or an optimize pass is one credit, the desk is free once an idea is tested. LIVE includes 5 credits a month. Pricing.

Body

FieldMeaningUnit
idstringCompiled LAB idea id
kindbacktest | quantRun backtest first, then quant optimization

Response

{ idea, result, state }: the engine's verdict per leg and the balance after.

FieldMeaningUnit
ideaobjectThe idea after the step.
resultobjectPer leg: era tables (all, this year, holdout), the full rule against its baseline, and verdict.
stateobjectBalance and ideas.

Errors

StatusCodeWhat to do
400A parameter is wrong.
401No key, or an unknown or revoked one. Send a lab key.
402No credits. Buy credits on the LAB page.
404No such idea or job. Check the id.
409Another idea holds the conveyor, or a step came out of order. Finish or drop the holder; run the steps in order.
422The rule could not be compiled or was refused (refunded). Change the rule.
502The engine failed (refunded); retry. Retry.

Every code: Errors.

Changes

  • 2026-08-12 Added.

OpenAPI operation labRun in /docs/developers/openapi.json.

Measurements of dealer positioning, never a forecast or a trade call. This page is built from FirmTape's public contract, the same files the OpenAPI document is built from; the tests hold them against the route code. Markdown: /docs/developers/lab/run.md.