> ## Documentation Index
> Fetch the complete documentation index at: https://docs.derive.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# public/get_liquidation_history

> 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.



## OpenAPI

````yaml /openapi.json post /public/get_liquidation_history
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: Onchain Actions
    description: >-
      L1 onchain actions submitted via OnchainActionManager: register deposit
      addresses, list pending deposits, and inspect onchain action history.
  - name: System
    description: Rate limits and transaction lookups.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Other
    description: Uncategorized.
paths:
  /public/get_liquidation_history:
    post:
      tags:
        - History
      summary: public/get_liquidation_history
      description: >-
        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.
      operationId: public_get_liquidation_history
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetLiquidationHistoryRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiquidationHistoryResult'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    GetLiquidationHistoryRequest:
      description: >-
        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*.
      type: object
      properties:
        end_timestamp:
          description: 'End of the window, unix milliseconds (default: unbounded).'
          default: null
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
        page:
          description: Page number, 1-based (default 1).
          default: null
          type:
            - integer
            - 'null'
          format: uint32
          minimum: 0
        page_size:
          description: Results per page (default 100, max 1000).
          default: null
          type:
            - integer
            - 'null'
          format: uint32
          minimum: 0
        start_timestamp:
          description: Start of the window, unix milliseconds (default 0).
          default: null
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
        subaccount_id:
          default: null
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
    LiquidationHistoryResult:
      type: object
      required:
        - auctions
        - pagination
      properties:
        auctions:
          type: array
          items:
            $ref: '#/components/schemas/AuctionHistory'
        pagination:
          $ref: '#/components/schemas/Pagination'
    AuctionHistory:
      description: One auction phase and the bids that filled it.
      type: object
      required:
        - auction_id
        - auction_type
        - bids
        - fee
        - start_timestamp
        - subaccount_id
        - tx_hash
      properties:
        auction_id:
          description: '`{subaccount_id}-{start_time_sec}` — see the module docs.'
          type: string
        auction_type:
          $ref: '#/components/schemas/AuctionType'
        bids:
          type: array
          items:
            $ref: '#/components/schemas/AuctionBidEvent'
        end_timestamp:
          description: When the auction ended, unix ms; `null` while still live.
          type:
            - integer
            - 'null'
          format: uint64
          minimum: 0
        fee:
          description: >-
            Liquidation fee charged at auction start; "0" for a phase opened by
            conversion to insolvent.
          type: string
        start_timestamp:
          description: Auction/phase clock start, unix ms.
          type: integer
          format: uint64
          minimum: 0
        subaccount_id:
          description: The liquidated (auctioned) subaccount.
          type: integer
          format: uint64
          minimum: 0
        tx_hash:
          description: >-
            Settling L1 transaction of the op that opened the auction; empty
            until that batch settles.
          type: string
    Pagination:
      description: Response envelope for paginated RPCs.
      type: object
      required:
        - count
        - num_pages
      properties:
        count:
          type: integer
          format: uint64
          minimum: 0
        num_pages:
          type: integer
          format: uint64
          minimum: 0
    AuctionType:
      description: Which phase of the auction this entry describes.
      type: string
      enum:
        - solvent
        - insolvent
    AuctionBidEvent:
      description: One executed bid within an auction. Amounts are decimal strings.
      type: object
      required:
        - amounts_liquidated
        - cash_received
        - discount_pnl
        - percent_liquidated
        - positions_realized_pnl
        - positions_realized_pnl_excl_fees
        - realized_pnl
        - realized_pnl_excl_fees
        - timestamp
        - tx_hash
      properties:
        amounts_liquidated:
          description: >-
            Amounts of each asset that were closed. Always empty — see the
            module TODO; the protocol event does not carry the per-asset
            breakdown.
          type: object
          additionalProperties:
            type: string
        cash_received:
          description: >-
            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.
          type: string
        discount_pnl:
          description: Always "0" — see the module TODO.
          type: string
        percent_liquidated:
          description: Fraction of the account this bid took; "1" is the whole account.
          type: string
        positions_realized_pnl:
          description: Always empty — see the module TODO.
          type: object
          additionalProperties:
            type: string
        positions_realized_pnl_excl_fees:
          description: Always empty — see the module TODO.
          type: object
          additionalProperties:
            type: string
        realized_pnl:
          description: Always "0" — see the module TODO.
          type: string
        realized_pnl_excl_fees:
          description: Always "0" — see the module TODO.
          type: string
        timestamp:
          description: When the sequencer applied the bid, unix ms.
          type: integer
          format: uint64
          minimum: 0
        tx_hash:
          description: Settling L1 transaction; empty until the bid's batch settles.
          type: string

````

## Related topics

- [Coming soon](/migrating/coming-soon.md)
- [public/get_trade_history](/api-reference/market-data/publicget_trade_history.md)
- [public/get_funding_rate_history](/api-reference/market-data/publicget_funding_rate_history.md)
