# ForgeMesh Mempool Anomaly Score

> ForgeMesh Mempool Anomaly Score is a paid API for AI agents from anomaly.forgemesh.io, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns a real-time anomaly score (0–100) for Ethereum or Base mempool activity, including gas spikes, pending whale swaps, MEV signals, and contract deploy bursts.

## Facts

- Endpoint: GET https://anomaly.forgemesh.io/api/mempool-anomaly
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forgemesh-mempool-anomaly-score-5718d7d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0cKEjnpUHaqOavq3R0v5F

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 forgemesh-mempool-anomaly-score-5718d7d8
```

Example prompt: What's the current mempool anomaly score on Ethereum — are there any gas spikes, whale swaps, or MEV signals happening right now?

## When to prefer this

Use this endpoint when you need a fast, quantified anomaly signal for Ethereum or Base mempools — especially for trading bots, DeFi risk monitors, or alert systems that need to poll every few seconds for gas spikes, MEV activity, whale swaps, or contract deploy surges. Prefer this over on-chain analytics tools when you need pre-confirmation, pending-transaction-level signals.

## Known failure modes

- Unsupported chain value returns an error — only 'ethereum' and 'base' are accepted
- Payment not included or invalid x402 payment header results in 402 Payment Required
- Upstream mempool data unavailable during network congestion may cause delayed or empty response
- Rate limiting if polled faster than the intended 5-second interval

## How this service works

Returns a real-time mempool anomaly score with current gas price vs 20-block median, pending whale swaps, and contract deploy counts. Poll every 5s to monitor mempool for MEV or sandwich attacks and catch gas spikes or large pending swaps as they happen, before they land on-chain.

## Output

Returns a JSON object with a sequence_score (0=normal, 100=highly anomalous), a novelty enum (low/medium/high/extreme), a human-readable story label describing the anomaly type, pending transaction count, pending stats breakdown, peak window timestamps, and the chain queried.

## 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": {
      "chain": {
       "type": "string",
       "description": "Blockchain: ethereum or base (default: ethereum)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "gas": {
       "type": "object"
      },
      "chain": {
       "type": "string"
      },
      "story": {
       "type": "string",
       "description": "Human-readable mempool anomaly label"
      },
      "novelty": {
       "enum": [
        "low",
        "medium",
        "high",
        "extreme"
       ],
       "type": "string"
      },
      "peak_window": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "pending_count": {
       "type": "integer"
      },
      "pending_stats": {
       "type": "object"
      },
      "sequence_score": {
       "type": "integer",
       "description": "0=normal mempool, 100=highly anomalous"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "gas": {
   "current_gwei": 45.2,
   "base_fee_gwei": 12.1,
   "ratio_vs_median": 3.12,
   "median_20block_gwei": 14.5
  },
  "chain": "ethereum",
  "story": "MEV Attack",
  "domain": "mempool",
  "novelty": "high",
  "peak_window": [
   "GAS_SPIKE",
   "BIG_SWAP",
   "WHALE_PENDING",
   "MEV_SIGNAL",
   "PENDING_NORMAL"
  ],
  "pending_count": 247,
  "pending_stats": {
   "big_swaps": 3,
   "whale_pending": 1,
   "total_value_eth": 1823.5,
   "contract_deploys": 2
  },
  "sequence_score": 72
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forgemesh-mempool-anomaly-score-5718d7d8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from anomaly.forgemesh.io](https://www.zero.xyz/host/anomaly.forgemesh.io/llms.txt)
