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

# Get liquidation history

> Retrieve a paginated history of Morpho Blue liquidation events for a borrower address, read from the indexed store. This is the only place a fully-liquidated (closed) position can be retrieved, since it no longer appears in GET /v1/positions. Ordered by most recent first.

This is a proxy to the Yield.xyz Borrow `GET /v1/positions/liquidations` endpoint. Portal validates the upstream response against the schema documented here before returning it under `data`, and translates `network` values to CAIP-2. If Yield.xyz changes the response shape, Portal returns a 500 with `id: INTEGRATION_RESPONSE_SCHEMA_DRIFT` instead of a partial response. Upstream reference: [docs.yield.xyz](https://docs.yield.xyz/reference/positionscontroller_getliquidations_v1).



## OpenAPI

````yaml /openapi/client-api.yaml get /clients/me/integrations/yield-xyz-borrow/positions/liquidations
openapi: 3.1.0
info:
  title: Portal Client API
  version: '3.0'
  description: >
    The Portal Client API provides endpoints for managing wallets, building
    transactions,

    and interacting with blockchain networks. All endpoints require
    authentication via a

    Client API Key or Client Session Token (CST) passed as a Bearer token.


    ## Base URL

    `https://api.portalhq.io/api/v3`


    ## Authentication

    Include your Client API Key or Client Session Token as a Bearer token in the

    `Authorization` header of every request.


    ## Chain ID Format

    Chain parameters use either friendly names (e.g. `ethereum`, `solana`) or
    CAIP-2 format

    (e.g. `eip155:1`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). When using
    CAIP-2 format

    in URLs, ensure the colon is URI-encoded (`%3A`).
servers:
  - url: https://api.portalhq.io/api/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Clients
    description: Core client management endpoints
  - name: Wallet
    description: >-
      Read wallet state — balances, NFTs, transaction history, capabilities, and
      transaction details
  - name: Transactions
    description: Build, broadcast, and evaluate blockchain transactions
  - name: Funding
    description: Fund wallets with testnet tokens
  - name: Wallet Shares
    description: Manage signing and backup share pairs
  - name: Delegations
    description: Manage token approvals, revocations, and delegated transfers
  - name: Session Keys
    description: Manage EIP-7702 session keys for smart accounts
  - name: 0x
    description: Token swap endpoints powered by the 0x protocol
  - name: Yield.xyz
    description: Yield opportunities and staking actions powered by Yield.xyz
  - name: Yield.xyz Borrow
    description: >-
      Supply collateral, borrow, repay and withdraw from lending markets (Aave
      V3, Morpho Blue, SparkLend, Lista) powered by Yield.xyz Borrow
  - name: Li.Fi
    description: Cross-chain swaps and bridging powered by Li.Fi
  - name: Blockaid
    description: Transaction and address security scanning powered by Blockaid
  - name: Hypernative
    description: >-
      Transaction, address, token, and NFT security scanning powered by
      Hypernative
  - name: Noah
    description: KYC onboarding, payins, and payouts powered by Noah
  - name: Meld
    description: Buy and sell crypto with fiat through aggregated providers powered by Meld
  - name: Due
    description: Payins, payouts, virtual accounts, and FX powered by Due
  - name: EIP-7702
    description: EIP-7702 account type detection and authorization management
  - name: Deprecated
    description: >-
      Legacy endpoints scheduled for removal. Use the newer equivalents listed
      in each endpoint's description.
paths:
  /clients/me/integrations/yield-xyz-borrow/positions/liquidations:
    get:
      tags:
        - Yield.xyz Borrow
      summary: Get liquidation history
      description: >-
        Retrieve a paginated history of Morpho Blue liquidation events for a
        borrower address, read from the indexed store. This is the only place a
        fully-liquidated (closed) position can be retrieved, since it no longer
        appears in GET /v1/positions. Ordered by most recent first.


        This is a proxy to the Yield.xyz Borrow `GET /v1/positions/liquidations`
        endpoint. Portal validates the upstream response against the schema
        documented here before returning it under `data`, and translates
        `network` values to CAIP-2. If Yield.xyz changes the response shape,
        Portal returns a 500 with `id: INTEGRATION_RESPONSE_SCHEMA_DRIFT`
        instead of a partial response. Upstream reference:
        [docs.yield.xyz](https://docs.yield.xyz/reference/positionscontroller_getliquidations_v1).
      operationId: getYieldXyzBorrowLiquidations
      parameters:
        - name: offset
          in: query
          required: false
          schema:
            minimum: 0
            default: 0
            example: 0
            type: integer
          description: Offset for pagination
        - name: limit
          in: query
          required: false
          schema:
            minimum: 1
            maximum: 100
            default: 25
            example: 25
            type: integer
          description: Maximum number of items to return
        - name: integrationId
          in: query
          required: true
          example: morpho-blue-borrow
          schema:
            example: morpho-blue-borrow
            type: string
          description: Integration identifier (must be a Morpho Blue borrow integration)
        - name: network
          in: query
          required: true
          example: eip155:1
          schema:
            type: string
          description: >-
            Network identifier in CAIP-2 format (e.g. `eip155:1` for Ethereum,
            `eip155:8453` for Base). Portal translates this to the Yield.xyz
            network name; unsupported chains are rejected with a 400.
        - name: address
          in: query
          required: true
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f8fB28'
          schema:
            example: '0x742d35Cc6634C0532925a3b844Bc9e7595f8fB28'
            type: string
          description: User wallet address (the liquidated borrower)
        - name: marketId
          in: query
          required: false
          example: morpho-blue-borrow-ethereum-cbbtc-usdc-0x0c6b...
          schema:
            example: morpho-blue-borrow-ethereum-cbbtc-usdc-0x0c6b...
            type: string
          description: >-
            Optional market filter. Accepts the integration market id or the
            on-chain bytes32 market hash.
      responses:
        '200':
          description: Paginated list of liquidation events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldXyzBorrowLiquidationsResponse'
        '400':
          description: >-
            Invalid request (a field failed validation, or `network` is not a
            chain Portal supports). Also returned when Yield.xyz Borrow rejects
            the request or the configured API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Yield.xyz Borrow rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            Yield.xyz Borrow returned a response that does not match the schema
            Portal expects (`id: INTEGRATION_RESPONSE_SCHEMA_DRIFT`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationSchemaDriftErrorResponse'
        '503':
          description: Yield.xyz Borrow is unreachable or returned an upstream error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    YieldXyzBorrowLiquidationsResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/YieldXyzBorrowLiquidationsPage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
    IntegrationSchemaDriftErrorResponse:
      type: object
      description: >-
        Returned (HTTP 500) when a third-party response no longer matches the
        schema Portal proxies for it. The `id` is stable: SDKs should key off it
        and fail gracefully. Portal is alerted automatically and fixes the
        mapping server-side.
      required:
        - error
        - id
        - details
      properties:
        error:
          type: string
          example: >-
            yield-xyz-borrow returned a response for GET /v1/positions that does
            not match the expected schema
        id:
          type: string
          enum:
            - INTEGRATION_RESPONSE_SCHEMA_DRIFT
        details:
          type: object
          required:
            - integration
            - endpoint
            - issues
          properties:
            integration:
              type: string
              example: yield-xyz-borrow
            endpoint:
              type: string
              description: The upstream vendor endpoint whose response drifted.
              example: GET /v1/positions
            issues:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                  - code
                properties:
                  path:
                    type: string
                    description: Dotted path of the offending field in the vendor response.
                    example: supplyBalances.0.balanceUsd
                  message:
                    type: string
                    example: Expected string, received number
                  code:
                    type: string
                    example: invalid_type
    YieldXyzBorrowLiquidationsPage:
      type: object
      required:
        - total
        - offset
        - limit
        - items
      properties:
        total:
          type: integer
          description: Total number of liquidation events matching the query.
          example: 150
        offset:
          type: integer
          example: 0
        limit:
          type: integer
          example: 25
        items:
          type: array
          items:
            $ref: '#/components/schemas/YieldXyzBorrowLiquidation'
    YieldXyzBorrowLiquidation:
      type: object
      required:
        - id
        - integrationId
        - network
        - address
        - marketId
        - type
        - realizedBadDebt
        - occurredAt
        - blockNumber
        - transactionHash
        - transactionLink
        - liquidator
        - repaidDebt
        - seizedCollateral
        - badDebt
        - lif
      properties:
        id:
          type: string
          description: Stable liquidation event id
          example: liq_0b3f...
        integrationId:
          type: string
          description: Integration ID
          example: morpho-blue-borrow
        network:
          type: string
          description: >-
            Network identifier in CAIP-2 format (e.g. `eip155:1`). Chains Portal
            does not support are returned with the Yield.xyz network name
            unchanged.
          example: eip155:1
        address:
          type: string
          description: The liquidated borrower address
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f8fB28'
        marketId:
          type: string
          description: Market ID
          example: morpho-blue-borrow-ethereum-cbbtc-usdc-0x0c6b...
        type:
          type: string
          description: >-
            Whether the borrower's entire debt in the market was cleared by this
            liquidation. `full` when no borrow shares remained afterwards (the
            debt was fully repaid or written off as bad debt); `partial` when
            debt remained. Null when closure could not be determined, e.g. a
            liquidation indexed before this was captured, or a failed position
            read. Known values: `partial`, `full`. Treat unknown values as
            opaque.
          nullable: true
          example: partial
        realizedBadDebt:
          type: boolean
          description: >-
            Whether the liquidation realized bad debt: true when the seized
            collateral was exhausted while the position was still underwater, so
            the protocol socialized the residual loss to suppliers; false when
            the seized collateral covered the repaid debt. This is independent
            of `type`: a `full` liquidation can clear all debt with no bad debt.
          example: false
        occurredAt:
          type: string
          description: Block timestamp of the liquidation (ISO 8601)
          example: '2026-05-21T14:08:12.000Z'
        blockNumber:
          type: number
          description: Block number of the liquidation
          example: 22118447
        transactionHash:
          type: string
          description: Transaction hash of the liquidation
          example: 0x8a3f...
        transactionLink:
          type: string
          description: Block explorer URL for the liquidation transaction
          example: https://etherscan.io/tx/0x8a3f...
        liquidator:
          type: string
          description: Address that performed the liquidation
          example: 0x...
        repaidDebt:
          description: Debt repaid by the liquidator
          allOf:
            - $ref: '#/components/schemas/YieldXyzBorrowRepaidDebt'
        seizedCollateral:
          description: Collateral seized from the borrower
          allOf:
            - $ref: '#/components/schemas/YieldXyzBorrowSeizedCollateral'
        badDebt:
          description: >-
            Bad debt socialized by the protocol. Non-zero only when the
            liquidation realized bad debt.
          allOf:
            - $ref: '#/components/schemas/YieldXyzBorrowBadDebt'
        lif:
          type: string
          description: The market's liquidation incentive factor (LIF).
          example: '1.0449'
    YieldXyzBorrowRepaidDebt:
      type: object
      required:
        - tokenAddress
        - tokenSymbol
        - amount
        - amountRaw
        - amountUsd
        - shares
      properties:
        tokenAddress:
          type: string
          description: Repaid debt token contract address (the market loan token)
          example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
        tokenSymbol:
          type: string
          description: Repaid debt token symbol
          example: USDC
        amount:
          type: string
          description: Repaid debt in human-readable token units
          example: '1500.000000'
        amountRaw:
          type: string
          description: Repaid debt in raw token units
          example: '1500000000'
        amountUsd:
          type: string
          description: >-
            Repaid debt value in USD, priced at the liquidation block. Null when
            no historical price is available.
          example: '1500.00'
          nullable: true
        shares:
          type: string
          description: Repaid debt in borrow shares
          example: '1487123456789012345678'
    YieldXyzBorrowSeizedCollateral:
      type: object
      required:
        - tokenAddress
        - tokenSymbol
        - amount
        - amountRaw
        - amountUsd
      properties:
        tokenAddress:
          type: string
          description: >-
            Seized collateral token contract address (the market collateral
            token)
          example: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf'
        tokenSymbol:
          type: string
          description: Seized collateral token symbol
          example: cbBTC
        amount:
          type: string
          description: Seized collateral in human-readable token units
          example: '0.02356500'
        amountRaw:
          type: string
          description: Seized collateral in raw token units
          example: '2356500'
        amountUsd:
          type: string
          description: >-
            Seized collateral value in USD, priced at the liquidation block.
            Null when no historical price is available.
          example: '1567.34'
          nullable: true
    YieldXyzBorrowBadDebt:
      type: object
      required:
        - amountRaw
        - amount
        - amountUsd
        - shares
      properties:
        amountRaw:
          type: string
          description: >-
            Bad debt in raw loan-token units. Non-zero only when the liquidation
            realized bad debt.
          example: '0'
        amount:
          type: string
          description: Bad debt in human-readable loan-token units
          example: '0'
        amountUsd:
          type: string
          description: >-
            Bad debt value in USD, priced at the liquidation block. Null when no
            historical price is available.
          example: '0.00'
          nullable: true
        shares:
          type: string
          description: Bad debt in borrow shares
          example: '0'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Client API Key or Client Session Token (CST). Pass as a Bearer token in
        the

        Authorization header.

````