Position History
Query historical closed or liquidated position records (paginated).
API Information
- Method:
POST - Path:
/api/v1/futures/open-api/position/history
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | Filter by futures trading pair |
| coType | int | No | Filter by contract type: 1=US stocks, 2=Hong Kong stocks, 3=Cryptocurrency |
| pageIndex | int | No | Page number, default 1 |
| pageSize | int | No | Records per page, default 10, max 100 |
Request Example
{
"symbol": "BTCUSDT",
"coType": 3,
"pageIndex": 1,
"pageSize": 20
}
Response Fields (data array elements)
| Field | Type | Description |
|---|---|---|
| id | int64 | Position ID |
| symbol | string | Futures trading pair |
| posNo | string | Position number |
| longFlag | int | Direction: 1=Long (Buy), 2=Short (Sell) |
| marginMode | int | Margin mode: 1=Cross, 2=Isolated |
| leverage | string | Leverage |
| posMargin | string | Position margin |
| useMargin | string | Available margin (Isolated only) |
| feeCost | string | Deducted fees |
| nowAmtTotal | string | Position total value (USD) |
| nowVolTotal | string | Position total quantity |
| sellVolTotal | string | Total sell volume |
| sellAmtTotal | string | Total sell amount (USD) |
| buyVolTotal | string | Total buy volume |
| freezeVol | string | Frozen quantity from orders |
| pnl | string | Floating P&L (usually 0 for history) |
| realPnl | string | Realized P&L |
| liqPrice | string | Estimated liquidation price (usually 0 for history) |
| avgPrice | string | Average open price |
| markPrice | string | Mark price (usually 0 for history) |
| maintMargin | string | Maintenance margin (usually 0 for history) |
| closePrice | string | Actual close/liquidation price |
| closeTime | int64 | Close time (milliseconds) |
| ctime | int64 | Creation time (milliseconds) |
| rateReturn | string | Return rate (%) |
| marginRate | string | Margin rate (%) |
| holdMarginRatio | string | Maintenance margin ratio |
| initMargin | string | Initial margin ratio |
| posStatus | int | Position status: 4=Closed, 5=Liquidated |
| pricePrecision | int | Price precision |
| coType | int | Contract type: 1=US stocks, 2=Hong Kong stocks, 3=Cryptocurrency |
| profitPrice | string | Take profit price |
| lossPrice | string | Stop loss price |
| total | int64 | Total record count |
| page | int | Current page |
| size | int | Records per page |
Response Example
{
"code": 200,
"data": [
{
"id": 123456,
"symbol": "BTCUSDT",
"posNo": "P20260325001"
}
]
}