Basic API
Get block by number
API Reference
Web3 API
- Basic API
- Balance API
- Token API
- NFT API
- Domain API
SQL API
- Alpha
- Classic(Deprecated)
Webhook API
- Webhook API
Basic API
Get block by number
Get the detail of a block by the given block number.
GET
/
v1
/
block
/
detail
curl --request GET \
--url https://api.chainbase.online/v1/block/detail \
--header 'x-api-key: <x-api-key>'
{
"code": 0,
"message": "ok",
"data": {
"number": 123,
"hash": "<string>",
"parent_hash": "<string>",
"timestamp": "<string>",
"difficulty": "<string>",
"extra_data": "<string>",
"gas_limit": 123,
"gas_used": 123,
"base_fee_per_gas": 123,
"miner": "<string>",
"mix_hash": "<string>",
"nonce": "<string>",
"receipts_root": "<string>",
"sha3_uncles": "<string>",
"size": 123,
"state_root": "<string>",
"transactions_root": "<string>",
"transactions_count": 123,
"uncles_count": 123,
"withdrawals_count": 123
}
}
Headers
Response
200
application/json
Successful Response
curl --request GET \
--url https://api.chainbase.online/v1/block/detail \
--header 'x-api-key: <x-api-key>'
{
"code": 0,
"message": "ok",
"data": {
"number": 123,
"hash": "<string>",
"parent_hash": "<string>",
"timestamp": "<string>",
"difficulty": "<string>",
"extra_data": "<string>",
"gas_limit": 123,
"gas_used": 123,
"base_fee_per_gas": 123,
"miner": "<string>",
"mix_hash": "<string>",
"nonce": "<string>",
"receipts_root": "<string>",
"sha3_uncles": "<string>",
"size": 123,
"state_root": "<string>",
"transactions_root": "<string>",
"transactions_count": 123,
"uncles_count": 123,
"withdrawals_count": 123
}
}