Quant — Run Indicator Script
quant_runRun quant indicator scripts against historical K-line data to calculate and return indicator values as JSON. Provide symbol, date range, period, and script inputs.
Instructions
Run a quant indicator script against historical K-line data on the server. Executes the script server-side and returns the computed indicator/plot values as JSON. Periods: 1m, 5m, 15m, 30m, 1h, day, week, month, year (default: day). The optional input parameter accepts a JSON array matching the order of input.*() calls in the script, e.g. "[14,2.0]".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _jq | No | Optional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response. | |
| end | Yes | End date (YYYY-MM-DD) for the K-line range | |
| input | No | Script input values as a JSON array, e.g. "[14,2.0]". Must match the order of input.*() calls in the script. | |
| start | Yes | Start date (YYYY-MM-DD) for the K-line range | |
| period | No | K-line period: 1m, 5m, 15m, 30m, 1h, day, week, month, year (default: day) | day |
| script | No | Indicator script source. | |
| symbol | Yes | Symbol in <CODE>.<MARKET> format, e.g. TSLA.US, 700.HK |