WHAT IT ANSWERS
这张表适合回答什么
- 查询美股分钟日周聚合条
- 构建多周期技术指标
- 对照标准日线核验行情
DATASET · market
market.aggregate_us
保存美股不同 timespan 与 multiplier 的聚合行情,适合需要多周期、来源统一的历史 K 线研究。
tsWHAT IT ANSWERS
GRAIN & TIME
KEY FIELDS
instrument_idtstimespanmultiplierRECOMMENDED JOINS
ref.instrumenton instrument_id用 instrument_id 补充证券代码、名称、市场、交易所和资产类型。
HOW TO QUERY SAFELY
先用 catalog 确认当前契约;可按 catalog 中列出的 filters 进一步缩小范围;单页最多 5000 行,该表不提供稳定 cursor,结果过大时必须缩小标的、日期或其他筛选。
MACHINE CONTRACT
ts, instrument_id, timespan, multiplier—canonical_final_activecode→ code · stringinstrument_id→ instrument_id · integermarket→ market · stringmultiplier→ multiplier · integersource→ source · stringtimespan→ timespan · stringPOINT IN TIME
该资产没有 PIT 契约。普通 rows 端点仍按当前公开读模式返回数据;不要把它表述成历史时点快照。
COPY-READY CALLS
同一数据集可用 HTTP、Python SDK、CLI 或 MCP;Key 始终只通过环境变量/Bearer Header 传递。
curl --fail-with-body -H "Authorization: Bearer $FRIENDS_DATA_API_KEY" "https://api.alphahubs.uk/api/v1/data/datasets/market/aggregate_us/rows?limit=100&code=TICKER&start=2026-08-01&end=2026-08-01"from friends_data_api import FriendsDataClient, Settings
async with FriendsDataClient(Settings.from_env()) as client:
page = await client.get_dataset_rows('market', 'aggregate_us', limit=100, start='2026-08-01', end='2026-08-01', filters={'code': 'TICKER'})
print(page.data)
if page.has_more:
print("next cursor:", page.next_cursor)friends-data get-dataset-rows market aggregate_us --limit 100 --start 2026-08-01 --end 2026-08-01 --filter code=TICKER{
"arguments": {
"dataset": "aggregate_us",
"end": "2026-08-01",
"filters": {
"code": "TICKER"
},
"limit": 100,
"namespace": "market",
"start": "2026-08-01"
},
"tool": "get_dataset_rows"
}FIELD DICTIONARY
descriptionSource 可在 JSON 中区分仓库注释、标准术语表和名称推导说明。
| # | 字段 | ClickHouse 类型 | JSON | 可空 | 角色 | 说明 |
|---|---|---|---|---|---|---|
| 1 | instrument_id | UInt64 | integer | no | filter, default_order, warehouse_primary_key | WarrenHub canonical instrument identifier; use it for cross-dataset joins.标准术语表 |
| 2 | code | String | string | no | filter | Source-normalized security or contract code.标准术语表 |
| 3 | market | LowCardinality(String) | string | no | filter | Canonical market or country-market code.标准术语表 |
| 4 | tsUTC_datetime | DateTime64(3, 'UTC') | string / date-time | no | time, default_order, warehouse_primary_key | UTC timestamp of the observation or market-data interval.标准术语表 |
| 5 | timespan | LowCardinality(String) | string | no | filter, default_order, warehouse_primary_key | Market-bar interval unit used together with multiplier.标准术语表 |
| 6 | multiplier | UInt16 | integer | no | filter, default_order, warehouse_primary_key | Number of timespan units represented by one market bar.标准术语表 |
| 7 | open | Nullable(Float64) | number | yes | value | Opening price for the represented interval.标准术语表 |
| 8 | high | Nullable(Float64) | number | yes | value | Highest price for the represented interval.标准术语表 |
| 9 | low | Nullable(Float64) | number | yes | value | Lowest price for the represented interval.标准术语表 |
| 10 | close | Nullable(Float64) | number | yes | value | Closing or last price for the represented interval.标准术语表 |
| 11 | volume | Nullable(UInt64) | integer | yes | value | Traded volume for the represented interval.标准术语表 |
| 12 | vwap | Nullable(Float64) | number | yes | value | Volume-weighted average price for the represented interval.标准术语表 |
| 13 | transactions | Nullable(UInt32) | integer | yes | value | Number of source-reported transactions in the interval.标准术语表 |
| 14 | otc | Nullable(UInt8) | integer | yes | value | Source-normalized field: otc.名称推导 |
| 15 | source | LowCardinality(String) | string | no | filter, warehouse_primary_key, provenance | Normalized upstream source identifier.标准术语表 |
| 16 | quality_status | LowCardinality(String) | string | no | provenance | Machine-readable data-quality classification.标准术语表 |
换一个字段名、类型或角色。
结构来自 Friends 只读身份可见的真实 serving relation;权限、过滤、排序、PIT 与分页来自可执行 DatasetSpec。Schema observed at 2026-10-06T18:08:52Z。