Skip to main content
Version: 1.0
Endpoints Summary
GET Latest block for a given pool
GET Block history for a given pool

GET Latest block for a given pool

Returns the latest block forged by a pool given its pool identifier.

GET /api/core/blocks/latest/pools/{pool_hash}

🎰 Parameters

NameDescriptionInTypeRequired
pool_hashThe Bech32 or HEX encoding of the pool hash.pathstringtrue

👨‍💻 Code samples

const CBI = await new CardanoBI({ apiKey: 'YOUR-KEY', apiSecret: 'YOUR-SECRET' }); 
const pools_pools = await CBI.core.blocks.latest.pools_({ pool_hash: "pool1y24nj4qdkg35nvvnfawukauggsxrxuy74876cplmxsee29w5axc" });
console.log(pools_pools);

💌 Response Codes

OK: Successful request.

{
"id": 10472458,
"hash": "6GOnH0eXDmBwlceRzu1aU1ZKvohTQvYuQGLBIZwskf4=",
"epoch_no": 490,
"slot_no": 126665631,
"epoch_slot_no": 348831,
"block_no": 10438546,
"previous_id": 10472457,
"slot_leader_id": 7195394,
"size": 38226,
"time": "2024-06-12T22:38:42",
"tx_count": 12,
"proto_major": 9,
"proto_minor": 0,
"vrf_key": "vrf_vk1ksvt6yywk5j2wkq3rmkxghgru7svaetmjnf8kx4636x7pwcdmgrsy8peyv",
"op_cert": "NUgPMkkL6COIFetoWlFwBq+oKfkBVWhhaVjMq+teGK8=",
"op_cert_counter": 11,
"hash_hex": "e863a71f47970e607095c791ceed5a53564abe885342f62e4062c1219c2c91fe",
"op_cert_hex": "35480f32490be8238815eb685a517006afa829f9015568616958ccabeb5e18af"
}

💌 Response Schemas

Status Code 200

NameTypeDescription
idinteger(int64)The block unique identifier.
hashstring(byte)The hash identifier of the block.
epoch_nointeger(int32)The epoch number.
slot_nointeger(int64)The slot number.
epoch_slot_nointeger(int32)The slot number within an epoch (resets to zero at the start of each epoch).
block_nointeger(int32)The block number.
previous_idinteger(int64)The Block table index of the previous block.
slot_leader_idinteger(int64)The SlotLeader table index of the creator of this block.
sizeinteger(int32)The block size (in bytes). Note, this size value is not expected to be the same as the sum of the tx sizes due to the fact that txs being stored in segwit format and oddities in the CBOR encoding.
timestring(date-time)The block time (UTCTime).
tx_countinteger(int64)The number of transactions in this block.
proto_majorinteger(int32)The block's major protocol number.
proto_minorinteger(int32)The block's major protocol number.
vrf_keystringThe VRF key of the creator of this block.
op_certstring(byte)The hash of the operational certificate of the block producer.
op_cert_counterinteger(int64)The value of the counter used to produce the operational certificate.
hash_hexstringThe hexadecimal encoding of the block hash.
op_cert_hexstringThe hexadecimal encoding of the block producer operational certificate's hash.

GET Block history for a given pool

Returns the history of blocks forged by a pool given its pool identifier.

GET /api/core/blocks/pools/{pool_hash}/history

🎰 Parameters

NameDescriptionInTypeRequired
pool_hashThe Bech32 or HEX encoding of the pool hashpathstringtrue

👨‍💻 Code samples

const CBI = await new CardanoBI({ apiKey: 'YOUR-KEY', apiSecret: 'YOUR-SECRET' }); 
const pools_history = await CBI.core.blocks.pools.history_({ pool_hash: "pool1y24nj4qdkg35nvvnfawukauggsxrxuy74876cplmxsee29w5axc" });
console.log(pools_history);

💌 Response Codes

OK: Successful request.

[
{
"id": 7195394,
"hash": "p7spNEAgAKrCr6Ac+0mNoFuDsZF9YAA9VG8Wq190OL4=",
"epoch_no": 336,
"slot_no": 59907512,
"epoch_slot_no": 118712,
"block_no": 7195039,
"previous_id": 7195393,
"slot_leader_id": 7195394,
"size": 25857,
"time": "2022-05-02T06:43:23",
"tx_count": 9,
"proto_major": 6,
"proto_minor": 0,
"vrf_key": "vrf_vk1ksvt6yywk5j2wkq3rmkxghgru7svaetmjnf8kx4636x7pwcdmgrsy8peyv",
"op_cert": "J+s7a56rZFti3UwljuWrJRa3tFDotXkIIZtLrP7J+qI=",
"op_cert_counter": 2,
"hash_hex": "a7bb2934402000aac2afa01cfb498da05b83b1917d60003d546f16ab5f7438be",
"op_cert_hex": "27eb3b6b9eab645b62dd4c258ee5ab2516b7b450e8b57908219b4bacfec9faa2"
},
"...",
{
"id": 7218036,
"hash": "GLIqqodmL/hIikVeytcwBKXSpriHer6pY3l33EfXQNc=",
"epoch_no": 337,
"slot_no": 60386263,
"epoch_slot_no": 165463,
"block_no": 7217681,
"previous_id": 7218035,
"slot_leader_id": 7195394,
"size": 88922,
"time": "2022-05-07T19:42:34",
"tx_count": 28,
"proto_major": 6,
"proto_minor": 0,
"vrf_key": "vrf_vk1ksvt6yywk5j2wkq3rmkxghgru7svaetmjnf8kx4636x7pwcdmgrsy8peyv",
"op_cert": "J+s7a56rZFti3UwljuWrJRa3tFDotXkIIZtLrP7J+qI=",
"op_cert_counter": 2,
"hash_hex": "18b22aaa87662ff8488a455ecad73004a5d2a6b8877abea9637977dc47d740d7",
"op_cert_hex": "27eb3b6b9eab645b62dd4c258ee5ab2516b7b450e8b57908219b4bacfec9faa2"
}
]

💌 Response Schemas

Status Code 200

NameTypeDescription
idinteger(int64)The block unique identifier.
hashstring(byte)The hash identifier of the block.
epoch_nointeger(int32)The epoch number.
slot_nointeger(int64)The slot number.
epoch_slot_nointeger(int32)The slot number within an epoch (resets to zero at the start of each epoch).
block_nointeger(int32)The block number.
previous_idinteger(int64)The Block table index of the previous block.
slot_leader_idinteger(int64)The SlotLeader table index of the creator of this block.
sizeinteger(int32)The block size (in bytes). Note, this size value is not expected to be the same as the sum of the tx sizes due to the fact that txs being stored in segwit format and oddities in the CBOR encoding.
timestring(date-time)The block time (UTCTime).
tx_countinteger(int64)The number of transactions in this block.
proto_majorinteger(int32)The block's major protocol number.
proto_minorinteger(int32)The block's major protocol number.
vrf_keystringThe VRF key of the creator of this block.
op_certstring(byte)The hash of the operational certificate of the block producer.
op_cert_counterinteger(int64)The value of the counter used to produce the operational certificate.
hash_hexstringThe hexadecimal encoding of the block hash.
op_cert_hexstringThe hexadecimal encoding of the block producer operational certificate's hash.