Skip to content

Get History Positions

Rate Limit: 10 req/sec/uid

Description

Get History Positions

HTTP Request

  • GET /api/v1/futures/position/get_history_positions

Request Parameters

ParameterTypeRequiredDescription
symbolstringfalseTrading pair
positionIdstringfalseposition id
startTimeint64falseStart timestamp(position create time)
Unix timestamp in milliseconds format, e.g. 1597026383085
endTimeint64falseStart timestamp(position create time)
Unix timestamp in milliseconds format, e.g. 1597026683085
skipint64falseskip order count default: 0
limitint64falseNumber of queries: Maximum: 100, default: 10

Request Example

bash
curl -X 'GET'  --location 'https://fapi.bitunix.com/api/v1/futures/position/get_history_positions?symbol=BTCUSDT' \
   -H "api-key:*******" \
   -H "sign:*" \
   -H "time:1659076670000" \
   -H "language:en-US" \
   -H "Content-Type: application/json"

Response Parameters

ParameterTypeDescription
positionListlistposition list
>positionIdstringposition id
>symbolstringTrading pair
>maxQtystringmax position amount
>entryPricestringaverage entry price
>closePricestringaverage close price
>liqQtystringliquidate quantity
>sidestringLONG SHORT
>marginModestringISOLATION CROSS
>positionModestringONE_WAY HEDGE
>leverageint32leverage
>feestringDeducted transaction fees: transaction fees deducted during the position
>fundingstringtotal funding fee during the position
>realizedPNLstringRealized PnL(exclude funding fee and transaction fee)
>liqPricestringEstimated liquidation price
If the value <= 0, it means the position is at low risk and there is no liquidation price at this time
>ctimeint64create timestamp
>mtimeint64latest modify timestamp
totalint64total count

Response Example

json
{"code":0,"data":{"positionList":[{"positionId":"12345678","symbol":"BTCUSDT","maxQty":"0.5","entryPrice":"60000","closePrice":"61000","liqQty":"0","side":"LONG","positionMode":"HEDGE","marginMode":"ISOLATION","leverage":100,"fee":"0.1","funding":"-0.2","realizedPNL":"102.9","liqPrice":"22209","ctime":1691382137448,"mtime":1691382137448}],"total":12},"msg":"Success"}