MATIC
POST
GET
Last updated on January 1, 1970
10 min read
Method eth_getBlockByNumber undefined ()
connect with WS protocol
eth_getBlockByNumber
Returns information about a block by block number.
Parameters
QUANTITY|TAG
- integer or string
block number or "latest", "earliest" or "pending"
Boolean
- Boolean
If true it returns the full transaction objects, if false only the hashes of the transactions.
Request
wscat -c wss://matic.getblock.io/YOUR-API-KEY/mainnet/
# wait for connection and send the request body
{"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": "getblock.io"}
Response
{
"id": "getblock.io",
"jsonrpc": "2.0",
"result": {
"baseFeePerGas": "0x1c03a86484",
"difficulty": "0x18",
"extraData": "0xd682030983626f7288676f312e32302e34856c696e757800000000000000000019d39d044023c9141e61cbf34ef86fdaf0c6b36d658d01f060db9cb09582c69b657ee29ba3c658346d3a6baf8d33797b82120b63aa040eae44a08ec02f92163d00",
"gasLimit": "0x1c318c9",
"gasUsed": "0x1c3050a",
"hash": "0x7cee929ba2e9522c0d5f4e80befc7543717ae2960168d334096b252a287a48ad",
"logsBloom": "0xf6bb27f876f0362e057b7d749ea4a3974204d3103496b8fc7e3baaaadce3397325fe938b74beff1bab5d36f6cffba4b5e837f01587b7bdf6fbe878be933eac815573f966f4a2ccddcadb46dfae3bddbf9c6f66e9d377febddf7bd73fd30bb6b239457e7beaf8deeb7c642c37b5925c7febd7d7eaff4b5eb7f281e3723cca7c2414e14a7fc4daf8a4796917d0b8aa3cfbfdcb3dfdbfef783f4754f2f7eac2beae63bddd867d8f6e553b23dfd7bbf4e7eac67a42ca62a8cc60a5703aff372f686261729ca2cc565897f59598c26bad955758e7aec9af49cfbee4f0c3bffafce03fb0bdd2f6a1538a8f7c8f2eb503ffaacffd6267bf7dc99c579f7d2eb51fdcfdae",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x2958310",
"parentHash": "0x9a59620b573cb1318a23d4ec67ccbfc7df26757ab2aa55072373d1b052f540ed",
"receiptsRoot": "0x6673f1acb049ed87c8a742030972f737ea24a3a1a67906582957330363c4f606",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0xfcac",
"stateRoot": "0xa656ba04c435cac298277e42fd53bdcaeddaacf793bacb80c81af22960f6a95b",
"timestamp": "0x6476c177",
"totalDifficulty": "0x2b9b63ec",
"transactions": [
"0x294e21d7a8e420ad89d2605d6e12288ad52a2183756abf5a613672d7a8f0f0d7",
"0xe33d17cad721287facac8b36da7dc87081437f7afd58a24831cdffd148bd1a97",
"0xd2e015af2b110b292dbd05edf4a513cd0429a69b09eeb3ef14e65b398a5183bb",
"0x5a8025e000dc554a5f0c213afed69744ce5966185fb6c8afef2648d24e914289",
"0xb2c358bda94c3b44124cc254240c6af4fb0cd52d672b107d7369b0d3934d4fe2",
"0xd011c6cb4d76191b5587e64a1ab88d33d08ec90d82d1bc5e9228a970ae552c47",
"0x7e94e090efe79bbc9c80074a12168d5652d89d27dbffe1998b8d702df8d9db5d",
"0xc63dce848207fd2e8da87a22ee69b012258a5a1f11a1df8cf5714d42f05a721a",
"0x637eb1ff19ab3b463db27c3edb05982c27d83be19b486ca8daceb28c2a26b4c9",
"0xd0fcaaa5d8327a33c9105d1f494de27e7b9fd59c7592aa8bb47223c284ea02ea",
"0xce8adcbe2d9c6ad751db476f8a43cdf64becf676d4552cc3082a718323f6fca6",
"0x6a58b33389697257534c20b34ce63e4e14f643c912214fa1ad3cf188efd44eb5",
"0x35c9044abb08fc4223dc16b24f02ea3994bfda93ad466eeb39bcb9351118043f",
"0x79090e68d186fb4b84e102c3da8f833dbc36b861ebeb296a16db0bee64d5b20f",
"0x308c1eff56269de38e0817ad8f960975af6badb48bd23282cc921cbd7d45f5e4",
"0xc348f15d6d5500b49ee6b612398ecf9a60994f2ef6215076f37d23c31e06a8f5",
"0x5457241f631319bcffe88b9dc85ad39112d046b29e70a7d73ca3e8be45d0f078",
"0xe8c45fb33c692487b85a9b4327306c802b0e1169e6a2f2be0b3cf34fc1ee367f",
"0xa1e24380b538227623691801e35c7a316477ceaf8420434acd6d9ba6c4ef9f25",
"0xe7e33b53b6d3a55f94fc8488d39fb5a93791eb1b6d53f632929d7098855ee3f3",
"0x73e367bf281771df1c994f2ed1e022ff706f7bb21b0ef5b4cb5999f7edd8a15c",
"0x2ed9e1fdb88485181309b60ff411c0731c47b3c4ef1d02c09c53fb58806d8fca",
"0x627680c9201ebb113de3df07011f3b608b4d91f480e854bb1c0fabd022408e6c",
"0xcf904305bddef4d99e71aab7f20b2b54a28e84fd365cd3a7ede15fa78f607850",
"0xc6e018d2ac9911396be8a65aaf0932033d4f56657cdfc0528b942e519aa48779",
"0x1807d7fe0968c50f514ecc53c06d0be9722d88998911652891fe3dcb89d9956e",
"0x24bb787dfd38d9b472bf63ceff4c19fa798a9797eacde693bbc7c07ce572cadb",
"0x94463ff1c5ad3b8f7a983a2ee8ddf5fb5c18eee3749c9dff8580cde5f7f83211",
"0xdb2219c968adc8d549bde0c849a5c72b737f74b2cbbaea6734a48e0408d592a4",
"0x3f7e6167e5502eea323d33abbd0934997caed065d1fbf603554432dbbe25e30d",
"0x6fe8f82e7bd4595fba365fc893f73dc2221878008be22defd2e2c99a6819d555",
"0x6c0e43f6e33fed00cec13ab5c497a396599ef3cd2489232723905fd050565ad1",
"0x2606f043c5674af470d74684389208d412acc50462edfd602dbb33c18eb65cdb",
"0x3164e67fa918bcc86c10ffdf9645b5a18a96bf5958e432d6361b411196a90c4f",
"0x824c0672c57d8aba2b7f2c7cf308e0bcbe641a59ffb6373a4aa6aceb74ad2929",
"0x3c334e1ae88c56274f5433efc3d3c0de46a0024afe728fa7b03533bca7b96678",
"0x368237e4898a96deca5b0a49f559bdc1376b633286a743992b48a5758d87da45",
"0x87ac29da21b0f868f424595512bcf97ab0d645304f35235f56adc0939012be39",
"0x489a57ded5b601ba85207c4a17ddeb514dc729943fd95c479769dc01899696eb",
"0x3664e3cdc8970795251b0be3e11319d19712651a677616244be331ba8afa5167",
"0x6b3d12d91809d8760b60588bf880c1b91ec93d3f80f56f6b69bd7f4f24dd97fb",
"0x06bdc7a5685205a287e974bf7a675721eeee787267292ade247338640ec374e3",
"0xf95193fd0c960729561ce03fa69513d8849a0a527ee87ae09ac71c2ce8868018",
"0x72a49c91317553d3cc6c6a735ac62593973fe7bfdc3230c10f3f8d31ef7f3274",
"0xe21d49c06ab57e52a2c62bf3db52a11d582be2c75f2622c85ead9a44a0928c09",
"0x70ba9aaf30b0dbfa012deb9a24cad8d3993d4ddbd8ea7cd70789ebf817e7c94f",
"0xd275998b5603f1e4be067b96afa9ad725b94cc169711e8b83c7f2f521e413c69",
"0x8b6fde43e11a1a1e0533c883e5bc315cdf721f12bc646437f4ca09982de1b683",
"0x36e405369c1e80efdcddb6bae4d06ed24006179cb02bc88af2abc03491d88c43",
"0x6d4bb573f5e36c60fe7c9d67fb840ad2df2cbb101fcc9bb50af4ef9df2a9bdc2",
"0xdb247bc8a12180a7f8300754dcae858617c59d53761946d42cda4da7bea3324d",
"0x155b9b40c5cf9b5cd5c97f0da17bfd31f795718895f3b6b0a85b6a9b1a4560f5",
"0x94b1e4a319a1859dfb792a6f6b5bede535856758f77a166f00fd46dde3e9737a",
"0xe90eae44653de87d5b76232a3ecf415611bcb11195c23447b62c08a6095db3b9",
"0x3cf6134d33f9bc2d3ab1c2fb62030ed9b5fb2d81d82d5c847d0cd1669e0db44b",
"0x62aa1ef9607025d76044926fbba55ac90cce6e28a1d242c195b125f5c320f9a0",
"0x27c41c6c22bb332ade2b40c6490385fcc9ff6d5e80ee0f5ae6b17ae8c918c6ea",
"0x5204a6f759e69e836dac66a5946a0a6fef3828b83ac30402348532a457f717e1",
"0x22f1d86d130d0a07640e48056cdbcabf0d2c0922357e11a2e7eb82ba506f4eb7",
"0xe149a56c2ed9b368e1e00e3943ac415c4ae1f1c26f96573213caf7756a4f21fe",
"0x7eaa52dec4910251e044d45c477e12ac87e005eba4feda6e999f0aed787fdfdf",
"0xbe170e9131f58a3ba939460cd622fe0a0275ca3a5f77de96f57484f3e1684267",
"0xab94688cd142dd728a1819e89b6e0e8f18b6db2dda53d7eb42f497712282702e",
"0x1c8406a725ccd43c0b51db8ca2305dba14729ebebfe9ff44be6e0f4119aa2a00",
"0x5577145ca49547bbaa448bf26e0d0bf46cfbac73111c951eeaa813fa5f8dad2f",
"0x7d6f27352083926bae67cb996c6dad7de9b3d5294a3d31ace2f3fa6b32a3a4f1",
"0x5e5857533e3d26d81f3b114a460b9e9523ef6341f3b8ec448c50577663b9ddc8",
"0x380299f8cb957fadcea076fea7220f8f5275d3a4af746d7f901418cd764c568b",
"0xb2ebe5935a0ee179d24a319a563accf29f53eea72aca452efc44a982ff4526b5",
"0x20dbe46c0887b4ce62bca19262734ccba9c10a64393d3d0bff9f472afe516252",
"0x7a16fb2a153c3f2cdded78f63046bb832fd1e09d13f87a7e1ccb866e349c233b",
"0x4ec167ec84760833c31d438e2db60924c94c0cee797d52606ef4998c34a1f97e",
"0x4111800400ad5306fa06a19d78a300db83ed3abbc160b39c8752cfb78b5c8718",
"0xc849a8d8d12593b704e72b6e1ed34c4a069b8fabe9bed1c6bb23ff6a802ae118",
"0x437f7e73fbdee2a1279e38e36459bec939c4a414a641eae4dff727b2d75acdfa",
"0x82c8831b2cebc68ee8e983e06d5aabd8dd3ee63621a3e05a312e5b9f67d9a980",
"0xce8d94488dce609e1f71dfc72c9dd83df24fdc2f7054419d0ddcb19cfc92f0e8",
"0xdb7065c3dbee3c85b6925c3e1a3a1990272e9bbfa10682f3ad10210e25435622",
"0xf1579d60349444bab64030507b567a6969a18be44217cd02af4e4199c50cbe0f",
"0xabeb86a85ec28e5cd041bd357dda6ce19976b3b7ff703c266f28aaf1e4e52abb",
"0x01832832ad8f7b810b9ed483467bfdb1cd67cca972ffdb096831c42d03800387",
"0x4af31f1a83c185ca41d2b9a235caa0362f7286a9ac90e21533982cee40d04d45",
"0xe6fcb0798da9bea04c0aadbdc22dcf8987e496e3f6da9c59253f4d59f45fa247",
"0xffbfbddba7fc852501b3c5265c7969975bb3178f81386510c7fbcb81e2976ba1",
"0x63df3488a9f7d67b38e2a85497cc5b76f8ddee4e3f5fcf72ef2ceec26833e3af",
"0x6e374e90edd5c1b49c28213c75f62724983c808cbb7e496fc255e6e455ad70b4",
"0x7d29a4f8a4a005f445dcbf5190da54e121e9c205131e02ea979b5ba4137dabd6",
"0x1b5ef3f68ea50ba8c49a05261c735e6eb4314c69e5d91479bf3382848be34401",
"0x84988ded3c7ecfb33e27c531d31197cbd1a29ae625b99036355dd05312031f95",
"0x5b9c5a176702b72ee35d357f19b1557750798da11171409771bd480ebdfbb69a",
"0x349d4a02028b777a17b6726203f4f9b8d9d7c31fdcc543c30aedf1721b4fb5b3",
"0xb9caf80b422a247ffffbc06296b15c845f447d732394132ea622634c553f4cd5",
"0xf2b51d20f55bca0737afc71b882241f8b2b50603857dc6f238dedacadaac096f",
"0x3f5e475c1b228cdfa69b27afab0adabec934800bb4daae46279183c946a83897",
"0xfc8bed7d2672eecbd9ef8a4cd6423d33bb9f03644fa664d0cdaa0cb21b58c2ba",
"0xb65c30a8f06d01b4760362b7740d738478b510342ed03d034c61e021595cbcb0",
"0xb2644cc837a52f70653df8f753a11c0c27ef9030b69b1f1119dd902aa7e92f95",
"0x2a21d99b57a917effe6bd9f267e3f9b63c6b59c8c7258f6398d0407418870e28",
"0xbef3b36f96100366752f4b6fff4d617a74a637a6615c32bf175d964c8625cc6d",
"0xf3f981b27d6ee5fcabda023247d8d3ea0064401c48d38eb8d55034017a58dfa0",
"0x24a545b45859bf1b8ecc52abe32a67e544e890f674fb328513e0b4f57f40b5ac"
],
"transactionsRoot": "0x48bd559990f008af784d2196a834d5ee946872f8ac57799be3fccec745e01c55",
"uncles": []
}
}
Start Building with GetBlock RPCs for Free
Previous
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }
Next
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }