---
title: "public/get_liquidation_history"
method: POST
path: "/public/get_liquidation_history"
tags: ["Liquidations"]
---

# public/get_liquidation_history

`POST /public/get_liquidation_history`

## Request

- Base URL: `https://api.derive.xyz/v3`
- URL: `https://api.derive.xyz/v3/public/get_liquidation_history`
- Auth: none declared

Returns a paginated history of liquidation auctions, newest first, for a single subaccount or across all of them, optionally bounded by a start/end timestamp window over the auction start. Each entry gives the auctioned subaccount, whether the auction was solvent or insolvent, the fee charged at start, the start and end timestamps, and the bids that filled it with the fraction of the account each absorbed and the cash it moved.

## Request body

- GetLiquidationHistoryRequest: Parameters for `public/get_liquidation_history`. Omit `subaccount_id` to span every account. `[start_timestamp, end_timestamp]` is a unix-millisecond window over the auction *start*.
  - `end_timestamp` integer, nullable: End of the window, unix milliseconds (default: unbounded).
  - `page` integer, nullable: Page number, 1-based (default 1).
  - `page_size` integer, nullable: Results per page (default 100, max 1000).
  - `start_timestamp` integer, nullable: Start of the window, unix milliseconds (default 0).
  - `subaccount_id` integer, nullable

## Response `200`

Success

- LiquidationHistoryResult
  - `auctions` AuctionHistory[], required
    - `auction_id` string, required: `{subaccount_id}-{start_time_sec}` — see the module docs.
    - `auction_type` 'solvent' | 'insolvent', required: Which phase of the auction this entry describes.
    - `bids` AuctionBidEvent[], required
      - `amounts_liquidated` object, required: Change in each of the liquidated account's balances from this bid, keyed by instrument name: a long position taken reads negative, a short one positive. Includes the slice of the account's cash; the bid's own price is `cash_received`, not an entry here. The bidder received the negation.
      - `bidder_id` integer, required: The subaccount that won this slice.
      - `cash_received` string, required: Cash the liquidated account received for the slice: what the bidder paid in the solvent phase, and negative in the insolvent phase, where the security module pays the bidder instead.
      - `discount_pnl` string, required: Always "0" — see the module TODO.
      - `operation_id` string, required: Stable uuid of the bid operation: the `op_uuid` `private/liquidate` returned to the bidder.
      - `percent_liquidated` string, required: Fraction of the account this bid took; "1" is the whole account.
      - `positions_realized_pnl` object, required: Always empty — see the module TODO.
      - `positions_realized_pnl_excl_fees` object, required: Always empty — see the module TODO.
      - `realized_pnl` string, required: Always "0" — see the module TODO.
      - `realized_pnl_excl_fees` string, required: Always "0" — see the module TODO.
      - `risk_universe_id` integer, required: Risk universe of both parties; a bid must come from the liquidatee's.
      - `timestamp` integer, required: When the sequencer applied the bid, unix ms.
      - `tx_hash` string, required: Settling L1 transaction; empty until the bid's batch settles.
      - `unit_price` string, required: Price the bid filled at for the whole account; `cash_received` is this times `percent_liquidated`. Negative in the insolvent phase.
    - `end_timestamp` integer, nullable: When the auction ended, unix ms; `null` while still live.
    - `fee` string, required: Liquidation fee charged at auction start; "0" for a phase opened by conversion to insolvent.
    - `risk_universe_id` integer, required: Risk universe of the liquidated subaccount.
    - `start_timestamp` integer, required: Auction/phase clock start, unix ms.
    - `subaccount_id` integer, required: The liquidated (auctioned) subaccount.
    - `tx_hash` string, required: Settling L1 transaction of the op that opened the auction; empty until that batch settles.
  - `pagination` Pagination, required: Response envelope for paginated RPCs.
    - `count` integer, required
    - `num_pages` integer, required

## Other responses

- `default`: JSON-RPC error (see Error Codes)

## Changes

- **2026-10-20** `0c500202be49`: 1 info
  - added the media type `application/json` for the response with the status `default`

[Operation history](https://skmtc.dev/lyra/apis/derive-v3-api/changes/public/get_liquidation_history/post.md)

---

[API](https://skmtc.dev/lyra/apis/derive-v3-api.md) - [All operations](https://skmtc.dev/lyra/apis/derive-v3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lyra/apis/derive-v3-api/revisions/415f8a73b10c?raw)
