New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image
ksm

KSM

POST

GET

attention-sign-fillauthor_hasKeyattention-sign-fillauthor_hasSessionKeysattention-sign-fillauthor_insertKeyattention-sign-fillauthor_pendingExtrinsicsattention-sign-fillauthor_removeExtrinsicattention-sign-fillauthor_rotateKeysattention-sign-fillauthor_submitAndWatchExtrinsicattention-sign-fillauthor_submitExtrinsicattention-sign-fillbabe_epochAuthorshipattention-sign-fillbeefy_getFinalizedHeadattention-sign-fillbeefy_subscribeJustificationsattention-sign-fillchain_subscribeFinalizedHeadsattention-sign-fillchain_subscribeNewHeadsattention-sign-fillchildstate_getKeysattention-sign-fillchildstate_getKeysPagedattention-sign-fillchildstate_getStorageattention-sign-fillchildstate_getStorageEntriesattention-sign-fillchildstate_getStorageHashattention-sign-fillchildstate_getStorageSizeattention-sign-fillcontracts_callattention-sign-fillcontracts_getStorageattention-sign-fillcontracts_instantiateattention-sign-fillcontracts_rentProjectionattention-sign-fillcontracts_upload_codeattention-sign-filldev_getBlockStatsattention-sign-fillengine_createBlockattention-sign-fillengine_finalizeBlockattention-sign-filleth_accountsattention-sign-filleth_blockNumberattention-sign-filleth_callattention-sign-filleth_chainIdattention-sign-filleth_coinbaseattention-sign-filleth_estimateGasattention-sign-filleth_gasPriceattention-sign-filleth_getBalanceattention-sign-filleth_getBlockByHashattention-sign-filleth_getBlockByNumberattention-sign-filleth_getBlockTransactionCountByHashattention-sign-filleth_getBlockTransactionCountByNumberattention-sign-filleth_getCodeattention-sign-filleth_getFilterChangesattention-sign-filleth_getFilterLogsattention-sign-filleth_getLogsattention-sign-filleth_getProofattention-sign-filleth_getStorageAtattention-sign-filleth_getTransactionByBlockHashAndIndexattention-sign-filleth_getTransactionByBlockNumberAndIndexattention-sign-filleth_getTransactionByHashattention-sign-filleth_getTransactionCountattention-sign-filleth_getTransactionReceiptattention-sign-filleth_getUncleByBlockHashAndIndexattention-sign-filleth_getUncleByBlockNumberAndIndexattention-sign-filleth_getUncleCountByBlockHashattention-sign-filleth_getUncleCountByBlockNumberattention-sign-filleth_getWorkattention-sign-filleth_hashrateattention-sign-filleth_miningattention-sign-filleth_newBlockFilterattention-sign-filleth_newFilterattention-sign-filleth_newPendingTransactionFilterattention-sign-filleth_protocolVersionattention-sign-filleth_sendRawTransactionattention-sign-filleth_sendTransactionattention-sign-filleth_submitHashrateattention-sign-filleth_submitWorkattention-sign-filleth_subscribeattention-sign-filleth_syncingattention-sign-filleth_uninstallFilterattention-sign-fillgrandpa_proveFinalityattention-sign-fillgrandpa_subscribeJustificationsattention-sign-fillmmr_generateProofattention-sign-fillmmr_rootattention-sign-fillmmr_verifyProofattention-sign-fillmmr_verifyProofStatelessattention-sign-fillnet_listeningattention-sign-fillnet_peerCountattention-sign-fillnet_versionattention-sign-filloffchain_localStorageGetattention-sign-filloffchain_localStorageSetattention-sign-fillpayment_queryFeeDetailsattention-sign-fillpayment_queryInfoattention-sign-fillstate_callattention-sign-fillstate_getChildKeysattention-sign-fillstate_getChildReadProofattention-sign-fillstate_getChildStorageattention-sign-fillstate_getChildStorageHashattention-sign-fillstate_getChildStorageSizeattention-sign-fillstate_getKeysattention-sign-fillstate_getKeysPagedattention-sign-fillstate_getPairsattention-sign-fillstate_getReadProofattention-sign-fillstate_getStorageattention-sign-fillstate_getStorageHashattention-sign-fillstate_getStorageSizeattention-sign-fillstate_queryStorageattention-sign-fillstate_queryStorageAtattention-sign-fillstate_subscribeRuntimeVersionattention-sign-fillstate_subscribeStorageattention-sign-fillstate_traceBlockattention-sign-fillstate_trieMigrationStatusattention-sign-fillsync_state_genSyncSpecattention-sign-fillsystem_accountNextIndexattention-sign-fillsystem_addLogFilterattention-sign-fillsystem_addReservedPeerattention-sign-fillsystem_dryRunattention-sign-fillsystem_localListenAddressesattention-sign-fillsystem_localPeerIdattention-sign-fillsystem_nameattention-sign-fillsystem_networkStateattention-sign-fillsystem_nodeRolesattention-sign-fillsystem_peersattention-sign-fillsystem_removeReservedPeerattention-sign-fillsystem_reservedPeersattention-sign-fillsystem_resetLogFilterattention-sign-fillweb3_clientVersionattention-sign-fillweb3_sha3
chevron-right

Last updated on January 1, 1970

3 min read

Method chain_getBlock undefined ()
connect with JSON-RPC protocol

chain_getBlock

info-circle-fill

Get header and body of a relay chain block.

Parameters

hash - BlockHash

hash of the block

Request

curl --location --request POST 'https://ksm.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "chain_getBlock",
"params": ["0x255bc00927df8d33d561792635cbc6bde480a0a505eef5ff28630ece3fc15b32"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "block": {
            "extrinsics": [
                "0x280403000b406017cb7b01"
            ],
            "header": {
                "digest": {
                    "logs": [
                        "0x0642414245b50103920000001c5b3410000000008c38422de44e2d4810819bffdc072324d552348581a3ee4d08f5d16782e82b1413e24956b9c637cc18b99964298c662274aa7e68fe1e55372e61a65185eddf015588b5d1c11e93a39ef29db473e91b225390cd155dfdb9bff7d29dd7cf897003",
                        "0x0542414245010114a5c414eb433fef25d514ac35937c1c2b83ffbac8a47479f02393172f622d02789eb0e3c4a8281f9a169a5fcf19cb1c8285f6382fc7ce3d0b71f82ca3f03582"
                    ]
                },
                "extrinsicsRoot": "0xada254ef8321e28a6667ad75659be6464944174bd5540667da94590a0a4a596f",
                "number": "0x67103a",
                "parentHash": "0x570e3f417a41646d9b978bf2ac3d68be48bb0f73082825f438af58a37cfe0ef8",
                "stateRoot": "0x176c67eca385c24403ba774550ff75dcfa652d6d6cf2d2ecbccf56e513db601c"
            }
        },
        "justifications": null
    }
}
banner icon

Start Building with GetBlock RPCs for Free