获取用户当前持仓
HTTP请求
- GET
/api/v1/private/position/open_positions
接口权限要求: 读取订单信息
请求参数
| 参数名 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| symbol | string | false | 合约名 |
| positionId | long | false | 仓位ID |
返回参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| 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 | 原始初始保证金 |
| adlLevel | int | adl减仓等级,取值为 1-5,为空时需等待刷新.什么是ADL自动减仓? |
| 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 | 修改时间 |
| positionDrop | boolean | 是否为空投仓位 |
| lowSaveTotalFee | string | 低费节省手续费 |
| feeRates | object | 费率区间。最大费率和最小费率相等时显示一个值 |
| min | number | 最小费率 |
| max | number | 最大费率 |
| unRealizedPnl | number | 未实现盈亏 |
响应
{
"success": true,
"code": 0,
"data": [
{
"positionId": 1109973831,
"symbol": "BTC_USDT",
"positionType": 1,
"openType": 1,
"state": 1,
"holdVol": 5,
"frozenVol": 0,
"closeVol": 0,
"holdAvgPrice": 109777.5,
"holdAvgPriceFullyScale": "109777.5",
"openAvgPrice": 109777.5,
"openAvgPriceFullyScale": "109777.5",
"closeAvgPrice": 0,
"liquidatePrice": 55020.5,
"oim": 27.444375,
"im": 27.444375,
"holdFee": 0,
"realised": 0,
"leverage": 2,
"marginRatio": 0.0027,
"createTime": 1761887133854,
"updateTime": 1761887133854,
"autoAddIm": false,
"version": 1,
"profitRatio": 0,
"newOpenAvgPrice": 109777.5,
"newCloseAvgPrice": 0,
"closeProfitLoss": 0,
"fee": 0,
"deductFeeList": [],
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0.0301,
"zeroTradeTotalFeeBinance": 0.0301,
"lowSaveTotalFee": 0,
"positionDrop": false,
"feeRates": {
"min": 0,
"max": 0
},
"unRealizedPnl": -0.0039
}
]
}