Skip to content
Alchemy Logo

eth_getTdByNumber

POST
/{apiKey}

Returns the total difficulty for a given block number. This method is primarily used by Heimdall to query the total difficulty of a produced block when building a milestone.

Path Parameters

stringrequireddefaults to docs-demo

For higher throughput, create your own API key

Request

stringformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"required

The block number for which to retrieve the total difficulty.

Responses

200

An object containing the block number and its total difficulty, or null if the block is not found.

Was this page helpful?