Blocks API
Query blocks by hash, blue score, or get block templates for mining.
RPCgetBlockRead
Get a single block by its hash or blue score. Returns full block data including transaction IDs, parent block hashes, and miner reward.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hash | string | Optional | Block hash (64-char hex) |
blueScore | integer | Optional | Block blue score (height) |
includeTransactions | boolean | Optional | Include full transaction data |
Request
{
"id": 1,
"method": "getBlock",
"params": [{
"blueScore": 6602,
"includeTransactions": true
}]
}Response
{
"block": {
"header": {
"version": 1,
"hash": "0bea8500abc...",
"blueScore": 6602,
"timestamp": 1710255328,
"nonce": 4521893761,
"parentBlockHashes": ["7f3c1200...", "a1e93300..."]
},
"transactions": ["8f3a9b2...", "2c1e8d4..."],
"verboseData": {
"minerAddress": "csm1sexample...",
"reward": "0.08318123"
}
}
}RPCgetBlocksRead
Get a range of blocks between two blue scores. Used by explorers for block listing pages.
{
"id": 2,
"method": "getBlocks",
"params": [{
"lowHash": "block_hash_start...",
"includeBlocks": true,
"includeTransactions": false
}]
}
// Response
{
"blockHashes": ["hash1...", "hash2..."],
"blocks": [...]
}RPCgetBlockCountRead
Get the current block count (blue score) of the network.
{
"id": 3,
"method": "getBlockCount",
"params": [{}]
}
// Response
{
"blockCount": 11636,
"headerCount": 11636
}RPCgetBlockTemplateMining
Get the current block template for mining. Returns header template with DAA score, parent blocks, and reward address.
{
"id": 4,
"method": "getBlockTemplate",
"params": [{
"payAddress": "csm1sminer...",
"extraData": "pool_id"
}]
}
// Response
{
"block": {
"header": {
"version": 1,
"parentBlockHashes": ["7f3c1200..."],
"daaScore": 11101,
"bits": 2072554627,
"nonce": 0
}
},
"isSynced": true
}RPCgetHeadersRead
Get block headers between startHash and current virtual, up to limit.
{
"id": 5,
"method": "getHeaders",
"params": [{
"startHash": "block_hash...",
"limit": 100,
"isAscending": true
}]
}
// Response
{
"headers": ["header1...", "header2..."]
}Block Data Summary
1s
Block Time
DAG
Structure
0.08318123
Block Reward (CSM)
5
Block Methods