跳到主要内容

查询组合最新目标持仓

GET/research/portfolios/{code}/positions/latest在线调试
GET https://api.shengkezhi.com/open/v1/research/portfolios/PORTFOLIO_DEMO_001/positions/latest
等效 curl
curl "https://api.shengkezhi.com/open/v1/research/portfolios/PORTFOLIO_DEMO_001/positions/latest" \
  -H "Authorization: Bearer sk_xxx"

GET /research/portfolios/{code}/positions/latest — 查询组合最新目标持仓。

每次请求直接读取最新已落盘权重,不使用读模型缓存,也不加载回测或历史持仓。响应带 Cache-Control: private, no-store。尚无权重产物时 latest_weights 为空数组、latest_weights_at 为空字符串;最新快照本身是空仓时保留该快照时间,不回退到更早的持仓。

需在请求头携带 Authorization: Bearer sk_xxx。

请求参数​

参数位置类型必填默认值说明
codepathstring是-组合编号

响应 data​

字段类型必填说明
latest_weightsTargetWeight[]是最新目标标的权重,按权重降序排列;空数组可能表示空仓或尚无产物。
latest_weights_atstring是最新权重文件名中的快照日期或时间;尚无产物时为空字符串。

TargetWeight 字段​

字段类型必填说明
symbolstring是标的代码,例如 600519.SH。
weightnumber是目标权重,小数表示;正数为多头,负数为空头。

调用示例​

curl -X GET "https://api.shengkezhi.com/open/v1/research/portfolios/PORTFOLIO_DEMO_001/positions/latest" \
-H "Authorization: Bearer sk_xxx"
{
"code": 0,
"msg": "ok",
"data": {
"latest_weights": [
{
"symbol": "600519.SH",
"weight": 0.5
},
{
"symbol": "000858.SZ",
"weight": -0.2
}
],
"latest_weights_at": "2026-10-01T120000"
}
}```