Skip to content

[docs-agent] Add alchemy_getBlockByTimestamp to the Utility API - #1841

Open
docs-agent-alchemyplatform[bot] wants to merge 1 commit into
mainfrom
docs-agent/alchemy-get-block-by-timestamp
Open

docs-agent-alchemyplatform[bot] wants to merge 1 commit into
mainfrom
docs-agent/alchemy-get-block-by-timestamp

Conversation

@docs-agent-alchemyplatform

Copy link
Copy Markdown
Contributor

Summary

Documents alchemy_getBlockByTimestamp, now live for all customers.

  • New OpenRPC spec src/openrpc/alchemy/block-by-timestamp/, added to the Utility API section as "Block By Timestamp Endpoints". Method page: /docs/data/utility-apis/block-by-timestamp-endpoints/alchemy-get-block-by-timestamp.
    • Param: a single positional object [{ "timestamp": ..., "includeTransactions": ... }] (matches the server's own -32602 hint). timestamp is Unix seconds, Unix milliseconds, or ISO-8601 with a time zone; includeTransactions defaults to false.
    • Result: $ref to the shared EVM Block schema, the same object eth_getBlockByNumber returns. Example is a real eth-mainnet response for timestamp: 1500000000 (block 4019262, ts 1499999999).
    • Description covers closest-block selection, earliest-on-tie, head/genesis clamping, EVM-only support, and no batch support. Errors: -32602, -32000.
    • No x-compute-units, per the request to leave CU values to Daikon once the method is public (chain-config currently has it as METHOD_PRERELEASE, 200 CU).
  • Removed the orphan blocks-by-timestamp.mdx REST stub and redirected /docs/reference/blocks-by-timestamp to the new method page.
  • Utility API overview now covers both methods, with a runnable cURL and JS example.
  • Batch requests page lists the method under unsupported batch request APIs.

Live verification (docs-demo key)

  • Closest block: 1700000000 returns block 18573051 (ts 1700000003, 3s after vs 9s before).
  • Earliest on tie: 1699999997 (midpoint of 1699999991 and 1700000003) returns the earlier block.
  • Clamping: 4102444800 returns the head block. 0 and 1 return genesis.
  • Formats: seconds, ms (>= 1e12 read as ms, 999999999999 read as seconds), ISO-8601 with Z or offset all work. Date-only or no-offset ISO strings return -32602.
  • Errors: missing, negative, or unparseable timestamp returns -32602. A batch returns -32000 Internal error per entry.
  • Response is byte-identical to eth_getBlockByNumber for the same block.

Servers (please confirm)

Seeded from the docs' EVM chain specs (115 networks), then live-probed each one. Left out:

  • Consistently returned -32000 Unable to complete request at this time for this method, though eth_blockNumber works: Astar Mainnet, Boba Sepolia, Cronos Mainnet, Hyperliquid Testnet, Sei Mainnet, Sei Testnet.
  • Not EVM execution or not live: the three Ethereum Beacon hosts, Fantom, Tea Sepolia, Frax Sepolia.

Not verifiable from the demo key (network not enabled on that app) but included as EVM: Alpen Testnet, ApeChain Testnet, Elysium Mainnet, Giwa Sepolia. Ronin Saigon works for recent timestamps but returned -32000 for a 2023 timestamp.

This is a new spec, so Daikon's Update Servers run won't manage its server list until it's wired up there.

Requested by

@abdulmanan-creator (via Slack thread)

Adds an OpenRPC spec for alchemy_getBlockByTimestamp under the Utility API (timestamp as Unix s/ms or ISO-8601, optional includeTransactions, returns the eth_getBlockByNumber block object, closest-block / earliest-on-tie / head and genesis clamping, -32602 and -32000 errors). Removes the orphan Blocks by Timestamp REST page with a redirect from its old slug to the new method page, updates the Utility API overview, and lists the method under unsupported batch request APIs.

Requested-by: @abdulmanan-creator
@docs-agent-alchemyplatform
docs-agent-alchemyplatform Bot requested a review from a team as a code owner November 28, 2026 18:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T18:44:36.955142Z e725ff6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Nov 28, 2026, 6:44 PM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant