| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Retrieve a paginated list of liquidation events for a RapidX Portfolio over a time range. Use this endpoint to review liquidation history or retrieve events that occurred while WebSocket was disconnected. Each result includes an event summary and the available snapshots for each recorded step, including account, asset, position, and pre-cancellation order data.
Omit all query parameters to retrieve the first page of events from the preceding 48 hours for the Portfolio associated with your API key. The default page size is 20. To specify a time range, provide both startTime and endTime.
Rate Limit: 20 requests per 60 seconds.
Permission: RapidX API key with read-only permission is sufficient. No trading / write permission is required.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
startTime | Long | Conditional | Inclusive start of the time range, in Unix milliseconds. Required when endTime is supplied or page is greater than 1. |
endTime | Long | Conditional | Exclusive end of the time range, in Unix milliseconds. Required when startTime is supplied or page is greater than 1. |
portfolioId | String | No | ID of the Portfolio to query. Defaults to the Portfolio associated with the API key. |
page | Integer | No | Page number, starting at 1. Defaults to 1. For page 2 or later, send both time parameters. |
pageSize | Integer | No | Events per page. Defaults to 20. Allowed range: 1 through 50. |
Portfolio access:
| API key | When portfolioId is omitted | When portfolioId is supplied |
|---|---|---|
| Main API key | The associated Main Portfolio. | The associated Main Portfolio or one of its Sub Portfolios. |
| Sub Portfolio API key | The associated Sub Portfolio. | Only the Sub Portfolio associated with the key. |
Time window:
- On page 1, omitting both time parameters selects the preceding 48 hours relative to the current server time.
- For an explicit time range, provide positive Unix millisecond timestamps with
startTime < endTime. The range can span up to 7 days.startTimemust be within the preceding 90 days, andendTimemust be at or before the current server time. - An event matches when
startTime <= createAt < endTime. The event'screateAtis the start time of its first recorded liquidation step. Snapshots from subsequent steps may fall outside the requested time range.
Response Fields
Top-level:
| Field | Type | Description |
|---|---|---|
code | Integer | Business status code. 200000 indicates success. |
message | String | Text message for the response. |
data | Object | A page of liquidation events. |
data:
| Field | Type | Description |
|---|---|---|
page | Integer | Current page number. |
pageSize | Integer | Effective page size. |
totalSize | Integer | Total events matching the query. |
startTime | Long | Effective start of the query, inclusive, in Unix milliseconds. |
endTime | Long | Effective end of the query, exclusive, in Unix milliseconds. |
list | Array | Matching events ordered by createAt descending. Events with the same createAt are ordered by liquidationEventId ascending. |
data.list[]:
| Field | Type | Description |
|---|---|---|
liquidationEventId | String | Liquidation event ID. |
portfolioId | String | ID of the Portfolio to which the event belongs. |
exchangeType | String | Exchange on which the event occurred. |
eventType | String | CANCELLATION for events that only cancel orders. POSITION_LIQUIDATION for events that force-close positions. |
createAt | Long | Start of the event's first business node, in Unix milliseconds. The query window filters on this value. |
updateAt | Long | Most recent event update time, in Unix milliseconds. |
triggerUniMmr | String | Unified maintenance margin ratio at the liquidation trigger. Applies to POSITION_LIQUIDATION. |
totalPositionsLiquidated | Integer | Total number of positions liquidated. Applies to POSITION_LIQUIDATION. |
totalClosedPnl | String | Aggregate realized PnL in USDT. A negative value indicates a loss. Applies to POSITION_LIQUIDATION. |
totalLiqFee | String | Total liquidation fees in USDT. Applies to POSITION_LIQUIDATION. |
nodes | Array | Recorded node snapshots ordered by node start time, earliest first. |
data.list[].nodes[]:
| Field | Type | Description |
|---|---|---|
nodeId | Long | Node ID. Preserve its 64-bit integer precision when parsing. |
nodeType | String | Type of liquidation step. Examples include CANCEL_OPEN_START, CANCEL_ALL_START, LIQUIDATING_START, CANCEL_ALL_ORDERS, POSITION_REDUCE, and COMPLETED. A completed node can have a suffix, as in COMPLETED(ASSET_SALE). |
roundSeq | Integer | Position reduction round, starting at 1. Returned for POSITION_REDUCE nodes. |
createAt | Long | Node start time, in Unix milliseconds. |
updateAt | Long | Node completion or latest update time, in Unix milliseconds. |
account | Object | Account snapshot. The POSITION_LIQUIDATED container node omits this field. |
assets | Array | Asset snapshots, when available for the node. |
positions | Array | Position snapshots, when available for the node. The array can be empty. |
orders | Array | Open-order snapshots taken before cancellation. Included when a CANCEL_OPEN_ORDERS or CANCEL_ALL_ORDERS node has order snapshots. |
data.list[].nodes[].account:
| Field | Type | Description |
|---|---|---|
equity | String | Total account equity in USDT equivalent. |
uniMmr | String | Unified maintenance margin ratio, calculated as validMargin / maintainMargin. A value of "1" represents 100%. The value is "999999" when there is no maintenance margin requirement. |
validMargin | String | Effective margin. |
maintainMargin | String | Maintenance margin required for open positions. |
availableMargin | String | Margin available for new positions or withdrawal. |
upnl | String | Account unrealized PnL in USDT. |
accountStatus | String | Account status at the node, for example NORMAL or LIQUIDATING. |
data.list[].nodes[].assets[]:
| Field | Type | Description |
|---|---|---|
coin | String | Asset symbol, for example USDT. |
exchangeType | String | Exchange holding the balance. |
equity | String | Equity for this asset. |
available | String | Available quantity. |
frozen | String | Quantity held or locked. |
borrow | String | Borrowed quantity. |
debt | String | Outstanding debt in this asset. |
price | String | Asset price in USDT at the snapshot. |
data.list[].nodes[].positions[]:
| Field | Type | Description |
|---|---|---|
positionId | String | Position ID. |
exchangeType | String | Exchange holding the position. |
sym | String | Unified symbol, for example BINANCE_PERP_BTC_USDT. |
positionSide | String | Position side, for example NONE, LONG, or SHORT. |
positionQty | String | Position quantity. Units vary by venue and product. For example, OKX perpetuals use contracts and Binance perpetuals use the base asset quantity. |
positionValue | String | Position value at the mark price. |
markPrice | String | Mark price at the snapshot. |
unrealizedPnl | String | Unrealized position PnL in USDT. |
positionMode | String | Position mode, for example NET. |
leverage | Integer | Position leverage. |
closedQty | String | Quantity reduced at this node, in the same units as positionQty. |
closedPnl | String | Realized PnL from this reduction, in USDT. |
liqFee | String | Liquidation fee for this position at the node, in USDT. |
data.list[].nodes[].orders[]:
| Field | Type | Description |
|---|---|---|
orderId | String | Order ID. |
exchangeType | String | Exchange on which the order was placed. |
sym | String | Unified symbol. |
side | String | Order side, BUY or SELL. |
orderType | String | Order type. |
price | String | Order price. |
orderQty | String | Order quantity. |
orderState | String | Order status before cancellation. |
reduceOnly | Boolean | Indicates whether the order can only reduce a position. |
Example Response
{
"code": 200000,
"message": "Success",
"data": {
"page": 1,
"pageSize": 20,
"totalSize": 1,
"startTime": 1795584868796,
"endTime": 1795757668796,
"list": [
{
"liquidationEventId": "9000000000000001",
"portfolioId": "9000000000000101",
"exchangeType": "BINANCE",
"eventType": "POSITION_LIQUIDATION",
"createAt": 1795587267373,
"updateAt": 1795588089273,
"triggerUniMmr": "0.97611617033486610500",
"totalPositionsLiquidated": 1,
"totalClosedPnl": "0.034",
"totalLiqFee": "0.243",
"nodes": [
{
"nodeId": 9000000000000301,
"nodeType": "LIQUIDATING_START",
"createAt": 1795587267373,
"updateAt": 1795587267373,
"account": {
"equity": "10.200596669450716357",
"uniMmr": "0.97611617033486610500",
"validMargin": "9.94555269075944844808",
"maintainMargin": "10.1889027075",
"availableMargin": "-4.98792480924055155193",
"upnl": "0.035955",
"accountStatus": "LIQUIDATING"
},
"assets": [
{
"coin": "USDT",
"exchangeType": "BINANCE",
"equity": "10.200596669450716357",
"available": "10.164641669450716357",
"frozen": "0",
"borrow": "0",
"debt": "0",
"price": "1"
}
],
"positions": [
{
"positionId": "90000000000000201",
"exchangeType": "BINANCE",
"sym": "BINANCE_PERP_DOT_USDT",
"positionSide": "NONE",
"positionQty": "20",
"positionValue": "12.961955",
"markPrice": "0.64809775",
"unrealizedPnl": "0.035955",
"positionMode": "NET",
"leverage": 2,
"closedQty": "0",
"closedPnl": "0",
"liqFee": "0"
}
]
},
{
"nodeId": 9000000000000302,
"nodeType": "CANCEL_ALL_ORDERS",
"createAt": 1795587267662,
"updateAt": 1795587267662,
"account": {
"equity": "10.200596669450716357",
"uniMmr": "0.98624747705524995100",
"validMargin": "9.94556879075944844808",
"maintainMargin": "10.0842527075",
"availableMargin": "3.46459129075944844808",
"upnl": "0.035955",
"accountStatus": "LIQUIDATING"
},
"assets": [
{
"coin": "USDT",
"exchangeType": "BINANCE",
"equity": "10.200596669450716357",
"available": "10.164641669450716357",
"frozen": "0",
"borrow": "0",
"debt": "0",
"price": "1"
}
],
"positions": [
{
"positionId": "90000000000000201",
"exchangeType": "BINANCE",
"sym": "BINANCE_PERP_DOT_USDT",
"positionSide": "NONE",
"positionQty": "20",
"positionValue": "12.961955",
"markPrice": "0.64809775",
"unrealizedPnl": "0.035955",
"positionMode": "NET",
"leverage": 2,
"closedQty": "0",
"closedPnl": "0",
"liqFee": "0"
}
]
},
{
"nodeId": 9000000000000303,
"nodeType": "POSITION_REDUCE",
"roundSeq": 1,
"createAt": 1795587268055,
"updateAt": 1795587268055,
"account": {
"equity": "9.955628709450716357",
"uniMmr": "0.97067379917144484400",
"validMargin": "9.70673799171444844808",
"maintainMargin": "10",
"availableMargin": "9.70673799171444844808",
"upnl": "0",
"accountStatus": "LIQUIDATING"
},
"assets": [
{
"coin": "USDT",
"exchangeType": "BINANCE",
"equity": "9.955628709450716357",
"available": "9.955628709450716357",
"frozen": "0",
"borrow": "0",
"debt": "0",
"price": "1"
}
],
"positions": [
{
"positionId": "90000000000000202",
"exchangeType": "BINANCE",
"sym": "BINANCE_PERP_DOT_USDT",
"positionSide": "NONE",
"positionQty": "0",
"positionValue": "0",
"markPrice": "0.64809775",
"unrealizedPnl": "0",
"positionMode": "NET",
"leverage": 2,
"closedQty": "0",
"closedPnl": "0",
"liqFee": "0"
}
]
},
{
"nodeId": 9000000000000304,
"nodeType": "COMPLETED(ASSET_SALE)",
"createAt": 1795588089273,
"updateAt": 1795588089273,
"account": {
"equity": "9.955628709450716357",
"uniMmr": "999999.00000000000000000000",
"validMargin": "9.70673799171444844808",
"maintainMargin": "0",
"availableMargin": "9.70673799171444844808",
"upnl": "0",
"accountStatus": "NORMAL"
},
"assets": [
{
"coin": "USDT",
"exchangeType": "BINANCE",
"equity": "9.955628709450716357",
"available": "9.955628709450716357",
"frozen": "0",
"borrow": "0",
"debt": "0",
"price": "1"
}
]
}
]
}
]
}
}