单股单日大单明细查询¶
来源同步:
/Users/mac/Projects/chatgpt-codex/doc/api_MonitorAgg.md所属接口集:
盘中监控
请求 URL¶
GET /v1/api/monitor/agg1
认证方式¶
Bearer Token(详见 认证与签名)
接口概述¶
查询单只股票最近 5 个工作日的买卖明细列表。从 Redis 读取大单明细,支持按代码或名称筛选,返回买/卖明细及基本信息。
请求参数¶
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| day | string | 否 | 基准日 YYYYMMDD,默认今天 |
| codes | string | 否 | 逗号分隔的代码或名称关键词;不传时返回全部有明细的股票 |
| stock_code | string | 否 | codes 的别名参数 |
| details | int | 否 | 返回每侧明细条数,默认 0(返回全部);大于 0 时取最近 details 条 |
接口说明¶
- 窗口为基准日向前最近 5 个工作日(含基准日),仅按工作日回推,不依赖交易日历
- 数据源:Redis
stockapi:monitor:detail:buy:{YYYYMMDD}:{code6}与sell:{YYYYMMDD}:{code6} - 不提供聚合统计(
buy_count/sell_count/net_inflow/close/pct_chg/updated_at均为null) - 明细按时间
ts升序排列;若details > 0则截取最近details条
buy_details / sell_details 字段说明¶
每个明细条目包含以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
| ts | string | 交易时间 YYYY-MM-DD HH:MM:SS |
| price | float | 成交价格 |
| vol | int | 成交量(股) |
| turnover_ratio | float | 单笔换手率(= vol / free_float_shares) |
响应格式示例¶
{
"code": 1,
"message": "success",
"data": {
"day": "20251211",
"items": [
{
"stock_code": "000001.SZ",
"stock_name": "平安银行",
"buy_count": null,
"sell_count": null,
"net_inflow": null,
"close": null,
"pct_chg": null,
"updated_at": null,
"buy_details": [
{"ts": "2025-12-11 10:15:02", "price": 12.30, "vol": 50000, "turnover_ratio": 0.005}
],
"sell_details": [
{"ts": "2025-12-11 10:20:05", "price": 12.28, "vol": 30000, "turnover_ratio": 0.003}
]
}
]
}
}
返回状态¶
| 状态码 | 说明 |
|---|---|
| 200 | 成功 |
| 401 | 未认证 |
| 403 | 无权限 |