# Liquidators

<figure><picture><source srcset="https://1690371742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsivfyCjOhJUkKrxqsPg4%2Fuploads%2Fi0GbcLwyzEAgMq8lTEWM%2Fbanner_liquidations.png?alt=media&#x26;token=79a62429-4d19-4ff3-8a03-2c1743421b02" media="(prefers-color-scheme: dark)"><img src="https://1690371742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsivfyCjOhJUkKrxqsPg4%2Fuploads%2FPmevHopB6ZtcZwNXrZua%2Fbanner_liquidation_l.png?alt=media&#x26;token=2c1bf97e-c535-417b-b2c8-0598433478d2" alt=""></picture><figcaption></figcaption></figure>

## What are Liquidators?

Anyone can be a liquidator and [request the AMM to liquidate a given trader](https://d8x.gitbook.io/d8x/perpetual-contracts-guide/liquidations). The AMM then either rejects the request if the trader margin is above the initial margin, or proceeds.

The [liquidator earns a fee](https://d8x.gitbook.io/d8x/perpetual-contracts-guide/fee-structure#liquidation-fees) that is subtracted from the trader margin. The liquidation fee is shared between the protocol and the liquidator.

## How can you liquidate positions?

There are different ways to liquidate traders on D8X:

* The [D8X Futures Node SDK provides functions to liquidate positions](https://d8x.gitbook.io/d8x/node-sdk/modules)
* The [D8X open-source liquidator bots](https://github.com/D8-X/d8x-liquidator) allow to liquidate positions


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://d8x.gitbook.io/d8x/contribute-and-earn/liquidators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
