# Seneschal At-Risk Count

> Seneschal At-Risk Count is a paid API for AI agents from api.seneschal.space, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the current count of Ethereum positions at risk of liquidation, providing free liquidation telemetry for DeFi monitoring.

## Facts

- Endpoint: GET https://api.seneschal.space/v1/q/at-risk-count
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/seneschal-at-risk-count-d917ce49
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PbRHYPW-FVFpQk5D8s-0J

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability seneschal-at-risk-count-d917ce49
```

Example prompt: How many Ethereum DeFi positions are currently at risk of liquidation right now? Pull the latest at-risk count from Seneschal's liquidation telemetry.

## When to prefer this

Use this endpoint when you need a real-time count of at-risk Ethereum liquidation positions sourced from a block builder with privileged mempool visibility. Prefer it over generic DeFi analytics when you need low-latency, block-builder-level data at very low per-call cost ($0.001 USDC).

## Known failure modes

- Invalid or malformed query properties parameter returns error
- Service unavailable if block builder telemetry feed is down
- Payment required (402) if x402 USDC balance is insufficient
- Rate limiting if called too frequently without payment

## How this service works

Single-fact: how many borrowers have HF < max_hf and debt >= min_debt_usd right now? Returns {count, total_debt_usd}.

## Output

A count or snapshot of Ethereum mainnet positions currently at risk of liquidation, drawn from Seneschal's block-builder-level telemetry data.

## Example request

```json
{
 "properties": "at-risk-count"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "max_hf": {
       "type": "string",
       "description": "Health-factor ceiling (default 1.05)."
      },
      "protocol": {
       "type": "string",
       "description": "Optional protocol filter (aave|morpho|spark|compound)."
      },
      "min_debt_usd": {
       "type": "string",
       "description": "Minimum debt in USD (default 0)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "count": {
       "type": "integer"
      },
      "total_debt_usd": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 14,
  "total_debt_usd": 1825000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/seneschal-at-risk-count-d917ce49/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.seneschal.space](https://www.zero.xyz/host/api.seneschal.space/llms.txt)
