Get block by hash, timestamp, block number range
API Deprecation Notice
This API endpoint will be deprecated by the end of Q1 2025 as part of Skynet sunsetting. Please migrate to the Moralis alternative: Get block by date
GET/blocks
Get block by hash, timestamp, block number range
Request
Query Parameters
hash string
Block hash
timestamp integer
Block timestamp, get the block where it life span covers the input timestamp
fromBlock integer
Start block number, required if toBlock is present
toBlock integer
End block number, required if fromBlock is present
Responses
- 200
- 404
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
- BlockResponse
- MOD2
resultobject
oneOf
hash string
number integer
parentHash string
transactions string[]
nonce integer
mixHash string
logsBloom string
stateRoot string
transactionsRoot string
receiptsRoot string
coinbase string
difficulty integer
totalDifficulty integer
extraData string
size integer
gasLimit integer
gasUsed integer
baseFeePerGas string
timestamp integer
items
object
hash string
number integer
parentHash string
transactions string[]
nonce integer
mixHash string
logsBloom string
stateRoot string
transactionsRoot string
receiptsRoot string
coinbase string
difficulty integer
totalDifficulty integer
extraData string
size integer
gasLimit integer
gasUsed integer
baseFeePerGas string
timestamp integer
{
"result": {}
}
not found
- application/json
- Schema
- Example (from schema)
Schema
errorCode integer
message string
{
"errorCode": 0,
"message": "string"
}
internal error
- application/json
- Schema
- Example (from schema)
Schema
errorCode integer
message string
{
"errorCode": 0,
"message": "string"
}
Loading...