HomeGuidesAPI ReferenceChangelog
GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange Log
API Reference

eth_getBlockByNumber

Returns information about a block by hash.

Parameters

IndexData TypeDescription
1QUANTITY|TAGInteger of a block number, or the string "earliest", "latest"
2BooleanIf true it returns the full transaction objects, if false only the hashes of the transactions.

Returns

object - a block object or null when no block was found. See eth_getBlockByHash

Example

curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{
	"jsonrpc": "2.0",
	"method": "eth_getBlockByNumber",
	"params": ["0xF9CC56", true],
	"id": 1
}'

Result

{"jsonrpc":"2.0","id":1,"result":null}