Test and scan a strategy
strategyA trading rule of your own, run on what we recorded. view: fields (what a rule may name: price, moving averages, RSI, whale dollars bought and sold, forced closes, the fee for holding a bet, open positions; the rule's shape and rules to start from), backtest (default with a rule: every trade it would have made on up to 20 coins over about 30 days of hours, or days back to 5 years of price for the top coins, with counts, averages, the deepest fall and holding the coin instead), scan (which coins its entry conditions are true on now). Past trades on recorded data, fees taken off.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | No | {"side":"long"|"short","entry":{"all":[{"field","op","value"|"ref"}]},"exit":{"after_bars","take_profit_pct","stop_loss_pct","when"},"fee_pct"} | |
| view | No | Which lane; see the description. | |
| coins | No | Coins, a list or "BTC,ETH". Up to 20 for a backtest; a scan with none checks every streamed coin. | |
| cursor | No | Next page: the cursor from the previous answer. | |
| detail | No | brief (default): the answer, key numbers and top rows. full: every row, paged with cursor. | |
| packets | No | scan only: false leaves each match's packet off. | |
| template | No | A rule to start from, by key (see view fields). `rule` is laid over it. | |
| timeframe | No | 1h (default) or 1d. | |
| within_bars | No | scan only: a match on one of the last N bars counts (default 1). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | No | Data time, ISO. | |
| caveat | No | A real limit, when non-null. | |
| cursor | No | Next page (detail full). | |
| delayed | No | Set when not live. | |
| summary | No | The answer in one sentence. | |
| as_of_ms | No | Data time, Unix ms. | |
| available | No | False: no data; note says why. | |
| truncated | No | Lists shortened to their top rows; trimmed has shown of all per list and note says it in words. | |
| next_tools | No | Follow-up calls {tool,args,why}. | |
| access_note | No | What this connection could not return. |