strategy_modify
Edit a running strategy's parameters IN PLACE -- no cancel + recreate.
React to a fresh signal by retuning the strategy you already own: the execution history, cost-basis ledger and position state all survive, and there is no window where the strategy is gone. The live executor picks the new config up on its NEXT tick; a tick already in flight finishes against the config it loaded (it writes only runtime state, never config, so the two can never clobber each other).
Scoped to the caller's own wallet (hard rule 1 -- non-custodial: this edits a row the owner already controls; nothing here holds keys, signs or moves funds).
Args (all optional -- supply at least one):
config_updates: strategy-config keys to set, merged over the existing
config (e.g. {"usd_per_buy": 25, "stop_loss_pct": 0.08}).
remove_keys: config keys to drop back to the executor's default.
risk: retune the risk limits -- max_position_pct /
max_portfolio_exposure_pct / max_single_loss_pct /
max_drawdown_pct / max_daily_loss_pct (percent; <=0 disables a
single guard).
direction_mode / allow_short / regime_override: the direction
controls from the create tools (deterministic signals -- DYOR).
target_allocation: new mint->weight basket (rebalance / vault /
yield_farm).
interval_seconds: new tick interval, used from the next tick on.
reason: free text recorded on the strategy's audit log.
REFUSED (returns immutable_config_key): target_token /
source_token / tracked_wallet / venue / composite
definition. These define WHAT the strategy trades -- editing them in
place would desync the executor's position bookkeeping or strand an open
perp leg on the venue it was opened against. Cancel and create a new
strategy for those. A STOPPED strategy is final and cannot be modified;
a paused one can (the edit does not resume it -- use strategy_resume).
The merged config is dry-run through the strategy's executor before it is
persisted, so an invalid edit is rejected (invalid_config) rather than
latching the live strategy into error on its next tick.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| risk | No | ||
| reason | No | ||
| allow_short | No | ||
| remove_keys | No | ||
| strategy_id | Yes | ||
| config_updates | No | ||
| direction_mode | No | ||
| wallet_address | Yes | ||
| regime_override | No | ||
| interval_seconds | No | ||
| target_allocation | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||