---
title: "Bulk Strategies"
method: POST
path: "/v1/strategies/bulk"
---

# Bulk Strategies

`POST /v1/strategies/bulk`

## 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/bulk`
- Auth: none declared

Fleet import in ONE call (2026-07-21, built from a real 8-hour incident:
24 strategies took 24 serial save→backtest→deploy round-trips).

Body: {"items": [{"name", "strategy_spec"}, ...], "deploy_to": <desk id>?}
— at most 50 items. Per item: validate (validate_spec + the dynamic-
universe check) → save → if deploy_to, create the FORWARD-ONLY deployment
(same path as the single deploy route). Items that fail validation don't
block the others; every failure is named in that item's errors[].

NO backtest runs in this request. Grading backtests for the new
deployments are QUEUED on the bounded worker lane and attach in the
background — the whole call returns in seconds for a 50-item fleet.

Auth: session, principal X-Vega-Key, or account key pair (the same
require_user_or_session as POST /v1/strategies). deploy_to adds desk
authorization exactly like the single deploy route: a key PAIR must
match that desk (403 otherwise); a session/principal caller must OWN it.

## Headers

- `x-vega-key` string, nullable

## Request body

- BulkStrategiesRequest: POST /v1/strategies/bulk — land a whole fleet in ONE call. Up to BULK_MAX_ITEMS items; each item is validated + saved independently (a bad item never blocks the others). With ``deploy_to`` set, every VALID item is also deployed forward-only onto that desk and starts trading immediately. NO BACKTEST IS RUN OR QUEUED (2026-07-28, Ro). Deploying is not a request to be graded: not every strategy CAN be honestly graded, and grading uninvited is the engine DECIDING instead of ADVISING. The bots land ungraded, the UI OFFERS a backtest, and the user chooses. ``queued_backtests`` is retained in the response for API compatibility and is always 0.
  - `items` BulkStrategyItem[], required
    - `strategy_spec` object, required
    - `name` string, nullable
    - `description` string, nullable
  - `deploy_to` integer, nullable

## Response `200`

Successful Response

- BulkStrategiesResponse: Item-ordered results + saved/deployed counts + queued grading jobs.
  - `results` BulkItemResult[], required
    - `name` string, required
    - `valid` boolean, required
    - `strategy_id` integer, nullable
    - `deploy_id` string, nullable
    - `errors` string[]
    - `suggestions` object[], nullable
    - `suggested_spec` object, nullable
  - `saved` integer, required
  - `deployed` integer, required
  - `queued_backtests` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/quantradin/apis/vega-api.md) · [All operations](https://skmtc.dev/quantradin/apis/vega-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quantradin/apis/vega-api/revisions/47add154ef38?raw)
