Get Historical Positions
Response Example
{
"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
Required Permission: View Order Details
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | false | Contract |
| type | int | false | Position type, 1 long 2 short |
| start_time | long | false | Unix millisecond timestamp |
| end_time | long | false | Unix millisecond timestamp |
| position_type | int | false | Position type, 1 long 2 short |
| page_num | int | true | Current page, default 1 |
| page_size | int | true | Page size, default 20, max 100 |
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| pageSize | int | Page size |
| totalCount | int | Total count |
| totalPage | int | Total pages |
| currentPage | int | Current page |
| resultList | list | Result set |
| positionId | long | Position id |
| symbol | string | Contract |
| holdVol | decimal | Position size |
| positionType | int | Position type, 1 long 2 short |
| openType | int | Open type, 1 isolated 2 cross |
| state | int | Position status,1 holding 2 system-held 3 closed |
| frozenVol | decimal | Frozen volume |
| closeVol | decimal | Closed volume |
| holdAvgPrice | decimal | Average position price |
| holdAvgPriceFullyScale | decimal | Full precision position price |
| closeAvgPrice | decimal | Average closing price |
| openAvgPrice | decimal | Average opening price |
| openAvgPriceFullyScale | decimal | Full precision opening price |
| liquidatePrice | decimal | Liquidation price in isolated mode |
| oim | decimal | Original initial margin |
| im | decimal | Initial margin, adjustable in isolated mode to tune liquidation price |
| holdFee | decimal | Funding fee, positive = received, negative = paid |
| realised | decimal | Realized PnL |
| leverage | int | Leverage |
| marginRatio | decimal | Current position margin ratio |
| autoAddIm | boolean | Auto-add initial margin supported |
| profitRatio | decimal | Return ratio = realized PnL/initial margin |
| newOpenAvgPrice | decimal | Average opening price, differs from original |
| newCloseAvgPrice | decimal | Average closing price, differs from original |
| closeProfitLoss | decimal | Close PnL (fees excluded) |
| fee | decimal | Fees (excluding deductions) |
| totalFee | decimal | Accumulated fees |
| createTime | date | Created time |
| updateTime | date | Updated time |