# MEV History Sandwich Check API

> MEV History Sandwich Check API is a paid API for AI agents from mev-history-mcp.mtree.workers.dev, paid per call via x402, $0.050000/call, status unknown (last checked 2026-09-14).

Checks whether a specific Ethereum transaction was sandwiched or exposed to MEV (Maximal Extractable Value) attack, returning structured JSON evidence with provenance.

## Facts

- Endpoint: POST https://mev-history-mcp.mtree.workers.dev/v1/tx/sandwich_check
- Price: $0.050000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mev-history-mcp-mtree-workers-dev-a8bf0eb7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QaKfHQ3dF1RWdpjUYHWmm

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 mev-history-mcp-mtree-workers-dev-a8bf0eb7 -d '<json body>'
```

Example prompt: Can you check if transaction 0xabc123...def456 was sandwiched or hit by any MEV attack? I want to see the evidence and risk assessment.

## When to prefer this

Use this endpoint when you need to determine whether a specific on-chain transaction was subjected to a sandwich attack or other MEV exploitation, especially when you need structured, machine-readable evidence with provenance for autonomous agent workflows. Prefer this over generic block explorers when you need a deterministic yes/no MEV verdict with supporting data.

## Known failure modes

- Transaction hash not found or invalid — returns error with no MEV data
- Transaction too recent to have indexed MEV history — may return empty or pending result
- Network/chain not supported — error indicating unsupported chain
- Payment not completed via x402 — 402 Payment Required response
- Rate limit exceeded — HTTP 429 response
- Malformed POST body — 400 Bad Request

## How this service works

Paid mev history mcp route for autonomous agents. Returns JSON with provenance, route-specific evidence, and machine-readable fields. Buyer-intent match: sandwich check API, transaction MEV risk. Price 0.05 USDC on Base via x402. Demo/preview: https://mev-history-mcp.mtree.workers.dev/demo/sandwich_check. Contact: https://mev-history-mcp.mtree.workers.dev/contact.

## Output

Returns a JSON object with MEV sandwich detection result, route-specific evidence, provenance metadata, and machine-readable fields indicating whether the transaction was sandwiched, front-run, or back-run by MEV bots.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "query": {
       "type": "string"
      }
     },
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mev-history-mcp-mtree-workers-dev-a8bf0eb7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mev-history-mcp.mtree.workers.dev](https://www.zero.xyz/host/mev-history-mcp.mtree.workers.dev/llms.txt)
