Get blocks
GET/ronin/blocks
If block_hash
is present, always search by block_hash
first. The block_number
value must be positive.
If there is no block_hash
or block_number
present, the API searches for all blocks. The limit
and offset
parameters are used to paginate results.
Request
Query Parameters
block_hash string
Search by block_hash
. Example: 0xb12370db9c195fd3d36799ebed779105399ea46b512152ee66dd63c128dc5348
block_number integer
Search by block_number
. Example: 29949082
limit integer
Default is 20
offset integer
Default is 0
Responses
- 200
- 400
- 404
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
result
object
items
object[]
coinbase string
difficulty integer
extraData string
gasLimit integer
gasUsed integer
hash string
logsBloom string
mixHash string
nonce integer
number integer
parentHash string
receiptsRoot string
size integer
stateRoot string
timestamp integer
totalDifficulty integer
transactions string[]
transactionsRoot string
paging
object
nextCursor string
total integer
{
"result": {
"items": [
{
"coinbase": "string",
"difficulty": 0,
"extraData": "string",
"gasLimit": 0,
"gasUsed": 0,
"hash": "string",
"logsBloom": "string",
"mixHash": "string",
"nonce": 0,
"number": 0,
"parentHash": "string",
"receiptsRoot": "string",
"size": 0,
"stateRoot": "string",
"timestamp": 0,
"totalDifficulty": 0,
"transactions": [
"string"
],
"transactionsRoot": "string"
}
],
"paging": {
"nextCursor": "string",
"total": 0
}
}
}
Invalid parameter
- application/json
- Schema
- Example (from schema)
Schema
errorCode integer
message string
{
"errorCode": 0,
"message": "string"
}
Block not found
- application/json
- Schema
- Example (from schema)
Schema
errorCode integer
message string
{
"errorCode": 0,
"message": "string"
}
Internal server error
- application/json
- Schema
- Example (from schema)
Schema
errorCode integer
message string
{
"errorCode": 0,
"message": "string"
}
Loading...
Was this helpful?
Happy React is loading...