Deploy Strategy
Deploy a strategy. The engine begins evaluating entry conditions immediately and may place orders on the configured exchange. Strategies in draft or paused status can be deployed; deploying from paused resumes execution with any param changes since the last run.
Endpoint
POST /v1/strategies/{id}/deploy
Weight: 10 Authentication: Required (signed) — see Authentication.
Request
Path parameter: id — the strategy identifier (e.g. strat_8f2a1b).
| Name | Type | Mandatory | Description |
|---|---|---|---|
capital | decimal | NO | Override the strategy's stored capital for this run. Decimal string. If omitted, the strategy's saved value is used. |
leverage | integer | NO | Override the strategy's stored leverage for this run. Range 1–20. If omitted, the strategy's saved value is used. |
dry_run | boolean | NO | When true, the engine consumes live market data and emits the same WebSocket events but places no real orders. Default false. |
Overrides are applied to the running session only and do not modify the stored strategy definition. Use Update Strategy to persist changes.
Response
Returns the strategy object with status: "deployed" and deployed_at updated to the current server time.
{
"id": "strat_8f2a1b",
"name": "BTC grid 1h",
"template_id": "tpl_grid",
"params": {
"grid_levels": 8,
"upper_price": "72000",
"lower_price": "60000",
"rebalance_threshold": "0.02"
},
"symbols": ["BTCUSDT"],
"timeframe": "1h",
"capital": "10000.00",
"leverage": 3,
"status": "deployed",
"deployed_at": "2026-04-29T12:00:00Z",
"created_at": "2026-04-28T15:30:00Z",
"updated_at": "2026-04-29T12:00:00Z",
"stats": {
"open_positions": 0,
"total_pnl": "0.00",
"total_trades": 0,
"win_rate": "0.000"
}
}
Response fields
Same shape as Get Strategy. After a successful deploy:
statusisdeployed.deployed_atis the deploy timestamp.statsreflects the cumulative state across all runs (it is not reset on each deploy).
Errors
400 INVALID_PARAMETER—capitalbelow the template minimum, orleverageout of range.402 INSUFFICIENT_FUNDS— account quote-currency balance is below the requestedcapital.404 NOT_FOUND— strategy does not exist or is not owned by the caller.409 INVALID_STATE— strategy status is notdraftorpaused(e.g. alreadydeployed,stopped, or inerror).
See Errors for the full list.
Example
curl -X POST "https://api.pipai.example/v1/strategies/strat_8f2a1b/deploy" \
-H "X-PipAI-API-Key: $API_KEY" \
-H "X-PipAI-Timestamp: $TS" \
-H "X-PipAI-Signature: $SIG" \
-H "Content-Type: application/json" \
-d '{
"capital": "10000.00",
"leverage": 3,
"dry_run": false
}'