80trust / 100

Block

by Onchain Query API in Onchain & crypto

x402 APIPassing, checked 4 h ago

Latest block on any major EVM chain: block number, timestamp, age in seconds, base fee and gas used/limit. The cheapest possible liveness and chain-tip check for an agent: confirm a chain is progressing, timestamp an observation, or pick a block for a query.

GET https://chain.cyberwarex.com/block

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
504 ms typical, 504 ms slowest 5%
Last check
4 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://chain.cyberwarex.com/block?chain=base"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fchain.cyberwarex.com%2Fblock
const res = await pay("https://chain.cyberwarex.com/block?chain=base");
console.log(await res.json());

Example input

{
  "chain": "base"
}

Example output

{
  "age_seconds": 3,
  "base_fee_gwei": 0.0061,
  "chain": "base",
  "chain_id": 8453,
  "gas_limit": 150000000,
  "gas_used": 18234012,
  "hash": "0x9a1c…",
  "number": 51142663,
  "timestamp": 1789081234,
  "tx_count": 212
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed402504 ms$0.001