Get Positions History
This interface can query position history information records
{
"success": true,
"code": "200",
"msg": "success",
"retry": false,
"data": {
"currentPage": 1,
"pageSize": 10,
"totalNum": 25,
"totalPage": 3,
"items": [
{
"closeId": "300000000000000030",
"positionId": "300000000000000009",
"uid": 99996908309485,
"userId": "6527d4fc8c7f3d0001f40f5f",
"symbol": "XBTUSDM",
"settleCurrency": "XBT",
"leverage": "0.0",
"type": "LIQUID_LONG",
"side": null,
"closeSize": null,
"pnl": "-1.0000003793999999",
"realisedGrossCost": "0.9993849748999999",
"withdrawPnl": "0.0",
"roe": null,
"tradeFee": "0.0006154045",
"fundingFee": "0.0",
"openTime": 1713785751181,
"closeTime": 1713785752784,
"openPrice": null,
"closePrice": null
}
]
}
}
HTTP REQUEST
GET /api/v1/history-positions
Example
GET /api/v1/history-positions
API KEY PERMISSIONS
This endpoint requires the General permission.
REQUEST URL
This endpoint support Futures URL
REQUEST RATE LIMIT
Futures weight
:2
PARAMETERS
Param | Type | Mandatory | Description |
---|---|---|---|
symbol | String | No | Symbol |
from | long | No | Closing start time(ms) |
to | long | No | Closing end time(ms) |
limit | int | No | Number of requests per page, max 200, default 10 |
pageId | int | No | Current page number, default 1 |
RESPONSES
Param | Description |
---|---|
currentPage | Current page number |
pageSize | Number of results per page |
totalNum | Total number of results |
totalPage | Total number of pages |
closeId | Close ID |
positionId | Position ID |
uid | UID |
userId | User ID |
symbol | Symbol |
settleCurrency | Currency used to settle trades |
leverage | Leverage applied to the order |
type | Type of closure |
side | Direction of the trade (buy or sell) |
closeSize | Quantity of the position closed |
pnl | Net profit and loss (after deducting fees and funding costs) |
realisedGrossCost | Accumulated realised gross profit value |
withdrawPnl | Accumulated realised profit withdrawn from the position |
roe | Rate of return on equity (reserved field, currently no value) |
tradeFee | Accumulated trading fees |
fundingFee | Accumulated funding fees |
openTime | Time when the position was opened |
closeTime | Time when the position was closed (default sorted in descending order) |
openPrice | Opening price of the position |
closePrice | Closing price of the position |