API & MCP
Everything a person can do on DeFi Liquidation Explorer, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://defiliquidationexplorer.usefulweb.site/api/v1/calculate– run DeFi Liquidation ExplorerGET https://defiliquidationexplorer.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
DeFi Liquidation Explorer
Reads Aave V3 LiquidationCall events from the official Pool contract over a recent block window (Ethereum, Base, Arbitrum, OP Mainnet, Polygon, Avalanche, BNB Chain), resolves token symbols and decimals on-chain, values each liquidation at current DefiLlama prices, ranks liquidators and borrowers, and checks any address's current health factor with getUserAccountData — so you can see how close a position is to liquidation.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (lookup, logs) | "lookup" | What do you have? |
chain | select (ethereum, base, arbitrum, optimism, polygon, avalanche, bsc) | "ethereum" | Aave V3 market |
blocks | integer | 2000 | Blocks to scan back from the latest. Ethereum ≈ 12 s/block, Base/OP ≈ 2 s, Arbitrum ≈ 0.25 s. Public nodes cap log ranges; the window shrinks automatically if refused. |
user | text | — | Check a borrower's health factor (optional). Without it, the most recently liquidated borrower is checked. |
logs | textarea | — | LiquidationCall logs JSON (offline) |
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://defiliquidationexplorer.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
defi_liquidation_explorer - Local stdio connector:
node src/mcp-stdio.ts --tool=defi-liquidation-explorer
{
"mcpServers": {
"defi-liquidation-explorer": { "type": "http", "url": "https://defiliquidationexplorer.usefulweb.site/mcp" }
}
}