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

# Liquidator

> Liquidator WebSocket subscription and response reference.

Connect to `wss://mainnet-ws1.bulk.trade`, then send the subscription below. All channels share the same socket; the page name is not a separate endpoint path. The playground sends read-only subscription messages.

Subscribe to global liquidation-operation and aggregate ADL events. This
subscription takes no symbol filter; filter `data.symbol` in your client.
There is no initial snapshot or historical replay.

```json theme={null}
{"method":"subscribe","subscription":[{"type":"liquidator"}]}
```

The confirmation contains `topics: ["liquidator"]`. Both message types below
use that topic:

```json theme={null}
{
  "type": "liquidator",
  "topic": "liquidator",
  "data": {
    "symbol": "BTC-USD",
    "operation": "offloadPosition",
    "requestedAmount": -1.5,
    "requestedPrice": 64000.0,
    "responseAmount": -1.0,
    "responsePrice": 63980.0,
    "timestamp": 1700000000000000000
  }
}
```

`operation` is `offloadPosition` or `offloadResidual`. Amounts are signed
(positive buy, negative sell); a response amount can be smaller than the
requested amount. Timestamps are nanoseconds.

```json theme={null}
{
  "type": "adlSummary",
  "topic": "liquidator",
  "data": {
    "liquidator": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
    "symbol": "BTC-USD",
    "reason": "underfill",
    "isBuy": true,
    "requestedAmount": 1.5,
    "executedAmount": 1.0,
    "residualAmount": 0.5,
    "participantCount": 3,
    "averagePrice": 63990.0,
    "timestamp": 1700000000000000001
  }
}
```

`reason` is `shortfall` or `underfill`. `isBuy` gives the ADL direction;
`participantCount` is the number of participants in that operation. These
aggregate events complement each participant's
[account liquidation and ADL events](https://docs.bulk.trade/api-reference/ws-account/risk-events.md).

## Connection and Limits

See [connection management](https://docs.bulk.trade/api-reference/ws-connection.md) for reconnect behavior and [public rate limits](https://docs.bulk.trade/api-reference/rate-limits.md) for connection budgets.


## AsyncAPI

````yaml api-reference/asyncapi.yaml liquidator
id: liquidator
title: Liquidator events
description: >-
  Global liquidation-operation and aggregate ADL events. No symbol filter,
  snapshot or replay; filter data.symbol locally. Connect, then send subscribe;
  unsubscribe uses the acknowledged topic. Unsubscribe using the acknowledged
  topic; see [Connection Management](/api-reference/ws-connection#unsubscribe).
servers:
  - id: mainnet
    protocol: wss
    host: mainnet-ws1.bulk.trade
    bindings: []
    variables: []
  - id: testnet
    protocol: wss
    host: exchange-ws1.bulk.trade
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_1
    id: liquidatorSubscribe
    title: Liquidator events subscribe
    type: receive
    messages:
      - &ref_3
        id: subscribe
        contentType: application/json
        payload:
          - name: Liquidator events subscribe
            description: >-
              Schema defaults on this request are playground example prefills,
              not omitted-field defaults accepted by the network endpoint.
            type: object
            properties:
              - name: method
                type: string
                enumValues:
                  - subscribe
                required: true
              - name: subscription
                type: array
                description: >-
                  Playground example prefill. Send the subscription array
                  explicitly; this is not a network-side default.
                required: true
                properties:
                  - name: type
                    type: string
                    enumValues:
                      - liquidator
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            method:
              type: string
              enum:
                - subscribe
              default: subscribe
              x-parser-schema-id: <anonymous-schema-250>
            subscription:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - liquidator
                    default: liquidator
                    x-parser-schema-id: <anonymous-schema-253>
                required:
                  - type
                x-parser-schema-id: <anonymous-schema-252>
              minItems: 1
              default:
                - type: liquidator
              description: >-
                Playground example prefill. Send the subscription array
                explicitly; this is not a network-side default.
              x-parser-schema-id: <anonymous-schema-251>
          required:
            - method
            - subscription
          x-parser-schema-id: <anonymous-schema-249>
        title: Liquidator events subscribe
        description: >-
          Schema defaults on this request are playground example prefills, not
          omitted-field defaults accepted by the network endpoint.
        example: |-
          {
            "method": "subscribe",
            "subscription": [
              {
                "type": "liquidator"
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: liquidator
  - &ref_2
    id: liquidatorEvents
    title: Liquidator events events
    type: send
    messages:
      - &ref_4
        id: liquidator
        contentType: application/json
        payload:
          - name: Liquidator events liquidator
            description: Network-published liquidator
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - liquidator
                required: true
              - name: topic
                type: string
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: symbol
                    type: string
                    required: false
                  - name: operation
                    type: string
                    required: false
                  - name: requestedAmount
                    type: number
                    required: false
                  - name: requestedPrice
                    type: number
                    required: false
                  - name: responseAmount
                    type: number
                    required: false
                  - name: responsePrice
                    type: number
                    required: false
                  - name: timestamp
                    type: number
                    description: Unix timestamp in nanoseconds.
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - liquidator
              x-parser-schema-id: <anonymous-schema-255>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-256>
            data:
              type: object
              properties:
                symbol:
                  type: string
                  x-parser-schema-id: <anonymous-schema-258>
                operation:
                  type: string
                  x-parser-schema-id: <anonymous-schema-259>
                requestedAmount:
                  type: number
                  x-parser-schema-id: <anonymous-schema-260>
                requestedPrice:
                  type: number
                  x-parser-schema-id: <anonymous-schema-261>
                responseAmount:
                  type: number
                  x-parser-schema-id: <anonymous-schema-262>
                responsePrice:
                  type: number
                  x-parser-schema-id: <anonymous-schema-263>
                timestamp:
                  type: number
                  description: Unix timestamp in nanoseconds.
                  x-parser-schema-id: <anonymous-schema-264>
              x-parser-schema-id: <anonymous-schema-257>
          required:
            - type
            - data
            - topic
          x-parser-schema-id: <anonymous-schema-254>
        title: Liquidator events liquidator
        description: Network-published liquidator
        example: |-
          {
            "type": "liquidator",
            "topic": "liquidator",
            "data": {
              "symbol": "BTC-USD",
              "operation": "offloadPosition",
              "requestedAmount": -1.5,
              "requestedPrice": 64000,
              "responseAmount": -1,
              "responsePrice": 63980,
              "timestamp": 1700000000000000000
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: liquidator
      - &ref_5
        id: adlSummary
        contentType: application/json
        payload:
          - name: Liquidator events adlSummary
            description: Network-published adlSummary
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - adlSummary
                required: true
              - name: topic
                type: string
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: liquidator
                    type: string
                    required: false
                  - name: symbol
                    type: string
                    required: false
                  - name: reason
                    type: string
                    required: false
                  - name: isBuy
                    type: boolean
                    required: false
                  - name: requestedAmount
                    type: number
                    required: false
                  - name: executedAmount
                    type: number
                    required: false
                  - name: residualAmount
                    type: number
                    required: false
                  - name: participantCount
                    type: number
                    required: false
                  - name: averagePrice
                    type: number
                    required: false
                  - name: timestamp
                    type: number
                    description: Unix timestamp in nanoseconds.
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - adlSummary
              x-parser-schema-id: <anonymous-schema-266>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-267>
            data:
              type: object
              properties:
                liquidator:
                  type: string
                  x-parser-schema-id: <anonymous-schema-269>
                symbol:
                  type: string
                  x-parser-schema-id: <anonymous-schema-270>
                reason:
                  type: string
                  x-parser-schema-id: <anonymous-schema-271>
                isBuy:
                  type: boolean
                  x-parser-schema-id: <anonymous-schema-272>
                requestedAmount:
                  type: number
                  x-parser-schema-id: <anonymous-schema-273>
                executedAmount:
                  type: number
                  x-parser-schema-id: <anonymous-schema-274>
                residualAmount:
                  type: number
                  x-parser-schema-id: <anonymous-schema-275>
                participantCount:
                  type: number
                  x-parser-schema-id: <anonymous-schema-276>
                averagePrice:
                  type: number
                  x-parser-schema-id: <anonymous-schema-277>
                timestamp:
                  type: number
                  description: Unix timestamp in nanoseconds.
                  x-parser-schema-id: <anonymous-schema-278>
              x-parser-schema-id: <anonymous-schema-268>
          required:
            - type
            - data
            - topic
          x-parser-schema-id: <anonymous-schema-265>
        title: Liquidator events adlSummary
        description: Network-published adlSummary
        example: |-
          {
            "type": "adlSummary",
            "topic": "liquidator",
            "data": {
              "liquidator": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
              "symbol": "BTC-USD",
              "reason": "underfill",
              "isBuy": true,
              "requestedAmount": 1.5,
              "executedAmount": 1,
              "residualAmount": 0.5,
              "participantCount": 3,
              "averagePrice": 63990,
              "timestamp": 1700000000000000000
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: adlSummary
      - &ref_6
        id: subscribed
        contentType: application/json
        payload:
          - name: Liquidator events subscribed
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - subscriptionResponse
                required: true
              - name: topics
                type: array
                required: false
                properties:
                  - name: item
                    type: string
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - subscriptionResponse
              x-parser-schema-id: <anonymous-schema-280>
            topics:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-282>
              x-parser-schema-id: <anonymous-schema-281>
          required:
            - type
          x-parser-schema-id: <anonymous-schema-279>
        title: Liquidator events subscribed
        example: |-
          {
            "type": "subscriptionResponse",
            "topics": [
              "liquidator"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribed
      - &ref_7
        id: unsubscribed
        contentType: application/json
        payload:
          - name: Liquidator events unsubscribed
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribeResponse
                required: true
              - name: topic
                type: string
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribeResponse
              x-parser-schema-id: <anonymous-schema-284>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-285>
          required:
            - type
          x-parser-schema-id: <anonymous-schema-283>
        title: Liquidator events unsubscribed
        example: |-
          {
            "type": "unsubscribeResponse",
            "topic": "liquidator"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribed
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
  - *ref_5
  - *ref_6
  - *ref_7
extensions:
  - id: x-parser-unique-object-id
    value: liquidator
securitySchemes: []

````

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