Skip to main content

Get Historical Position

20times/S (uid)

Description

Check position history (Only check the data within 3 months

HTTP Request

  • GET /api/v2/mix/position/history-position
Request
curl "https://api.cointr.com/api/v2/mix/position/history-position?productType=USDT-FUTURES" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json"

Request Parameter

ParameterTypeRequiredDescription
symbolStringNoTrading pair
productTypeStringNoProduct type, default:USDT-FUTURES, if symbol parameter reuqest, then this parameter will not take effect
USDT-FUTURES USDT professional futures
COIN-FUTURES Mixed futures
USDC-FUTURES USDC professional futures
SUSDT-FUTURES USDT professional futures demo
SCOIN-FUTURES Mixed futures demo
SUSDC-FUTURES USDC professional futures demo
idLessThanStringNoRequests the content on the page before this ID (older data), the value input should be the endId of the corresponding interface.
startTimeStringNoStart time(timestamp in milliseconds)
timestampis Unix time in milliseconds,for example 1597026383085
(Wildest time range is 3 months,if this field is empty then the default time range is 3 months.)
endTimeStringNoStart time (timestamp in milliseconds)
timestampis Unix time in milliseconds,for example 1597026383085
(Wildest time range is 3 months,if this field is empty then the default time range is 3 months.)
limitStringNoDefault 20 Max 100
Response
{
"code": "00000",
"msg": "success",
"requestTime": 1312312312321,
"data": {
"list":[{
"marginCoin": "USDT",
"symbol": "BTCUSDT",
"holdSide": "long",
"openAvgPrice": "32000",
"closeAvgPrice": "32500",
"marginMode": "fixed",
"openTotalPos": "0.01",
"closeTotalPos": "0.01",
"pnl": "14.1",
"netProfit": "12.1",
"totalFunding": "0.1",
"openFee": "0.01",
"closeFee": "0.01",
"cTime": "1988824171000",
"uTime": "1988824171000"
}],
"endId":"23423432423423234"
}
}

Response Parameter

ParameterTypeDescription
listArrayHistorical Position Data
>symbolStringTrading pair
>marginCoinStringMargin coin
>holdSideStringPosition direction
long: long position
short: short position
>openAvgPriceStringAverage price of opening position
>closeAvgPriceStringAverage price of closing position
>marginModeStringMargin Mode
fixed: Isolated margin
crossed: Cross margin
>openTotalPosStringAccumulated amount of long positions
>closeTotalPosStringAccumulated amount of short positions
>pnlStringrealized profit and loss
>netProfitStringnet profit
>totalFundingStringAccumulated funding costs
>openFeeStringTotal handling fee for position opening
>closeFeeStringTotal handling fee for position closing
>uTimeStringLast update time Timestamp milliseconds
>cTimeStringCreate time Timestamp milliseconds
endIdStringID of the last data。id value is tracking No and use it to check based on idLessThan