# OnChaiNinja MEV Detection

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

Detects MEV (Maximal Extractable Value) activity and protection status for a specific transaction on a given blockchain chain

## Facts

- Endpoint: GET https://x402ninja.vercel.app/api/mev/%7Bchain%7D/%7Btx%7D
- Price: $3/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchaininja-mev-detection-b60cdcd8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6hFnCL0H_O-fbsCFcKma4

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-detection-b60cdcd8
```

Example prompt: Check if transaction 0x4f3a8b2c...d91e on Base was targeted by MEV bots or sandwich attacks.

## When to prefer this

Use this endpoint when you need to verify whether a specific transaction on Base, Solana, or Arbitrum was subjected to MEV exploitation such as sandwich attacks or front-running, especially before or after executing high-value DeFi trades.

## Known failure modes

- Invalid chain identifier returns error or empty response
- Malformed or non-existent transaction hash returns error
- Unsupported chain returns not-found or error response
- Payment failure ($3 USDC required) returns 402 Payment Required
- Transaction too recent may not yet be indexed

## How this service works

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

## Output

A JSON object with a mevDetected boolean flag indicating whether MEV activity was identified for the given transaction, potentially including details about the type of MEV exploit detected.

## 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-detection-b60cdcd8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402ninja.vercel.app](https://www.zero.xyz/host/x402ninja.vercel.app/llms.txt)
