scan
Full-market real-time quote scan (~5800 A-share securities, ~3 MB unfiltered). Narrow server-side first: sort + order + limit return a real ranking (sort=pct_change, order=desc, limit=50 = the day's 50 strongest in a few KB); limit without sort is an alphabetical sample, not a ranking. When rows are dropped the response carries truncated: true and matched_total (the pre-limit count) — total is only how many rows came back. The universe includes ETFs (security_type on every row); money-market ETFs dominate sort=amount, so pass security_type=stock for a stock-only board (filtered before sort/limit). include_margin attaches the T+1 margin block; include_industry attaches industry (Shenwan L1/L2) and top_concept. Both are often absent — coverage, not failure: top_concept resolves for only a subset of A-shares and industry does not cover BSE:*; top_concept is not the limit-up LLM leading_concept, which is not served here. Live rows also expose top_base_concept {id,name,kind:base,pct_change} and top_concept_status / top_base_concept_status (ready, no_membership, no_snapshot, unavailable). The two layers rank independently; use kind=base for base detail. Historical rows carry neither current theme field nor their statuses. In pre_open / auction sessions read each row's auction block, not top-level price / pct_change (same rules as quote: only auction.status = matched with auction.pct_change = 0 is a flat auction; compute from auction.prev_close). Read market_trade_date, not snapshot_at, to decide whether a row is today's — a frozen feed keeps snapshot_at moving. is_margin_target is margin-list membership (T+1), not activity; the key is absent (never false) when the list cannot be loaded. trade_date=YYYY-MM-DD scans that past day's daily bars (see the parameter for allowed combinations). 竞价未匹配量 unmatched 为股,正买负卖;unmatched_as_of 是最后有效竞价观测的源时间(09:25 后冻结),历史未采集为 null。
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": "scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _jq | No | JMESPath,对 data 求值(写 items[*].id) | |
| sort | No | Server-side ranking key, applied before `limit`; omit for `canonical_code` order. `margin_balance` / `margin_net_buy` turn `include_margin` on. Null sort values land last in both directions. | |
| limit | No | Keep the first N rows **after** sorting (1-10000). Always pair with `sort` — an unsorted limit is an alphabetical sample. When rows are dropped: `truncated: true` + `matched_total` (pre-limit count); `total` is only the returned count. | |
| order | No | Sort direction. Defaults to `desc` for numeric keys and `asc` for `canonical_code`. Ignored without `sort`. | |
| _spill | No | true=全量落盘,只回摘要与取数地址 | |
| _fields | No | 逗号分隔的直接字段;有 items 时投影每行,否则投影 data;外层字段或嵌套结构用 _jq | |
| _intent | No | 用户原问题一句话,仅分析用,可留空 | |
| include | No | `active` (default) drops ST / delisted / stale rows; `all` keeps them, flagged with `stale: true` and `stale_since`. | |
| exchange | No | Filter by exchange (omit for all) | |
| _max_bytes | No | 响应字节上限,默认约 50 KB | |
| concept_id | No | Restrict the scan to one concept's / industry's members. Applied **before** sort and limit, so `concept_id` + `sort=pct_change` + `limit=10` gives the top 10 movers **inside that concept** (and `matched_total` counts its members, not the whole market). An unknown / inactive / wrong-dimension id returns 404, so an empty result means the theme has no members in today's snapshot rather than a bad id. Get ids from `concepts_list` or `concepts_of`. | |
| trade_date | No | Past trading day (YYYY-MM-DD) to scan instead of the live snapshot — rows are that day's daily bars. Only `price` / `pct_change` / `amount` / `turnover_rate` / `canonical_code` sort historically; `concept_id`, `include_margin` and `margin_target` cannot be combined. Today / future / non-trading days are rejected. | |
| concept_kind | No | Dimension of `concept_id`: concept (hot-theme library, default), base (base labels), or industry (Shenwan). Ignored alone. | |
| margin_target | No | Keep only margin-eligible securities (true) or only non-eligible (false); omit for both. Returns 503 if the list cannot be loaded. | |
| security_type | No | `stock` keeps only stocks, `etf` only ETFs, `all` (default) both. Money-market / short-bond ETFs dominate `sort=amount` unless you pass `stock`. Filtered before sort / limit; every row carries `security_type` either way. | |
| include_margin | No | Attach the T+1 margin block (off by default, ~25% larger). `as_of` is normally the previous trading day; judge direction by `financing_net_buy_cny` (`financing_buy_cny` is gross); null = not published, not zero. | |
| _max_bytes_mode | No | 正文超限处理,默认 truncate 保留前缀 | |
| include_industry | No | Attach `industry` (Shenwan L1/L2 `{l1:{id,name}, l2:{id,name}}`) and `top_concept` (`{id,name,pct_change}`, highest-moving member concept now; not the limit-up `leading_concept`). Also attaches `top_base_concept` (kind=base) and separate availability statuses for both layers. Off by default (payload). Ids feed the concepts endpoints (`kind=industry` / `kind=concept`). |