save_strategy
To promote a sweep pick, pass source_experiment_id and source_run_index; the service loads its authorized configuration and checks coverage before saving. Its recorded venue and quote token are defaults: pass market_data_venue and/or quote_token only when the person chooses a different market. Otherwise compose and save a trading strategy from signals in the library. Give it a strategy_name, an asset, and the entry and exit signals you chose -- each one {name, params?, timeframe?}, with params defaulting from the library when omitted. DO NOT pass a signal's role: TRIGGER and FILTER are read from the library, and an entry must resolve to exactly one TRIGGER plus any number of FILTERs. Find real signal names with query_knowledge first; never invent one. The server checks the entry against the current market regime itself -- a strategy composed against the wrong regime is refused, and telling the person why is a better answer than saving it anyway. Pass constraints ONLY for values the person actually stated: they are kept exactly as given, while everything else comes from canon. Saving the same strategy twice returns the first one rather than making a duplicate, and says so in created. What you save is a DRAFT: not tradeable until a backtest of it meets the platform's threshold spec, and it leaves draft on its own when one does.
[Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | Asset symbol, e.g. BTC or ETH. | |
| constraints | No | Execution values the person stated, e.g. {"max_risk_per_trade": 0.01}. Each is kept exactly as given rather than nudged. | |
| quote_token | No | Quote currency of the requested market. | |
| exit_signals | No | The signals that close one, same shape. A strategy may have none, and then it exits on risk rules alone. | |
| entry_signals | No | The signals that open a position. Exactly one must be a TRIGGER in the knowledge graph; the rest are FILTERs. | |
| strategy_name | Yes | What to call it, in plain words a person reads -- the entry trigger's friendly_name from the knowledge graph, then the asset and timeframe, e.g. "Upside Range Breakout - BTC 1h". Never a code name such as btc_strategy or bb_upper_breakout. | |
| regime_override | No | Save anyway when the regime check refuses. Only ever on the person's explicit say-so, after they have been told why. | |
| regime_direction | No | The direction band from get_market_regime, e.g. bear. The signal searches filter by it and find_sweep_runs marks each row's regime_fit with it; save_strategy and update_strategy read the current band themselves, so their check runs without it. | |
| source_run_index | No | The selected sweep row, including zero. | |
| market_data_venue | No | Exact venue of the requested market. | |
| source_config_hash | No | The selected row's config_hash, as find_sweep_runs reported it. Pass it with the other two: a relaunched sweep can give one run_index to several runs, and without it such an index is refused. | |
| source_experiment_id | No | For a sweep pick, its experiment ID. Supply with source_run_index. The stored run supplies the exact signals and execution settings. With no market given, it saves on the run's corpus market, or on the same venue's execution quote when the corpus quote is not one (Binance USDT saves as Binance USDC). |