4

402rpc · RPC

by 402rpc

POSTBaseArbitrumPolygon

$0.001

per call · USD Coin on Base

Ethereum mainnet JSON-RPC from an independently operated full node. One call per payment, no account or API key. Serves eth_, net_ and web3_ methods. Blocks, transactions, receipts and logs from the Merge (block 15537394) onward. Current state only, not an archive node: historical state calls are refused, not charged. eth_getLogs capped at 10000 blocks. Raw transactions go out via public relays. Price scales with method cost.

Endpoint

POST https://402rpc.com/rpc

8

Calls / 30d

2

Unique payers / 30d

Aug 30

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://402rpc.com/rpc", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": []
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://402rpc.com/rpc" \
  -H "Content-Type: application/json" \
  -d '{"id":1,"jsonrpc":"2.0","method":"eth_blockNumber","params":[]}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x18a5fc8"
}

Payment details

Pay to0x295aa6c5a3460a0f8755823c8ee7bbc7caf79fb1
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Arbitrum, Polygon
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from 402rpc & similar services