Skip to main content

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 NameRequiredTypeDescription
instTypetruestringProduct type
Contract: SWAP
instIdfalsestringProduct ID
mgnModefalsestringMargin mode
Cross: cross
Isolated: isolated
mrgPositionfalsestringPosition mode
Merged: merge
Split: split
posIdfalsestringPosition ID
startTimefalsestringStart time, Unix timestamp in milliseconds
endTimefalsestringEnd time, Unix timestamp in milliseconds
limitfalsestringNumber of results. Default: 100, maximum: 100

Response Parameters

Field NameTypeDescription
instTypestringProduct type
instIdstringProduct ID
mgnModestringMargin mode
mrgPositionstringPosition mode
Merged: merge
Split: split
posIdstringPosition ID
posSidestringPosition side
Long: long
Short: short
avgPxstringAverage open price
closeAvgPxstringAverage close price
posstringPosition size (in contracts)
closePosstringClosed position size (in contracts)
pnlstringProfit and loss
feestringTrading fee. If the historical position fee is unavailable, it is estimated from finished order fees.
fundingFeestringFunding fee
leverstringLeverage size
ccystringMargin currency
cTimestringPosition creation time, Unix timestamp in milliseconds
uTimestringLast 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"
}
]
}