{"uid":"cap_puzwzDEjIn0RgdlF_m1cP","slug":"base-blockchain-block-number-via-json-rpc-x402-18f13734","name":"Base Blockchain Block Number via JSON-RPC (x402)","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/block-number?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"method":{"type":"string","examples":["eth_blockNumber","eth_getBalance","eth_call"],"description":"JSON-RPC method (default eth_blockNumber)"},"params":{"type":"string","examples":["[]","[\"0xe4be4d0bd82d8e68203deff81f79ede0529f2617\",\"latest\"]"],"description":"URL-encoded JSON array of params (default [])"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"id":1,"chain":"base","result":"0x32c8f1a","jsonrpc":"2.0","chain_id":8453,"upstream":"https://base.drpc.org","latency_ms":84}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GlzQpEB8nRy2uaJZAv6b9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the current Base blockchain block number (or executes other JSON-RPC calls) via a pay-per-call x402 micropayment API requiring no API keys.","exampleAgentPrompt":"What's the current block number on Base mainnet right now? Use the eth_blockNumber JSON-RPC method and pay the micropayment fee with USDC.","exampleUseCases":[{"title":"Onchain agent block confirmation check","prompt":"What's the latest block number on Base? I need to confirm my transaction is finalized — fetch the current block height using eth_blockNumber."},{"title":"Wallet balance lookup for trading bot","prompt":"Check the ETH balance of the wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base mainnet using eth_getBalance with the 'latest' parameter."},{"title":"Smart contract state read for DeFi agent","prompt":"Run an eth_call on Base to read the current state of a smart contract — no API key needed, just pay the micropayment. The contract is at 0xabc...123 and I need the result field from the JSON-RPC response."}],"resultDescription":"A JSON-RPC 2.0 response object containing: the result field (e.g. block number as hex string for eth_blockNumber), chain identifier ('base'), chain_id (8453), upstream RPC URL used, and latency_ms for the upstream call.","failureModes":["Payment not made or insufficient USDC — returns HTTP 402 Payment Required","Invalid JSON-RPC method name — returns RPC error in result","Malformed params array (not valid URL-encoded JSON) — returns parse error","Upstream dRPC node unavailable — may return 502 or timeout","Rate limiting if too many unpaid requests attempted"],"whenToPreferThis":"Choose this endpoint when building onchain or trading AI agents that need lightweight Base blockchain JSON-RPC access without registering for a conventional API key. Ideal for autonomous agents that can pay micropayments in USDC via the x402 protocol, need real-time block numbers or balances, and want zero-friction permissionless access. Prefer over full RPC providers when pay-per-call economics fit your agent's usage pattern.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:16.049Z","isFirstParty":false,"canonicalSlug":"base-blockchain-block-number-via-json-rpc-x402-18f13734"}