# OnChaiNinja MEV Protection Check

> OnChaiNinja MEV Protection Check is a paid API for AI agents from onchaininja.vercel.app, paid per call via x402, $3/call, status unknown (last checked 2026-09-14).

Analyzes a specific transaction on a given chain to detect MEV (Maximal Extractable Value) threats and protection status

## Facts

- Endpoint: GET https://onchaininja.vercel.app/api/mev/%7Bchain%7D/%7Btx%7D
- Price: $3/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchaininja-mev-protection-check-25916fb9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FE8Uo2sxyPCzilkOi62LS

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 onchaininja-mev-protection-check-25916fb9
```

Example prompt: Can you check this Base transaction 0x4a3b...f92c for MEV attacks — I think my swap got sandwiched by a bot.

## When to prefer this

Use this endpoint when you need to determine whether a specific on-chain transaction was subject to MEV exploitation (sandwich attacks, frontrunning, backrunning) on chains like Base, Solana, or Arbitrum. Prefer this over generic block explorers when you need a structured, machine-readable MEV risk signal for DeFi trading bots, post-trade analysis, or wallet security checks.

## Known failure modes

- Invalid or unrecognized chain identifier returns error
- Transaction hash not found on specified chain
- Malformed transaction hash format causes parsing error
- Chain not supported (e.g. unsupported L2) returns 404 or error
- Payment not processed results in 402 response
- Rate limiting or service unavailability returns 5xx

## How this service works

Alpha signals, whale tracking, rug scanning, and MEV protection across Base, Solana, Arbitrum, and more.

## Output

Returns a JSON object with a mevDetected boolean flag and likely additional details about MEV activity, attack type, or protection status for the specified transaction on the given chain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mevDetected": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchaininja-mev-protection-check-25916fb9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from onchaininja.vercel.app](https://www.zero.xyz/host/onchaininja.vercel.app/llms.txt)
