Skip to main content
POST
/
v1
/
rpc
/
getBlock
Get block
curl --request POST \
  --url https://api.kas.fyi/v1/rpc/getBlock \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "hash": "fc4c90a646687ba6f862e6089285dd7a610ef4d7f7614d25295f65aceb02bc41",
  "includeTransactions": true
}'
{
  "block": {
    "header": {
      "hash": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
      "version": 1,
      "parentsByLevel": [
        [
          "0x1234567890abcdef..."
        ],
        [
          "0x9876543210fedcba..."
        ]
      ],
      "hashMerkleRoot": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
      "acceptedIdMerkleRoot": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
      "utxoCommitment": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
      "timestamp": "1638360000000",
      "bits": 393216,
      "nonce": "12345678901234567890",
      "daaScore": "1234567",
      "blueWork": "123456789012345",
      "blueScore": "1234567",
      "pruningPoint": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6"
    },
    "transactions": [
      {
        "version": 1,
        "inputs": [
          {
            "previousOutpoint": {
              "transactionId": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
              "index": 0
            },
            "signatureScript": "0x473044...",
            "sequence": "4294967295",
            "sigOpCount": 1
          }
        ],
        "outputs": [
          {
            "value": "1000000000",
            "scriptPublicKey": "<string>",
            "verboseData": {
              "scriptPublicKeyType": "pubkeyhash",
              "scriptPublicKeyAddress": "kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz"
            }
          }
        ],
        "lockTime": "0",
        "subnetworkId": "0100000000000000000000000000000000000000",
        "gas": "0",
        "payload": "0x",
        "mass": "1000",
        "verboseData": {
          "transactionId": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
          "hash": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
          "computeMass": "1000",
          "blockHash": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
          "blockTime": "1638360000000"
        }
      }
    ],
    "verboseData": {
      "hash": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
      "difficulty": 1.5,
      "selectedParentHash": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
      "transactionIds": [
        "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
        "0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba"
      ],
      "isHeaderOnly": false,
      "blueScore": 1234567,
      "childrenHashes": [
        "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6"
      ],
      "mergeSetBluesHashes": [
        "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6"
      ],
      "mergeSetRedsHashes": [
        "0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba"
      ],
      "isChainBlock": true
    }
  }
}

Cost

This endpoint costs 0.1 RU (Request Units) per call.

Authorizations

x-api-key
string
header
required

API key required for authentication. Get your API key at https://developer.kas.fyi

Body

application/json
hash
string
required

Block hash

Example:

"fc4c90a646687ba6f862e6089285dd7a610ef4d7f7614d25295f65aceb02bc41"

includeTransactions
boolean
required

Whether to include transactions in the response

Example:

true

Response

200 - application/json

Block retrieved successfully

block
object
required

Complete block data including header and transactions

⌘I