Skip to main content
Version: 1.0
Endpoints Summary
GET Latest block
GET One block by block number
GET One block by block hash
GET One block by epoch and slot number

GET Latest block​

Returns the latest block i.e. the tip of the blockchain.

GET /api/core/blocks/latest

👨‍💻 Code samples​

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

💌 Response Codes​

OK: Successful request.

{
"id": 10595156,
"hash": "F3PsbxTP56Xyj9nsaxDuwHSsnWgSsj883wHeMWayDrA=",
"epoch_no": 496,
"slot_no": 129143847,
"epoch_slot_no": 235047,
"block_no": 10559461,
"previous_id": 10595155,
"slot_leader_id": 4555972,
"size": 88940,
"time": "2024-07-11T15:02:18",
"tx_count": 15,
"proto_major": 8,
"proto_minor": 0,
"vrf_key": "vrf_vk1d0djffha6pa0fk44jsugyh8ew7lmmarr2k6m2xxe5qgl97ztjlyqdk5lmx",
"op_cert": "zGmgcmETwmFsAcz/XYdNr7jXprrei+mDxsh90gJxDWQ=",
"op_cert_counter": 17,
"hash_hex": "1773ec6f14cfe7a5f28fd9ec6b10eec074ac9d6812b23f3cdf01de3166b20eb0",
"op_cert_hex": "cc69a0726113c2616c01ccff5d874dafb8d7a6bade8be983c6c87dd202710d64"
}

💌 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 One block by block number​

Returns one specific block given its number.

GET /api/core/blocks/{block_no}

🎰 Parameters​

NameDescriptionInTypeRequired
block_noBlock numberpathintegertrue

👨‍💻 Code samples​

const CBI = await new CardanoBI({ apiKey: 'YOUR-KEY', apiSecret: 'YOUR-SECRET' }); 
const blocks = await CBI.core.blocks_({ block_no: 8415364 });
console.log(blocks);

💌 Response Codes​

OK: Successful request.

{
"id": 8416431,
"hash": "if8QkGFBBakZyczIuzkUqu8d3SghSk1V/2VDbSyfwLI=",
"epoch_no": 394,
"slot_no": 85165743,
"epoch_slot_no": 320943,
"block_no": 8415364,
"previous_id": 8416430,
"slot_leader_id": 7195394,
"size": 47554,
"time": "2023-02-18T14:53:54",
"tx_count": 25,
"proto_major": 8,
"proto_minor": 0,
"vrf_key": "vrf_vk1ksvt6yywk5j2wkq3rmkxghgru7svaetmjnf8kx4636x7pwcdmgrsy8peyv",
"op_cert": "LRXcL8sndi7y+wi7cjGLkUD+cYn7yq2+GFICiVMrC80=",
"op_cert_counter": 5,
"hash_hex": "89ff1090614105a919c9ccc8bb3914aaef1ddd28214a4d55ff65436d2c9fc0b2",
"op_cert_hex": "2d15dc2fcb27762ef2fb08bb72318b9140fe7189fbcaadbe18520289532b0bcd"
}

💌 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 One block by block hash​

Returns one specific block given its hash.

GET /api/core/blocks/{block_hash}

🎰 Parameters​

NameDescriptionInTypeRequired
block_hashBlock hashpathstringtrue

👨‍💻 Code samples​

const CBI = await new CardanoBI({ apiKey: 'YOUR-KEY', apiSecret: 'YOUR-SECRET' }); 
const blocks = await CBI.core.blocks_({ block_hash: "89ff1090614105a919c9ccc8bb3914aaef1ddd28214a4d55ff65436d2c9fc0b2" });
console.log(blocks);

💌 Response Codes​

OK: Successful request.

{
"id": 8416431,
"hash": "if8QkGFBBakZyczIuzkUqu8d3SghSk1V/2VDbSyfwLI=",
"epoch_no": 394,
"slot_no": 85165743,
"epoch_slot_no": 320943,
"block_no": 8415364,
"previous_id": 8416430,
"slot_leader_id": 7195394,
"size": 47554,
"time": "2023-02-18T14:53:54",
"tx_count": 25,
"proto_major": 8,
"proto_minor": 0,
"vrf_key": "vrf_vk1ksvt6yywk5j2wkq3rmkxghgru7svaetmjnf8kx4636x7pwcdmgrsy8peyv",
"op_cert": "LRXcL8sndi7y+wi7cjGLkUD+cYn7yq2+GFICiVMrC80=",
"op_cert_counter": 5,
"hash_hex": "89ff1090614105a919c9ccc8bb3914aaef1ddd28214a4d55ff65436d2c9fc0b2",
"op_cert_hex": "2d15dc2fcb27762ef2fb08bb72318b9140fe7189fbcaadbe18520289532b0bcd"
}

💌 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 One block by epoch and slot number​

Returns one specific block given its epoch and slot numbers.

GET /api/core/blocks/epochs/{epoch_no}/slots/{slot_no}

🎰 Parameters​

NameDescriptionInTypeRequired
epoch_noEpoch numberpathintegertrue
slot_noSlot numberpathintegertrue

👨‍💻 Code samples​

const CBI = await new CardanoBI({ apiKey: 'YOUR-KEY', apiSecret: 'YOUR-SECRET' }); 
const blocks_slots = await CBI.core.blocks.epochs.slots_({ epoch_no: 394, slot_no: 85165743 });
console.log(blocks_slots);

💌 Response Codes​

OK: Successful request.

{
"id": 8416431,
"hash": "if8QkGFBBakZyczIuzkUqu8d3SghSk1V/2VDbSyfwLI=",
"epoch_no": 394,
"slot_no": 85165743,
"epoch_slot_no": 320943,
"block_no": 8415364,
"previous_id": 8416430,
"slot_leader_id": 7195394,
"size": 47554,
"time": "2023-02-18T14:53:54",
"tx_count": 25,
"proto_major": 8,
"proto_minor": 0,
"vrf_key": "vrf_vk1ksvt6yywk5j2wkq3rmkxghgru7svaetmjnf8kx4636x7pwcdmgrsy8peyv",
"op_cert": "LRXcL8sndi7y+wi7cjGLkUD+cYn7yq2+GFICiVMrC80=",
"op_cert_counter": 5,
"hash_hex": "89ff1090614105a919c9ccc8bb3914aaef1ddd28214a4d55ff65436d2c9fc0b2",
"op_cert_hex": "2d15dc2fcb27762ef2fb08bb72318b9140fe7189fbcaadbe18520289532b0bcd"
}

💌 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.