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

# Account Liquidations

> Streams each of an account's positions that liquidation or ADL closed.

Refer to [Websocket](/api-documentation/api/websocket) for establishing the websocket connection.

This channel requires the account's API key. Open the connection with the `PF-API-KEY` header set to a key that belongs to the subscribed account, as described in [API Config Keys](/api-documentation/api/rate-limits/api-config-keys). Any other subscribe fails with code `403`. There is no exchange-wide liquidation channel.

### Params

```json theme={null}
{
    "method": "subscribe",
    "params": {
        "source": "account_liquidations",
        "account": "42trU9A5..."
    }
}
```

### Stream

The channel sends no snapshot on subscribe. It sends each event once, as it happens.

```json theme={null}
{
  "channel": "account_liquidations",
  "data": [
    {
      "u": "42trU9A5...",
      "s": "BTC",
      "m": "adl",
      "d": "ask",
      "a": "0.25",
      "p": "64210",
      "i": null,
      "t": 1760630400000,
      "li": 9123
    }
  ]
}
```

<table><thead><tr><th width="165.800048828125">Field</th><th width="239">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>'u'</code></td><td>string</td><td>Account address</td></tr><tr><td><code>'s'</code></td><td>string</td><td>Symbol</td></tr><tr><td><code>'m'</code></td><td>string</td><td>How the position closed. See below</td></tr><tr><td><code>'d'</code></td><td>string</td><td>Side of the closed position: <code>'bid'</code> - long, <code>'ask'</code> - short</td></tr><tr><td><code>'a'</code></td><td>decimal string</td><td>Closed amount</td></tr><tr><td><code>'p'</code></td><td>decimal string</td><td>Average fill price for <code>'market'</code>, otherwise the transfer or ADL price</td></tr><tr><td><code>'i'</code></td><td>integer</td><td>Liquidation order ID for <code>'market'</code>, otherwise <code>null</code></td></tr><tr><td><code>'t'</code></td><td>number</td><td>Timestamp in milliseconds</td></tr><tr><td><code>'li'</code></td><td>number</td><td><a href="/api-documentation/api/last-id">Last ID</a> — sequence number of the operation</td></tr></tbody></table>

#### Mechanism (`'m'`)

| `'m'` | Account was | How the position closed |
| - | - | - |
| `'market'` | Liquidated | An IOC liquidation order filled on the book |
| `'backstop'` | Liquidated | Transferred to the backstop liquidator |
| `'adl_liquidated'` | Liquidated | Closed against ADL counterparties |
| `'adl'` | An ADL counterparty | Auto-deleveraged to cover another account's liquidation |

Every value except `'adl'` means the account was liquidated. `'adl'` names the profitable side that ADL closed.

A chunked market liquidation sends one event for each chunk that fills. The trades that the close produced arrive on [Account Trades](/api-documentation/api/websocket/subscriptions/account-trades) with the same `li`. Join them on `(li, u, s)`.

The channel does not report delisting closes or the backstop liquidator's side of a transfer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.