获取用户历史持仓信息
响应示例
{
"success": true,
"code": 0,
"data": [
{
"positionId": 1027177055,
"symbol": "BTC_USDT",
"positionType": 1,
"openType": 1,
"state": 3,
"holdVol": 0,
"frozenVol": 0,
"closeVol": 2,
"holdAvgPrice": 112449.5,
"holdAvgPriceFullyScale": "112449.5",
"openAvgPrice": 112449.5,
"openAvgPriceFullyScale": "112449.5",
"closeAvgPrice": 113572.3,
"liquidatePrice": 56314.7,
"oim": 0,
"im": 0,
"holdFee": 0,
"realised": 0.2155,
"leverage": 2,
"createTime": 1757506663000,
"updateTime": 1757509217000,
"autoAddIm": false,
"version": 3,
"profitRatio": 0.0191,
"newOpenAvgPrice": 112449.5,
"newCloseAvgPrice": 113572.3,
"closeProfitLoss": 0.2245,
"fee": -0.009,
"positionShowStatus": "CLOSED",
"deductFeeList": [],
"totalFee": 0.009,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0.009
},
{
"positionId": 980739233,
"symbol": "BTC_USDT",
"positionType": 1,
"openType": 1,
"state": 3,
"holdVol": 0,
"frozenVol": 0,
"closeVol": 5,
"holdAvgPrice": 118272.2,
"holdAvgPriceFullyScale": "118272.2",
"openAvgPrice": 118272.2,
"openAvgPriceFullyScale": "118272.2",
"closeAvgPrice": 118669.1,
"liquidatePrice": 112474.5,
"oim": 0,
"im": 0,
"holdFee": 0,
"realised": 0.1747,
"leverage": 20,
"createTime": 1754827319000,
"updateTime": 1754835661000,
"autoAddIm": false,
"version": 3,
"profitRatio": 0.0586,
"newOpenAvgPrice": 118272.2,
"newCloseAvgPrice": 118669.1,
"closeProfitLoss": 0.1984,
"fee": -0.0236,
"positionShowStatus": "CLOSED",
"deductFeeList": [],
"totalFee": 0.0236,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0.0236
}
]
}
- GET
/api/v1/private/position/list/history_positions
需要权限: 读取订单信息
请求参数:
| 参数名 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| symbol | string | false | 合约名 |
| type | int | false | 仓位类型, 1多 2空 |
| start_time | long | false | 开始时间(Unix毫秒时间戳) |
| end_time | long | false | 结束时间(Unix毫秒时间戳) |
| position_type | int | false | 仓位类型, 1多 2空 |
| page_num | int | true | 当前页数,默认为1 |
| page_size | int | true | 每页大小,默认20,最大100 |
响应参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| pageSize | int | 页面大小 |
| totalCount | int | 总条数 |
| totalPage | int | 总页数 |
| currentPage | int | 当前页 |
| resultList | list | 数据结果集 |
| positionId | long | 持仓id |
| symbol | string | 合约名 |
| holdVol | decimal | 持仓数量 |
| positionType | int | 仓位类型, 1多 2空 |
| openType | int | 开仓类型, 1逐仓 2全仓 |
| state | int | 仓位状态,1持仓中2系统代持3已平仓 |
| frozenVol | decimal | 冻结量 |
| closeVol | decimal | 平仓量 |
| holdAvgPrice | decimal | 持仓均价 |
| holdAvgPriceFullyScale | decimal | 全精度持仓均价 |
| closeAvgPrice | decimal | 平仓均价 |
| openAvgPrice | decimal | 开仓均价 |
| openAvgPriceFullyScale | decimal | 全精度开仓均价 |
| liquidatePrice | decimal | 逐仓时的爆仓价 |
| oim | decimal | 原始初始保证金 |
| im | decimal | 初始保证金, 逐仓时可以加减此项以调节爆仓价 |
| holdFee | decimal | 资金费, 正数表示得到,负数表示支出 |
| realised | decimal | 已实现盈亏 |
| leverage | int | 杠杆倍数 |
| marginRatio | decimal | 当前仓位保证金率 |
| autoAddIm | boolean | 是否支持自动追加保证金 |
| profitRatio | decimal | 收益率 已实现盈亏/仓位起始保证金 |
| newOpenAvgPrice | decimal | 开仓均价,与原有开仓均价不一样 |
| newCloseAvgPrice | decimal | 平仓均价,与原有平仓均价不一样 |
| closeProfitLoss | decimal | 平仓盈亏(不考虑手续费) |
| fee | decimal | 手续费(不考虑抵扣) |
| totalFee | decimal | 累积手续费 |
| createTime | date | 创建时间 |
| updateTime | date | 修改时间 |