hmy_getBlocks
Description
hmy_getBlocks returns blocks in range [from; to]
API v1
Parameters
String- starting block number in 0x formatString- ending block number in 0x formatblockArgs- optional args struct in json format (should be used just with { })fullTx-Bool: To show full tx or notwithSigners-Bool: Include block signes in blocks or not
Returns
Array: returns blocks list in json formatnumber-Number: The block number.nullwhen its pending block.hash32 Bytes -String: Hash of the block.nullwhen its pending block.parentHash32 Bytes -String: Hash of the parent block.nonce8 Bytes -String: Hash of the generated proof-of-work.nullwhen its pending block.logsBloom256 Bytes -String: The bloom filter for the logs of the block.nullwhen its pending block.transactionsRoot32 Bytes -String: The root of the transaction trie of the blockstateRoot32 Bytes -String: The root of the final state trie of the block.miner-String: The address of the beneficiary to whom the mining rewards were given.difficulty-Number: Integer of the difficulty for this block.extraData-String: The “extra data” field of this block.size-Number: Integer the size of this block in bytes.gasLimit-Number: The maximum gas allowed in this block.gasUsed-Number: The total used gas by all transactions in this block.timestamp-Number: The unix timestamp for when the block was collated, 0x format.stakingTransactions-Array: Array of staking transactions object; absent if inclStaking is false, are present by default.transactions-Array: Array of transaction objects; absent if second parameter isfalse.signers-Array: Array of validators one addresses who signed this blockuncles-Array: Array of uncle hashes.
Sample Curl Request
Sample Curl Response
API v2
Parameters
Number- starting block numberNumber- ending block numberblockArgs- optional args struct in json format (should be used just with { })fullTx-Bool: To show full tx or notwithSigners-Bool: Include block signes in blocks or notinclStaking-Bool: To show staking txs or not
Returns
Array: returns blocks list in json formatnumber-Number: The block number.nullwhen its pending block.hash32 Bytes -String: Hash of the block.nullwhen its pending block.parentHash32 Bytes -String: Hash of the parent block.nonce8 Bytes -String: Hash of the generated proof-of-work.nullwhen its pending block.logsBloom256 Bytes -String: The bloom filter for the logs of the block.nullwhen its pending block.transactionsRoot32 Bytes -String: The root of the transaction trie of the blockstateRoot32 Bytes -String: The root of the final state trie of the block.miner-String: The address of the beneficiary to whom the mining rewards were given.difficulty-String: Integer of the difficulty for this block.extraData-String: The “extra data” field of this block.size-Number: Integer the size of this block in bytes.gasLimit-Number: The maximum gas allowed in this block.gasUsed-Number: The total used gas by all transactions in this block.timestamp-Number: The unix timestamp for when the block was collated.stakingTransactions-Array: Array of staking transactions object; absent if inclStaking is false, are present by defaulttransactions-Array: Array of transaction objects; only hashes if fullTx is false, are hashes by defaultsigners-Array: Array of validators one addresses who signed this blockuncles-Array: Array of uncle hashes.
Sample Curl Request
Sample Curl Response
Last updated
Was this helpful?