{"uid":"cap_9JG2sGjl4KV_XGt3HOVGT","slug":"block-by-timestamp-x402node-b412ca1d","name":"Block by Timestamp – x402node","description":"Block height closest to a given unix timestamp on a chain, a primitive for historical on-chain queries. Saves agents a binary search over block times. Live block lookup. block by timestamp, block at time, historical block, archive query helper, chain block Accepts payment on Base or Solana — either network works.","url":"https://api.x402node.dev/prices/block","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","required":["timestamp"],"properties":{"chain":{"type":"string","description":"e.g. ethereum, base, arbitrum (default ethereum)"},"timestamp":{"type":"string","description":"unix seconds"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_h6-oPY1_H8OLp-2_kwJLW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the block number closest to a given Unix timestamp on a specified blockchain, enabling historical on-chain queries without manual binary search.","exampleAgentPrompt":"What was the closest Ethereum block to January 1st 2024 at midnight UTC? Give me the block number so I can use it for a historical on-chain snapshot.","exampleUseCases":null,"resultDescription":"Returns the block number (height) on the specified chain that is closest to the provided Unix timestamp, along with the actual block timestamp for verification — saving the caller from performing a binary search over block times.","failureModes":["Invalid or unsupported chain identifier returns an error","Unix timestamp out of range (before genesis or in the future) returns an error","Missing required parameters return a 400-level error","Payment not fulfilled or insufficient USDC balance returns a 402 error","Archive node unavailable for the requested chain may return a 503"],"whenToPreferThis":"Use this endpoint when you need to anchor a historical on-chain query (e.g. token balances, prices, liquidity) to a specific moment in time and need the corresponding block number. It eliminates the need to implement and run a binary search over block timestamps yourself. Prefer this over manually querying RPC endpoints when you want a quick, single-call resolution of timestamp-to-block without maintaining archive node access.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T12:53:59.203Z","isFirstParty":false}