MEV recent blocks

$0.002 per call · USDC via x402 · POST /api/mev-recent-blocks

Last N MEV-Boost-built blocks via the Flashbots relay. Send POST /api/mev-recent-blocks with no required fields (1 optional) and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with count, totalEthToProposers, avgEthPerBlock, relay and blocks.

For each block: slot, block number/hash, builder pubkey, proposer pubkey, gas used/limit, ETH paid to the proposer, and tx count. Use to monitor block-builder market share, proposer revenue, or to correlate an arbitrage opportunity with the block it landed in.

Category: Crypto & onchain data · Tags: mev flashbots mev-boost builder block-payment

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
limitnumbernoNumber of recent blocks (1-100, default 20).

Example request

curl -i -X POST https://agent402.tools/api/mev-recent-blocks \
  -H "Content-Type: application/json" \
  -d '{"limit":5}'

Without payment this returns HTTP 402 Payment Required with the exact price for mev-recent-blocks; any x402 v2 or MPP client pays it and retries.

Example response

{
  "count": 1,
  "totalEthToProposers": 0.072345,
  "avgEthPerBlock": 0.072345,
  "relay": "flashbots",
  "blocks": [
    {
      "slot": 12345678,
      "blockNumber": 22345678,
      "blockHash": "0xabc...",
      "parentHash": "0xdef...",
      "builderPubkey": "0x9000...",
      "builderShort": "0x90000000…abcdef",
      "proposerPubkey": "0xa000...",
      "proposerFeeRecipient": "0x1234...",
      "gasUsed": 14987654,
      "gasLimit": 30000000,
      "valueWei": "72345000000000000",
      "valueEth": 0.072345,
      "numTx": 187
    }
  ]
}
FieldTypeAlways presentIn the example
countnumberyes1
totalEthToProposersnumberyes0.072345
avgEthPerBlocknumberyes0.072345
relaystringyesflashbots
blocksarray of objectsyes1 item in the example

From an MCP client

catalog.call {
  "slug": "mev-recent-blocks",
  "params": {
    "limit": 5
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for mev-recent-blocks; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/mev-recent-blocks", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "limit": 5
  }),
});

Related tools

MEV block payment lookup

$0.002 · POST /api/mev-block-payment

Look up the MEV-Boost payment for a specific slot or block number via the Flashbots relay. Returns the builder, proposer…

MEV builder share

$0.002 · POST /api/mev-builder-share

Builder market share aggregated over the last N MEV-Boost blocks via the Flashbots relay. Returns per-builder block coun…

Known-address label lookup

FREE w/ compute · or $0.002 · POST /api/address-label

Label a known EVM address from a curated, committed dataset: major stablecoin + token contracts (the USDC and USDG contr…

Wallet token transfers (filtered)

$0.003 · POST /api/asset-transfers

Recent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…

Block info

$0.001 · GET /api/block-info

Header-level detail for one block on Ethereum, Base, Polygon, Arbitrum, or Optimism: hash, timestamp (unix + ISO), trans…

Latest block number

$0.001 · GET /api/block-number

The latest block number on Ethereum, Base, Polygon, Arbitrum, or Optimism: returns network, blockNumber (integer) and he…