get
https://api.liquiditytech.com/api/v1/trading/history/position
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Rate Limit: 30 requests per 10 seconds.
Query closed position history for the current portfolio. Returns up to 90 days of historical data by default.
Request Parameters
| Field | Type | Mandatory | Description |
|---|---|---|---|
sym | String | N | Trading pair unique identifier. e.g. BINANCE_PERP_BTC_USDT, OKX_PERP_BTC_USDT, EDX_PERP_ETH_USDT. |
exchange | String | N | Exchange filter. e.g. BINANCE, OKX, EDX. |
begin | String | N | Start time. Default is up to 90 days ago. Unix timestamp in milliseconds. |
end | String | N | End time. Unix timestamp in milliseconds. |
page | String | N | Current page. Default 1. |
pageSize | String | N | Page size. Default 1000, max 1000. |
Response Fields
Top-level:
| Field | Type | Description |
|---|---|---|
code | Integer | Business status code. 200000 indicates success. |
message | String | Text message for the response. |
data | Object | Pagination information and position list. |
Data object:
| Field | Type | Description |
|---|---|---|
page | Integer | Current page index, starting from 1. |
pageSize | Integer | Page size used for this query. |
pageNum | Integer | Total number of pages. |
totalSize | Integer | Total number of records matching the filters. |
list | Array | List of closed position records. |
Position record (list[]):
| Field | Type | Description |
|---|---|---|
positionId | String | Position ID. |
portfolioId | String | Portfolio ID. |
portfolioName | String | Portfolio name. May be null. |
sym | String | Trading pair unique identifier. |
closedType | String | How the position was closed: PARTIAL_CLOSED, COMPLETE_CLOSED, LIQUIDATION, or SYSTEM_COMPLETE_CLOSED. |
closedPnl | String | Realized PNL from the close. |
closedPnlRatio | String | Realized PNL ratio. |
closedAvgPrice | String | Average closing price. |
maxPositionQty | String | Maximum position quantity held. Unit: contracts for OKX, base currency for BINANCE. |
closedQty | String | Closed quantity. Unit: contracts for OKX, base currency for BINANCE. |
liqFee | String | Liquidation fee (if applicable). |
fundingFee | String | Funding fee. |
fee | String | Trading fee. |
leverage | Integer | Leverage at the time of closing. |
openAvgPrice | String | Average opening price. |
positionHistorySide | String | Position side: LONG, SHORT, or NONE. |
createAt | String | Position creation timestamp in milliseconds. |
updateAt | String | Last update timestamp in milliseconds. |
positionMode | String | Position mode at the time: NET or BOTH. |
Example Response
{
"code": 200000,
"message": "Success",
"data": {
"page": 1,
"pageSize": 1000,
"pageNum": 1,
"totalSize": 1,
"list": [
{
"positionId": "20168941947142980",
"portfolioId": "17xxxxxxxxxxxxxx",
"portfolioName": null,
"sym": "BINANCE_PERP_BTC_USDT",
"closedType": "COMPLETE_CLOSED",
"closedPnl": "-0.0066",
"closedPnlRatio": "-0.00411522633744856",
"closedAvgPrice": "1.214",
"maxPositionQty": "6.6",
"closedQty": "6.6",
"liqFee": "0",
"fundingFee": "0",
"fee": "0.0028055",
"openAvgPrice": "1.215",
"leverage": 5,
"positionHistorySide": "LONG",
"positionMode": "NET",
"createAt": "1775987218376",
"updateAt": "1775987219638"
}
]
}
}
