# EMC2 AI MEV Detection

> EMC2 AI MEV Detection is a paid API for AI agents from emc2ai.io, paid per call via x402, $1/call, status unknown (last checked 2026-09-15).

Detects MEV activity on-chain including sandwich attacks, front-running, and toxic order flow analysis for a given transaction or block context.

## Facts

- Endpoint: POST https://emc2ai.io/x402/bitquery/mevdetection/raw
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/emc2ai-io-fd169451
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8K7dXPFPERQbzYbjU6TrQ

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 emc2ai-io-fd169451 -d '<json body>'
```

Example prompt: Check if this Ethereum transaction 0xabc123... was a victim of a sandwich attack or front-running, and give me a toxic flow analysis for the token swap involved.

## When to prefer this

Use this endpoint when you need to identify whether specific on-chain transactions were targeted by MEV bots, particularly sandwich attacks or front-running. Ideal for post-trade forensics, wallet risk auditing, or monitoring DEX activity for predatory behavior. Prefer this over generic blockchain explorers when you need structured MEV classification powered by Bitquery's indexing.

## Known failure modes

- Transaction hash not found or invalid returns 404 or empty result
- Unsupported chain or DEX returns an error or empty dataset
- Rate limiting or payment failure returns 402 or 429
- Block too recent may not yet be indexed, returning incomplete data
- Malformed request body returns 400 with validation error

## How this service works

Detect MEV activity: sandwich attacks, front-running, toxic flow analysis.

## Output

Returns structured MEV activity data including detected attack types (sandwich, front-running), involved bot addresses, affected transaction hashes, toxic flow scores, and timing/block-level context for the identified predatory activity.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "ethereum",
    "bsc",
    "arbitrum",
    "polygon",
    "optimism",
    "solana"
   ],
   "type": "string",
   "description": "Blockchain to query (e.g., base, ethereum, bsc, solana)"
  },
  "limit": {
   "type": "string",
   "description": "Maximum number of results to return (default: 10, max: 500)"
  },
  "timeperiod": {
   "enum": [
    "1h",
    "4h",
    "24h",
    "7d",
    "30d"
   ],
   "type": "string",
   "description": "Time period for analysis (e.g., 1h, 24h, 7d, 30d)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/emc2ai-io-fd169451/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from emc2ai.io](https://www.zero.xyz/host/emc2ai.io/llms.txt)
