Skip to content
Fourohtwo

Which block was the chain at at this time

apexfaucet.xyz/api/x402/block-at-time

Which block was the chain at at this time? Pass ?chain= (ethereum, base, arc or bnb) and ?time= (ISO date-time or unix seconds, from 2015 to now). Returns the last block whose timestamp is at or before the time: number, hash, exact timestamp, seconds between, and the next block. Found by searching live RPC reads (28 at most), so the answer comes from the chain, not an index. A time before the chai

BaseArcSolanaBNB ChainRobinhood ChainAnswering
GEThttps://apexfaucet.xyz/api/x402/block-at-time

Uptime100% of 1 check 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://apexfaucet.xyz/api/x402/block-at-time?time=2024-03-01T12%3A00%3A00Z&chain=ethereum");
console.log(await res.json());

Example input

{
  "time": "2024-03-01T12:00:00Z",
  "chain": "ethereum"
}