POST /v1/lab/strategies
Save a strategy: a name and a spec (the strategy spec schema), or a template_id to copy a template’s spec (a spec given with it wins). A Builder-ranking source must name the caller’s own saved ranking or an inline config the daily snapshot can answer (else 400 with the reason). 403 `plan_required` (feature strategy_lab; a strategy that copies no wallet — wallet_source kind `none` — needs a plan with own rules, Quant and above), 400 `lab_strategies_max` at the plan’s limit. 404 `lab_disabled` while LAB_ENABLED is off.
Save a strategy: a name and a spec (the strategy spec schema), or a template_id to copy a template’s spec (a spec given with it wins). A Builder-ranking source must name the caller’s own saved ranking or an inline config the daily snapshot can answer (else 400 with the reason). 403 plan_required (feature strategy_lab; a strategy that copies no wallet — wallet_source kind none — needs a plan with own rules, Quant and above), 400 lab_strategies_max at the plan’s limit. 404 lab_disabled while LAB_ENABLED is off.
API key: Authorization: Bearer pk_live_… (mint at polyrank.app/api-keys)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/lab/strategies" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": "string", "name": "string", "status": "draft", "template_id": "string", "spec": { "property1": null, "property2": null }, "created_at": "string", "updated_at": "string", "last_backtest": { "id": "string", "status": "string", "per10": 0, "copies": 0, "created_at": "string" }}{ "error": "string", "message": "string", "feature": "string", "field": "string", "plan": "string", "retry_after_sec": 0, "retry_after_seconds": 0, "reason": "string", "issues": [ null ], "trace_id": "string"}{ "error": "string", "message": "string", "feature": "string", "field": "string", "plan": "string", "retry_after_sec": 0, "retry_after_seconds": 0, "reason": "string", "issues": [ null ], "trace_id": "string"}{ "error": "string", "message": "string", "feature": "string", "field": "string", "plan": "string", "retry_after_sec": 0, "retry_after_seconds": 0, "reason": "string", "issues": [ null ], "trace_id": "string"}{ "error": "string", "message": "string", "feature": "string", "field": "string", "plan": "string", "retry_after_sec": 0, "retry_after_seconds": 0, "reason": "string", "issues": [ null ], "trace_id": "string"}{ "error": "string", "message": "string", "feature": "string", "field": "string", "plan": "string", "retry_after_sec": 0, "retry_after_seconds": 0, "reason": "string", "issues": [ null ], "trace_id": "string"}{ "error": "string", "message": "string", "feature": "string", "field": "string", "plan": "string", "retry_after_sec": 0, "retry_after_seconds": 0, "reason": "string", "issues": [ null ], "trace_id": "string"}{ "error": "string", "message": "string", "feature": "string", "field": "string", "plan": "string", "retry_after_sec": 0, "retry_after_seconds": 0, "reason": "string", "issues": [ null ], "trace_id": "string"}