๐ One block on Base
402.com.tr/api/x402/base-block
๐ One block on Base โ height, hash, parent, timestamp and age in seconds, transaction count, gas used against the limit, and the base fee in gwei. Takes a block number, a 0xโฆ block hash, or latest / finalized / safe / earliest. A block that isn't mined yet answers found:false with the reason rather than an error. Raw chain data, no interpretation.
GET
https://402.com.tr/api/x402/base-blockUptime100% of 3 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://402.com.tr/api/x402/base-block?block=latest");
console.log(await res.json());Example input
{
"block": "latest"
}