Patch Strategy
Rename and/or replace the spec of ONE of the caller's saved strategies.
Body: {"name"?: str, "spec"?: object} — at least one (400, friendly, if neither). Auth: session cookie wins, else X-Vega-Key, else an account key pair (the same resolution as GET /v1/strategies/{id}); the shared guest key with no session is refused, because on that one tenant an edit by id would rewrite another visitor's work. 404 "Strategy not found" for a stranger — byte-identical to a missing id. Bumps updated_at, returns the updated row.
A replaced spec is re-validated through the SAME path POST /v1/strategies uses (_normalize_and_validate_spec), so a refusal carries the engine's own teaching message plus suggestions / suggested_spec. A refused edit stores NOTHING — the previous spec stands.
WHAT AN EDIT NEVER TOUCHES: a DEPLOYED bot keeps trading its own spec snapshot (vega_paper_deployments.spec has no FK to this table), and a finished backtest keeps its own spec_snapshot. Editing the library entry is editing the DRAFT, never the running bot and never the graded receipt — redeploy or re-run to put the new version to work.
Request
- Base URL: https://api.quantradin.com (the document declares no server; this is the origin it was published from)
- URL: https://api.quantradin.com/v1/strategies/{strategy_id}
- Auth: none declared
Path parameters
Headers
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.