Activate Algorithm
activate_algoLink an algorithm to a trading instance with capital allocation and start live trading. algo_id is the saved algo id (from create_algo / list_my_algos), not LinkedAlgo id. instance_id is from create_instance / list_instances. ALWAYS ask the user for capital_allocation — never invent a dollar amount. Capital is from broker buying power; the cumulative sum across this agent's live algos (allocated AI Trading Power) must stay ≤ policy max_total_capital. First call with confirm_allocation=false; server returns allocation_requires_confirm with broker_equity, allocation_pct_of_equity, and warning_level (high≥50%, critical≥90%). Show those to the user with risk settings; after explicit OK retry with confirm_allocation=true (acknowledge_capital_risk still accepted as alias). capital > equity is hard-blocked. Optional risk_preset override: conservative|moderate|aggressive|custom. On success check engine_started (or utml_started), is_live, symbols, timeframe, and capital vs equity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| algo_id | Yes | ID of the algorithm | |
| instance_id | Yes | ID of the trading instance | |
| risk_preset | No | Optional: conservative | moderate | aggressive | custom | |
| risk_advanced | No | Optional advanced: trailingStopEnabled, trailingStopAmount, allowPyramiding, maxPyramidPositions | |
| capital_allocation | Yes | USD capital for this algo from broker buying power. Ask the user. Adds to instance AI Trading Power; cumulative across this agent's live algos must stay ≤ policy max_total_capital. | |
| confirm_allocation | No | true only after the user accepts capital vs live broker equity (and high/critical % warnings when present). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| message | No | ||
| success | No |