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

banner image
dash

DASH

POST

GET

attention-sign-fillabandontransactionattention-sign-fillabortrescanattention-sign-filladdmultisigaddressattention-sign-filladdnodeattention-sign-fillbackupwalletattention-sign-fillbls_fromsecretattention-sign-fillbls_generateattention-sign-fillclearbannedattention-sign-fillcoinjoinattention-sign-fillcreatemultisigattention-sign-fillcreatewalletattention-sign-filldebugattention-sign-filldisconnectnodeattention-sign-filldumphdinfoattention-sign-filldumpprivkeyattention-sign-filldumpwalletattention-sign-fillencryptwalletattention-sign-fillfundrawtransactionattention-sign-fillgenerateattention-sign-fillgeneratetoaddressattention-sign-fillgetaddednodeinfoattention-sign-fillgetaddressbalanceattention-sign-fillgetaddressdeltasattention-sign-fillgetaddressesbylabelattention-sign-fillgetaddressinfoattention-sign-fillgetaddressmempoolattention-sign-fillgetaddresstxidsattention-sign-fillgetaddressutxosattention-sign-fillgetbalanceattention-sign-fillgetconnectioncountattention-sign-fillgetmemoryinfoattention-sign-fillgetnettotalsattention-sign-fillgetnetworkinfoattention-sign-fillgetnewaddressattention-sign-fillgetpeerinfoattention-sign-fillgetrawchangeaddressattention-sign-fillgetreceivedbyaddressattention-sign-fillgetreceivedbylabelattention-sign-fillgettransactionattention-sign-fillgetunconfirmedbalanceattention-sign-fillgetwalletinfoattention-sign-fillgobject_list-preparedattention-sign-fillgobject_prepareattention-sign-fillgobject_submitattention-sign-fillgobject_vote-aliasattention-sign-fillgobject_vote-confattention-sign-fillgobject_vote-manyattention-sign-fillgobjectattention-sign-fillimportaddressattention-sign-fillimportelectrumwalletattention-sign-fillimportmultiattention-sign-fillimportprivkeyattention-sign-fillimportprunedfundsattention-sign-fillimportpubkeyattention-sign-fillimportwalletattention-sign-fillkeepassattention-sign-fillkeypoolrefillattention-sign-filllistaddressbalancesattention-sign-filllistaddressgroupingsattention-sign-filllistbannedattention-sign-filllistlabelsattention-sign-filllistlockunspentattention-sign-filllistreceivedbyaddressattention-sign-filllistreceivedbylabelattention-sign-filllistsinceblockattention-sign-filllisttransactionsattention-sign-filllistunspentattention-sign-filllistwalletsattention-sign-fillloadwalletattention-sign-filllockunspentattention-sign-fillloggingattention-sign-fillmasternode_currentattention-sign-fillmasternode_outputsattention-sign-fillmasternode_winnerattention-sign-fillpingattention-sign-fillprioritisetransactionattention-sign-fillprotx_diffattention-sign-fillprotx_infoattention-sign-fillprotx_listattention-sign-fillprotx_register_fundattention-sign-fillprotx_register_prepareattention-sign-fillprotx_register_submitattention-sign-fillprotx_registerattention-sign-fillprotx_update_registrarattention-sign-fillprotx_update_serviceattention-sign-fillpruneblockchainattention-sign-fillquorum_dkgstatusattention-sign-fillquorum_getrecsigattention-sign-fillquorum_hasrecsigattention-sign-fillquorum_infoattention-sign-fillquorum_isconflictingattention-sign-fillquorum_listattention-sign-fillquorum_memberofattention-sign-fillquorum_selectquorumattention-sign-fillquorum_signattention-sign-fillquorum_verifyattention-sign-fillremoveprunedfundsattention-sign-fillrescanblockchainattention-sign-fillsavemempoolattention-sign-fillsendmanyattention-sign-fillsendtoaddressattention-sign-fillsetbanattention-sign-fillsetcoinjoinamountattention-sign-fillsetcoinjoinroundsattention-sign-fillsetlabelattention-sign-fillsetnetworkactiveattention-sign-fillsettxfeeattention-sign-fillsignmessageattention-sign-fillsignmessagewithprivkeyattention-sign-fillsignrawtransactionattention-sign-fillsignrawtransactionwithwalletattention-sign-fillstopattention-sign-fillsubmitblockattention-sign-fillunloadwalletattention-sign-fillupgradetohdattention-sign-fillverifychainlockattention-sign-fillverifyislockattention-sign-fillvoterawattention-sign-fillwalletlockattention-sign-fillwalletpassphraseattention-sign-fillwalletpassphrasechange
chevron-right

Last updated on January 1, 1970

3 min read

Method getblock undefined ()
connect with JSON-RPC protocol

getblock

info-circle-fill

gets a block with a particular header hash from the local block databaseeither as a JSON object or as a serialized block.

Parameters

block hash - string (hex)

The hash of the header of the block to get, encoded as hex in RPC byte order.

Verbosity - number (int)

Optional.

Set to one of the following verbosity levels:

- 0 - Get the block in serialized block format;

- 1 - Get the decoded block as a JSON object (default)

- 2 - Get the decoded block as a JSON object with transaction details

Request

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

Response

{
    "error": null,
    "id": "getblock.io",
    "result": {
        "bits": "192ab4b3",
        "cbTx": {
            "height": 1535345,
            "merkleRootMNList": "e77cd11384bebaa2e1a3ed562a7303208b2f09fe62593e39ae5b1f25b571c3ef",
            "merkleRootQuorums": "c6d4fbfa30cd4d07350ae70657806249fc0d908e0d0ad00c3c831f1ca49623ce",
            "version": 2
        },
        "chainlock": true,
        "chainwork": "000000000000000000000000000000000000000000006150154939c35ffff276",
        "confirmations": 570,
        "difficulty": 100569386.2568106,
        "hash": "00000000000000093711aeacfe1a827cb43c6d626230cdd2e41ad6f43c1e79d3",
        "height": 1535345,
        "mediantime": 1631177973,
        "merkleroot": "f10d0de8fa4dc0f60cc6028a7f9caaff7927d9fe00114d8211e1527e557fdced",
        "nTx": 8,
        "nextblockhash": "0000000000000003233fbb738a1bf5e2876face7b801b020d276b9c6c3967c67",
        "nonce": 1119488789,
        "previousblockhash": "000000000000002c086772e3101b2e598d244e20b73211d1dd86c59584dc4407",
        "size": 2692,
        "time": 1631178288,
        "tx": [
            "83dc6c8e03026c0317885f62a7072dfde10014967f59477a0f7b5fc52f44a784",
            "53fd7dcc171756ab56c1c9af76bdc398f6be69d97dcbe8696b53ff1b140c2249",
            "7d2d8aa7ee2e4c9d28bf390a4b3751fbd56b5bd3a9e3eb88cc767ce78dc8120b",
            "01108f50aa05893d5e4f5777a512fb0a87d784a3c7f3ce37f14caada5e347a4a",
            "8b31cd7e89a1246e2d2a6fbbc71cc0d5e4eeb40130f001607ce011eaa7081c25",
            "1cfe92a8aa091c7ab8a9b14239126fb12d28cfb02df5a941753d16cdebf6cc56",
            "c4c988dec1bfaaee340c3f176dce57cd40a074c3157142c471c1c33cb36d8d5f",
            "31eab81d2b5ffa6a5c3e4ded0414144057b82d04cef0731338fe96b4576de658"
        ],
        "version": 536870912,
        "versionHex": "20000000"
    }
}
banner icon

Start Building with GetBlock RPCs for Free