Developers menu
Developers / LAB / Backtest or optimize an idea
Markdown copyBacktest 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.
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
| Field | Meaning | Unit |
|---|---|---|
| idstring | Compiled LAB idea id | |
| kindbacktest | quant | Run backtest first, then quant optimization |
Response
{ idea, result, state }: the engine's verdict per leg and the balance after.
| Field | Meaning | Unit |
|---|---|---|
| ideaobject | The idea after the step. | |
| resultobject | Per leg: era tables (all, this year, holdout), the full rule against its baseline, and verdict. | |
| stateobject | Balance and ideas. |
Errors
| Status | Code | What to do |
|---|---|---|
| 400 | A parameter is wrong. | |
| 401 | No key, or an unknown or revoked one. Send a lab key. | |
| 402 | No credits. Buy credits on the LAB page. | |
| 404 | No such idea or job. Check the id. | |
| 409 | Another idea holds the conveyor, or a step came out of order. Finish or drop the holder; run the steps in order. | |
| 422 | The rule could not be compiled or was refused (refunded). Change the rule. | |
| 502 | The 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.