Skip to content
onelayer.
All tools

Tool detail

Latest block number

Returns the latest block number for a chosen chain (Ethereum, Base, Polygon, Arbitrum or Optimism; default Base) from public RPC nodes with fallback.

Categories: Blockchain data

Use when

  • check the current block height on Base, Ethereum, Polygon, Arbitrum or Optimism
  • confirm a chain's RPC endpoint is up before a bigger on-chain job
  • get a recent-block timestamp anchor for a query
  • run a minimal first paid call to test an x402 client end to end

Not for

  • not full block contents - only the block number
  • not historical blocks or block-by-timestamp lookups

Inputs

GET query param: network (string, optional; ethereum/base/polygon/arbitrum/optimism, default base)

Admitted input schema

{
  "type": "object",
  "properties": {
    "network": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "description": "ethereum / base / polygon / arbitrum / optimism (default base)."
    }
  },
  "required": [],
  "additionalProperties": false
}

Endpoint

Method
GET
URL
https://agent402.tools/api/block-number

Payment

Protocol
x402
Listed price
0.001 USDC per request on Base
Payment method
exact
Network
eip155:8453
Asset
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Listed terms are catalog metadata. The caller supplies inputs and calls the tool outside Onelayer. If payment is required, the caller uses a compatible wallet to pay.

Source

Record
GET https://agent402.tools/api/block-number
Retrieved
2026-09-30T22:31:58.034Z
Catalog file SHA-256
6837ccddf886f0007cf3727ea9d27faaa5047b51b4f425345c554ce1c271a524
Catalog built
2026-09-30T22:31:58.034Z