Detect sandwich attacks, toxic flow, and MEV activity across multiple chains via x402 micropayment.
What it does
The Frontrun Watch Raw endpoint from Einstein AI provides on-chain frontrunning and MEV (Maximal Extractable Value) detection data. It monitors sandwich attacks, toxic order flow, and other MEV activity across multiple EVM chains and Solana. The endpoint returns raw structured data (no AI-generated analysis) for programmatic consumption by agents and dashboards.
This is one endpoint in a broader Einstein AI x402 API suite powered by Bitquery on-chain data. It accepts POST requests with optional parameters for chain (base, ethereum, bsc, arbitrum, polygon, optimism, solana), result limit (up to 500), and time period (1h to 30d). Payment is $1.00 per request, settled via x402 in USDC on Base (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), USDC on Solana, or Bitcoin Lightning (1,309 sats). No API key is required; authentication is handled entirely through the X-PAYMENT header with a signed payment authorization.
The endpoint is live and returns a standard x402 402 challenge when called without payment. The response includes a status field, result data object, and payment receipt. The broader Einstein AI platform also offers related endpoints for rug-pull scanning, token sniping detection, arbitrage scanning, whale tracking, and more, all at varying price points from $0.25 to $1.15 per call.
Capabilities
Use cases
- —Monitoring DEX trades for sandwich attacks before or after execution
- —Detecting MEV bot activity on Ethereum, Base, BSC, and other chains
- —Building dashboards that track toxic order flow across multiple networks
- —Alerting systems that flag frontrunning patterns in real time
- —Security auditing of token trading environments for MEV exposure
Fit
Best for
- —AI agents needing programmatic MEV and frontrun data without API keys
- —DeFi protocols monitoring for sandwich attacks on their liquidity pools
- —Researchers analyzing MEV extraction patterns across chains
Not for
- —Users who need free or unlimited MEV data (each call costs $1.00)
- —Real-time sub-second MEV prevention at the transaction level
- —Non-blockchain or non-DeFi use cases
Quick start
curl -X POST https://emc2ai.io/x402/bitquery/frontrunwatch/raw \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <base64-signed-usdc-authorization>" \
-d '{"chain": "ethereum", "limit": 10, "timeperiod": "24h"}'Example
Request
{
"chain": "ethereum",
"limit": 10,
"timeperiod": "24h"
}Response
{
"result": {
"sandwichAttacks": [
{
"block": 19500000,
"token": "WETH",
"txHash": "0xabc...",
"attacker": "0x123...",
"victimTx": "0xdef...",
"profitUsd": 42.5
}
]
},
"status": "completed",
"payment": {
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "1000000",
"scheme": "exact",
"txHash": "0x789...",
"network": "base",
"timestamp": "2025-01-15T12:00:00Z",
"x402Version": 1
}
}Endpoint
Quality
The endpoint is live with a well-formed x402 402 challenge, full OpenAPI spec with input/output schemas, and clear pricing. However, this specific endpoint (/frontrunwatch/raw) is not explicitly listed in the OpenAPI paths (only /mevdetection is), and the actual response data structure is inferred from the generic BitqueryResponse schema rather than documented with concrete examples. The /raw suffix suggests raw data without AI analysis, but this is inferred.
Warnings
- —The /frontrunwatch/raw path is not explicitly listed in the OpenAPI spec paths; the closest documented endpoint is /x402/bitquery/mevdetection. The endpoint may be an undocumented variant.
- —The /api route returned a 522 (host error) during crawl, suggesting occasional backend instability.
- —Response data structure for frontrun-specific fields is inferred — no concrete example response was found in documentation.
Citations
- —Endpoint returns 402 with x402 challenge accepting USDC on Base (1000000 atomic = $1.00), USDC on Solana, and Lightning BTC (1309 sats)https://emc2ai.io/x402/bitquery/frontrunwatch/raw
- —Description: Frontrun monitoring: sandwich attacks, toxic flow, and MEV activity detectionhttps://emc2ai.io/x402/bitquery/frontrunwatch/raw
- —Input schema accepts chain, limit, and timeperiod parametershttps://emc2ai.io/x402/bitquery/frontrunwatch/raw
- —Einstein AI x402 API accepts USDC on Base and Solana networks with prices from $0.25 to $1.00+https://emc2ai.io/docs
- —Payment is via X-PAYMENT header with Base64-encoded signed USDC TransferWithAuthorizationhttps://emc2ai.io
- —The /api route returned a 522 error during crawlhttps://emc2ai.io/api