账户
鉴权
签名方式:每个请求用 App Key / Secret 签名。请求头如下:
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
Authorization | string · header | 必填 | OpenAPI 后台 上的账户 Access Token,作为原始 token 传入(不带 Bearer 前缀),并参与签名计算。 |
X-Api-Key | string · header | 必填 | 你的 App Key。 |
X-Timestamp | string · header | 必填 | 请求时间戳,单位秒(Unix 时间)。 |
X-Api-Signature | string · header | 必填 | HMAC-SHA256 签名。格式:HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=。 |
获取账户盈亏汇总,包含总资产、总盈亏和收益率指标。
请求
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
start_date | string | 可选 | 分析开始日期,格式 `YYYY-MM-DD` |
end_date | string | 可选 | 分析结束日期,格式 `YYYY-MM-DD` |
响应
响应字段
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
updated_at | string | 可选 | 最后更新时间戳 |
sum_profit | string | 可选 | 总盈亏 |
sum_profit_rate | string | 可选 | 总盈亏率 |
profits | object | 可选 | 按类型分解的盈亏 |
└ stock | string | 可选 | 股票基本信息 |
└ fund | string | 可选 | 资金标志/金额。 |
└ mmf | string | 可选 | 维持保证金系数。 |
└ other | string | 可选 | 其他值/数量。 |
└ summary_info | object[] | 可选 | 摘要信息。 |
└ ∟ profit_max | string | 可选 | 最大盈利金额。 |
└ ∟ loss_max | string | 可选 | 最大亏损金额。 |
└ ∟ profit_max_name | string | 可选 | 最大盈利标的名称。 |
└ ∟ loss_max_name | string | 可选 | 最大亏损标的名称。 |
└ ∟ asset_type | string | 可选 | 本组的元素类型(持仓 / 地区 / 资产类别 / 行业) |
└ ipo_subscription | integer | 可选 | IPO 认购次数。 |
└ ipo_hit | integer | 可选 | IPO 中签次数。 |
└ cumulative_transaction_amount | string | 可选 | 累计成交额。 |
└ crypto | string | 可选 | 加密货币标志。 |
└ trade_order_num | string | 可选 | 交易订单数。 |
└ trade_stock_num | string | 可选 | 交易标的数。 |
is_traded | boolean | 可选 | 是否有交易记录 |
currency | string | 可选 | 货币 |
total_simple_earning_yield | string | 可选 | 总简单收益率。 |
total_time_earning_yield | string | 可选 | 总时间加权收益率。 |
invest_amount | string | 可选 | 总投入金额 |
initial_asset_value | string | 可选 | 初始资产价值 |
ending_asset_value | string | 可选 | 期末资产价值 |
current_total_asset | string | 可选 | 当前总资产 |
start_time | string | 可选 | 统计开始时间戳 |
end_time | string | 可选 | 统计结束时间戳 |
trade_update_time | string | 可选 | 交易数据更新时间。 |
updated_date | string | 可选 | 最后更新日期 |
start_date | string | 可选 | 统计开始日期 |
end_date | string | 可选 | 统计结束日期 |
trade_update_date | string | 可选 | 交易数据更新日期。 |
trade_stock_num | string | 可选 | 交易标的数。 |
响应 JSON 示例
{
"code": 0,
"message": "success",
"data": {
"summary": {
"currency": "USD",
"sum_profit": "62905.97",
"sum_profit_rate": "0.6128",
"invest_amount": "102659.74",
"current_total_asset": "165565.71",
"initial_asset_value": "0.00",
"ending_asset_value": "165565.71",
"is_traded": true,
"start_date": "2025-10-17",
"start_time": "1760659200",
"end_date": "2026-05-14",
"end_time": "1778731947",
"profits": {
"stock": "66370.84",
"crypto": "0",
"fund": null,
"ipo": null,
"mmf": null,
"other": null,
"cumulative_transaction_amount": "1244920.28"
}
},
"sublist": {
"start": "2025-10-17",
"start_date": "2025-10-17",
"end": "2026-05-14",
"end_date": "2026-05-14",
"updated_at": "1778731947",
"updated_date": "2026-05-14",
"items": [
{
"symbol": "AAPL.US",
"name": "Apple",
"market": "US",
"currency": "USD",
"profit": "100.00",
"profit_rate": "0.05",
"holding_period": "180",
"clearance_times": 0,
"is_holding": true,
"item_type": "Stock",
"isin": "",
"security_code": "AAPL",
"underlying_profit": "100.00",
"derivatives_profit": "0.00",
"order_profit": null
}
]
}
}
}错误码
参见错误码文档。