Get Positions History
Get Positions History
Get historical positions list.
Request frequency limit: 1/1s
Request URL
GET /deepcoin/account/positions-history
Request Parameters
| Field Name | Required | Type | Description |
|---|---|---|---|
| instType | true | string | Product type Contract: SWAP |
| instId | false | string | Product ID |
| mgnMode | false | string | Margin mode Cross: crossIsolated: isolated |
| mrgPosition | false | string | Position mode Merged: mergeSplit: split |
| posId | false | string | Position ID |
| startTime | false | string | Start time, Unix timestamp in milliseconds |
| endTime | false | string | End time, Unix timestamp in milliseconds |
| limit | false | string | Number of results. Default: 100, maximum: 100 |
Response Parameters
| Field Name | Type | Description |
|---|---|---|
| instType | string | Product type |
| instId | string | Product ID |
| mgnMode | string | Margin mode |
| mrgPosition | string | Position mode Merged: mergeSplit: split |
| posId | string | Position ID |
| posSide | string | Position side Long: longShort: short |
| avgPx | string | Average open price |
| closeAvgPx | string | Average close price |
| pos | string | Position size (in contracts) |
| closePos | string | Closed position size (in contracts) |
| pnl | string | Profit and loss |
| fee | string | Trading fee. If the historical position fee is unavailable, it is estimated from finished order fees. |
| fundingFee | string | Funding fee |
| lever | string | Leverage size |
| ccy | string | Margin currency |
| cTime | string | Position creation time, Unix timestamp in milliseconds |
| uTime | string | Last position update time, Unix timestamp in milliseconds |
Response Example
{
"code": "0",
"msg": "",
"data": [
{
"instType": "SWAP",
"instId": "BTC-USDT-SWAP",
"mgnMode": "cross",
"mrgPosition": "merge",
"posId": "1000596260760627",
"posSide": "long",
"avgPx": "87621.8",
"closeAvgPx": "87688.4",
"pos": "3101",
"closePos": "3101",
"pnl": "206.79299996",
"fee": "54.36372732",
"fundingFee": "0",
"lever": "10",
"ccy": "USDT",
"cTime": "1763569021000",
"uTime": "1764836861000"
}
]
}