query_bars
Fetch daily or intraday China A-share price bars, with hfq/qfq adjustment for returns or current quote levels and universe filtering to exclude untradable names.
Instructions
Daily or intraday price bars. PRICES ARE STORED UNADJUSTED: pass adjust='hfq' for any comparison across time (returns, charts, drawdowns) or a split reads as a crash. Use adjust='qfq' when the levels must match what a quote screen shows today. Pass universe='all_a' for cross-sectional work to drop names that were not tradable that day. datasets: daily_bars, index_bars, minute_bars (1m), minute_bars_5m (5m), and minute_bars_15m / _30m / _60m when the user has derived them (each bar's resampled_from says whether 1m or 5m built it). Every response carries origin: 'lake' is stored and validated; 'live' was fetched just now and cannot be adjusted or universe-filtered — read its warning before using the numbers for anything but a current quote. Not for financial statements (query_fundamentals), other datasets such as fund flow (query_dataset), or ranking and aggregating across many symbols (run_sql).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Inclusive end date, YYYY-MM-DD. | |
| limit | No | Max rows to return (default 200, cap 2000). Responses always report the true total and set `truncated`. | |
| start | No | Inclusive start date, YYYY-MM-DD. | |
| adjust | No | hfq = back-adjusted, the correct choice for return series. qfq = forward-adjusted to today's price level. total_return (daily_bars only) = hfq with fund cash distributions reinvested; stocks read as hfq, whose factor already reinvests dividends. Omit only when you specifically want raw traded prices for a single day. | |
| offset | No | Rows to skip, for paging with `limit`. | |
| dataset | No | Default daily_bars. | |
| symbols | No | Symbols as '<code>.<EX>', e.g. ['600519.SH', '000001.SZ']. Omit for every symbol in range. Use resolve_symbol to turn a company name into a code. | |
| universe | No | Drop rows for names unlisted/delisted that day, and ST/suspended ones where trading_status covers it. `all_a` includes SH/SZ/BJ; `all_a_sh_sz` is an explicit SH/SZ-only research subset that excludes BJ. The lake path also requires versioned historical ST evidence; incomplete research fails instead of treating unknown names as normal. daily_bars only. | |
| include_provenance | No | Include per-row source/data_version/fetched_at. Off by default — the response lists the distinct sources instead, at a fraction of the size. |