Liquidation Event List

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

FieldTypeRequiredDescription
startTimeLongConditionalInclusive start of the time range, in Unix milliseconds. Required when endTime is supplied or page is greater than 1.
endTimeLongConditionalExclusive end of the time range, in Unix milliseconds. Required when startTime is supplied or page is greater than 1.
portfolioIdStringNoID of the Portfolio to query. Defaults to the Portfolio associated with the API key.
pageIntegerNoPage number, starting at 1. Defaults to 1. For page 2 or later, send both time parameters.
pageSizeIntegerNoEvents per page. Defaults to 20. Allowed range: 1 through 50.

Portfolio access:

API keyWhen portfolioId is omittedWhen portfolioId is supplied
Main API keyThe associated Main Portfolio.The associated Main Portfolio or one of its Sub Portfolios.
Sub Portfolio API keyThe 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. startTime must be within the preceding 90 days, and endTime must be at or before the current server time.
  • An event matches when startTime <= createAt < endTime. The event's createAt is the start time of its first recorded liquidation step. Snapshots from subsequent steps may fall outside the requested time range.

Response Fields

Top-level:

FieldTypeDescription
codeIntegerBusiness status code. 200000 indicates success.
messageStringText message for the response.
dataObjectA page of liquidation events.

data:

FieldTypeDescription
pageIntegerCurrent page number.
pageSizeIntegerEffective page size.
totalSizeIntegerTotal events matching the query.
startTimeLongEffective start of the query, inclusive, in Unix milliseconds.
endTimeLongEffective end of the query, exclusive, in Unix milliseconds.
listArrayMatching events ordered by createAt descending. Events with the same createAt are ordered by liquidationEventId ascending.

data.list[]:

FieldTypeDescription
liquidationEventIdStringLiquidation event ID.
portfolioIdStringID of the Portfolio to which the event belongs.
exchangeTypeStringExchange on which the event occurred.
eventTypeStringCANCELLATION for events that only cancel orders. POSITION_LIQUIDATION for events that force-close positions.
createAtLongStart of the event's first business node, in Unix milliseconds. The query window filters on this value.
updateAtLongMost recent event update time, in Unix milliseconds.
triggerUniMmrStringUnified maintenance margin ratio at the liquidation trigger. Applies to POSITION_LIQUIDATION.
totalPositionsLiquidatedIntegerTotal number of positions liquidated. Applies to POSITION_LIQUIDATION.
totalClosedPnlStringAggregate realized PnL in USDT. A negative value indicates a loss. Applies to POSITION_LIQUIDATION.
totalLiqFeeStringTotal liquidation fees in USDT. Applies to POSITION_LIQUIDATION.
nodesArrayRecorded node snapshots ordered by node start time, earliest first.

data.list[].nodes[]:

FieldTypeDescription
nodeIdLongNode ID. Preserve its 64-bit integer precision when parsing.
nodeTypeStringType 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).
roundSeqIntegerPosition reduction round, starting at 1. Returned for POSITION_REDUCE nodes.
createAtLongNode start time, in Unix milliseconds.
updateAtLongNode completion or latest update time, in Unix milliseconds.
accountObjectAccount snapshot. The POSITION_LIQUIDATED container node omits this field.
assetsArrayAsset snapshots, when available for the node.
positionsArrayPosition snapshots, when available for the node. The array can be empty.
ordersArrayOpen-order snapshots taken before cancellation. Included when a CANCEL_OPEN_ORDERS or CANCEL_ALL_ORDERS node has order snapshots.

data.list[].nodes[].account:

FieldTypeDescription
equityStringTotal account equity in USDT equivalent.
uniMmrStringUnified maintenance margin ratio, calculated as validMargin / maintainMargin. A value of "1" represents 100%. The value is "999999" when there is no maintenance margin requirement.
validMarginStringEffective margin.
maintainMarginStringMaintenance margin required for open positions.
availableMarginStringMargin available for new positions or withdrawal.
upnlStringAccount unrealized PnL in USDT.
accountStatusStringAccount status at the node, for example NORMAL or LIQUIDATING.

data.list[].nodes[].assets[]:

FieldTypeDescription
coinStringAsset symbol, for example USDT.
exchangeTypeStringExchange holding the balance.
equityStringEquity for this asset.
availableStringAvailable quantity.
frozenStringQuantity held or locked.
borrowStringBorrowed quantity.
debtStringOutstanding debt in this asset.
priceStringAsset price in USDT at the snapshot.

data.list[].nodes[].positions[]:

FieldTypeDescription
positionIdStringPosition ID.
exchangeTypeStringExchange holding the position.
symStringUnified symbol, for example BINANCE_PERP_BTC_USDT.
positionSideStringPosition side, for example NONE, LONG, or SHORT.
positionQtyStringPosition quantity. Units vary by venue and product. For example, OKX perpetuals use contracts and Binance perpetuals use the base asset quantity.
positionValueStringPosition value at the mark price.
markPriceStringMark price at the snapshot.
unrealizedPnlStringUnrealized position PnL in USDT.
positionModeStringPosition mode, for example NET.
leverageIntegerPosition leverage.
closedQtyStringQuantity reduced at this node, in the same units as positionQty.
closedPnlStringRealized PnL from this reduction, in USDT.
liqFeeStringLiquidation fee for this position at the node, in USDT.

data.list[].nodes[].orders[]:

FieldTypeDescription
orderIdStringOrder ID.
exchangeTypeStringExchange on which the order was placed.
symStringUnified symbol.
sideStringOrder side, BUY or SELL.
orderTypeStringOrder type.
priceStringOrder price.
orderQtyStringOrder quantity.
orderStateStringOrder status before cancellation.
reduceOnlyBooleanIndicates 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"
              }
            ]
          }
        ]
      }
    ]
  }
}
Query Params
int64
int64
string
integer
Defaults to 1
integer
Defaults to 20
Response

Language
LoadingLoading…
Response
Choose an example:
application/json