Skip to main content

Position History

Get the user's closed position history using cursor pagination, with filters for trading pair, position side, margin mode, close type, and time range.

API Information

Request Parameters

ParameterLocationTypeRequiredDescription
symbolquerystringNoTrading pair
positionSidequeryintegerNoPosition side: 1=long, 2=short
marginModequeryintegerNoMargin mode: 1=isolated, 2=cross
closeTypequeryintegerNoClose type: 1=user close, 2=take profit, 3=stop loss, 4=liquidation, 5=ADL, 6=bankruptcy
startTimequeryintegerNoStart close time (milliseconds timestamp)
endTimequeryintegerNoEnd close time (milliseconds timestamp)
cursorquerystringNoCursor
limitqueryintegerNoPage size, default 10, max 100

Request Example

GET /fapi/v1/position/history?symbol=BTC_USDT&limit=50

Response Fields

FieldTypeDescription
codeintegerStatus code
messagestringResponse message
data.limitintegerPage size
data.next_cursorstringNext page cursor
data.listarrayHistorical position list (see "Historical Position Detail" for fields)

Response Example

{
"code": 0,
"message": "success",
"data": {
"limit": 10,
"next_cursor": "1711929600000",
"list": [
{
"id": 1,
"position_id": 123,
"user_id": 100001,
"symbol": "BTC_USDT",
"position_side": 1,
"margin_mode": 1,
"leverage": 10,
"open_quantity": 0.1,
"close_quantity": 0.1,
"entry_price": 68500,
"exit_price": 68700,
"open_amount": 6850,
"close_amount": 6870,
"open_fee": 3.425,
"close_fee": 3.435,
"total_funding_fee": -0.5,
"realized_pnl": 20,
"close_type": 1,
"opened_at": 1711929600000,
"closed_at": 1711929700000,
"created_at": 1711929700000
}
]
}
}