🟪 Polygon
eth_getBlockByNumber

Polygon API Documentation


eth_getBlockByNumber RPC Method

eth_getBlockByNumber returns the data about the given block on the Polygon chain

Parameters

1. blockNumber or Tag [required] - String

Hexadecimal block number or "latest", "earliest", "pending", "safe" or "finalized"

"Safe" and "finalized" are only availible on Ethereum and Arbitrum One chains. Read block parameter description (opens in a new tab).

2. Transaction details flag [required] - Boolean

     If set to true, it returns the detail of each transaction.

     If set to false, only the hashes of the transactions.

     Default: false

params: [
    '0x1029C88', 
    true
    ]

Returns

  • Block object or null when no block was found.

    Properties:

    • number - The block number. Null when the returned block is the pending block.

    • hash 32 Bytes - Hash of the block. In case of a pending block, it returns null.

    • parentHash 32 Bytes - Hash of the parent block.

    • nonce 8 Bytes - Hash of the generated proof-of-work. Null if pending.

    • difficulty - The integer of the difficulty for this block encoded as a hexadecimal string.

    • totalDifficulty - Hexadecimal of the total difficulty of the chain until this block.

    • logsBloom - The bloom filter for the logs of the block. null if pending.

    • sha3uncles - SHA3 of the uncles data in the block.

    • extraData - The “extra data” field of this block.

    • timestamp - The Unix timestamp for when the block was collated.

    • size - The unix timestamp for when the block was collated.

    • miner 20 Bytes - The address of the miner receiving the reward.

    • transactionsRoot - The root of the transaction trie of the block.

    • stateRoot - The root of the final state trie of the block.

    • receiptsRoot 32 Bytes - The root of the receipts trie of the block.

    • uncles - An Array of uncle hashes.

    • transactions - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.

    • gasUsed - The total used gas by all transactions in this block as a hexadecimal string.

    • gasLimit - The maximum gas allowed in this block encoded as a hexadecimal.

    • mixHash - A string of a 256-bit hash encoded as a hexadecimal.

    • baseFeePerGas [optional] - A string of the base fee encoded in hexadecimal format.

Request

POST https://<network>.chainnodes.org/YOUR-API-KEY

Example

💡 Confusing?

Ask our experienced blockchain developers in Telegram

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your CHAINNODES.ORG Dashboard
  • You can use a different supported network by replacing polygon-mainnet
curl https://polygon-mainnet.chainnodes.org/YOUR-API-KEY\
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["0x1029C88",false],"id":1}'

Body

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "baseFeePerGas":"0x6f664d776",
    "difficulty":"0x0",
    "extraData":"0x6265617665726275696c642e6f7267",
    "gasLimit":"0x1c9c380","gasUsed":"0xdf19ac","hash":"0xc529628a946ecf86acfaff0251aeae15ca2563c5aaf7b4872609b84f6f396c99",
    "logsBloom":"0x483116210982ad1b58020558a22beae30816924ced064d1701610970e7161937960493173253235b41003ba9607ef1bc0a99bfb69bc03c5c3a45c91905b8243014c88c05bd2a08383aa2c94a937b5221805020850a69286318c275d49a89a6bf1b524b9c4e060a31be0a08000c0169597a12203528586d391356aa3a8ca9a01cc70b4b763326c12d22e2710a928008b669004489d736149e40670cf8c1fa9921bbe985468f407bdc2402eff25880b50204559a6460800903837383ea1239618e0bcea6c2b028ee2402a2a6b64e09b512583142621a6d8414d60c3d965ac8ba1351383608ce922e224ed472828000d6f1c6bbb61b000800640081598a80285403",
    "miner":"0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5","mixHash":"0x33ca51f80eee8c8a39ab58b9b04291f1064df288a346921b567f3d6200a1c8df",
    "nonce":"0x0000000000000000","number":"0x1029c88",
    "parentHash":"0x38c03b0813aa479e8c0f1316828ed3729f1e100387a5372e1ecd4eee00d3c7e8",
    "receiptsRoot":"0xf29158cb7989375414c130a7e335808026fdc9f8b9b6670f9d67e29154e103d3",
    "sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size":"0x28abc",
    "stateRoot":"0x30fcd7b38a90d1482006c66b9d630ece06a6d7405572e97ca4e1b0f2202744d7",
    "timestamp":"0x642709eb",
    "totalDifficulty":"0xc70d815d562d3cfa955",
    "transactions":["0xb19f38ce6f75b23a0d4b25f1ebb876dffb5041ece000628366a66420f5d80c36","0xdb933288ef260be1ca5782d3efec0a66dbc64a7fa0fd617ee573cbf5bd4ac47e","0xaf164cfba07ddc58cb4428fb91df05678d76483ea31ff19dde81c4313cdb2363","0x51e4a8526c0fd9b29ea3a5ef3e18a0c82a8ae1a6b4047d83b1b42e5688307055","0xde7f4f4307856b1618574eca694fa9d402ec0200b36f6cb7c883c0c8d5bcb202","0x285419f3cc21a2b23e7e2769e1e70f38d494c54a8e9c687becf6da6d59a39884","0x02b3f8273c8636481a3f6afa7642aaacc30160d9b527cf321d25b2ddc0781983","0x1dbfb9eec961333b9abb214362ee468f6999c3287d4075ccaebef19ab1f5d8b3","0xa05747160dd30e6d023c68a50d1a27f17ec265ca67c8ea31e730ae8f5ba95bda","0x2a4538d625c3230c4aff1057b0656599a599bfbfad039bb7c190fab3d1e523ff","0xe43fb021a540b167a5b945cd8910c039b326e04abf9d594f4151e8b6f2ca8878","0x3a76230bd02d51d0302b075544c9053b08a7d7dc5d347172ab53d14c78f304fb","0x838cfd2e2a35f14c861d150c5cd2c23c00a3980255e15349593e1b2e80e78697","0xd4d1f52d88ac0b0ee3d67d77ad053b647f93d0d6902e41c9eab697f9abc4d0b8","0x7708f214ba7414ca026e8018042ea22fbc821edb46facede9d6bbf65c846ea29","0xf5221565fd2652520ecb39482cb8b2bbbb487b84d7bd527638471367ae17c127","0xa477ef9788e0c544747261d3f7f0071ee8e8846da510bde4ff072b5bc77a5b4d","0x54694f2fa853c1bda09a9298afa8c6da7c70fb66fa979eeafd06a0db66db2b54","0x60730a2434ebfee5607cf050f1b6e5d1c2563e59b45d10996e3e3518f203b1c7","0xbdd5ae9dcbdf5d35f44d7b307abc6750de494fc1df23fe32c3f828a47cdd6b31","0xf9f2ed038931b2a8215c4eb1d5112e478e81e77db36c244b7462ad1eae8114ed","0x8a15dd799da7770a50f22b9c4768a777e49760d9cb88544bed47dda17bf606ee","0x4df8e712bd9e57cb03473c98f7bbb8a18e161724685e2e07f4365eec0686d38f","0x2ad0497e127e5b4fd996aed4e06320f4058d681622ab88dce055bd469e9e9078","0x78e23e267aebcab8532a3cda8c7c4e8ded2652d0f80cb5887bcb6703fc376aa5","0x8d5be4eedcbd3cf9becb2221bc303c6d0cb9608e53ae5c103c9d4a4c138a0a71","0x4e867569278e4ced2e628c3392b9f368b4cc892e9f55f2ffa3106ed9357dea09","0xbe72fb792de36b03b9d047995c2de877f59cf880e43669cbce22d0b98584a1f7","0x75f87f8acc5f561d8a554e1dc9c1d4b2cec4c71887d5ac57cff1fbc70f2eb984","0x44a50a7978b115f0961940f9207882e2518a5dacac410cfde1f084bab5ec2304","0x5337a5ae05de79d7cb90db463d8e2938c0aad347b2fcd752a77531078a9c872a","0x388c7aeaa58fe7e4802a7e59272e397d826776cb527104330f75be455e6895e6","0x8dc747ebfafe403df09ba6187a50bd74309a3af9d2df3599f09075bf6a3b7e40","0x1a52d8e7925360afaef323432a330b082319c27956454f83fed5959db6249600","0xf9e410aee12f1378de3ea7a3a11c24dc9936a51bedf95b69977d85983f04d631","0xf7a88f434946a176dc9d2a5a75579cd2a3434b5c0828c2d8083c6281b1469064","0x63bdca3ea3299b8a8709f4c6a5c86f825fae5891359305e114ba321fec32b17b","0x79c9c2c34532f77921283e0002aa44bd597c1bbfad4212410d93b1eafea6c729","0x6ac5af187500e0ddf564a82e9d64ab4c3a1ce9313955ee7d7b612ce57ed03fee","0xa1318cb166a80e21fe158ba6306cb3adb582be54ea6569d62aa761ae5921d9ff","0xf5b467e339ad2eb8b38630eec8a4b295df1c82ae384529cb8e3a2bc1dd4e30dd","0x4cdb4754165c3233a63878cd89be9f32a789c29f43543b332f4728f569683806","0x13efe4451d902366b3ff13747b5e891f77fb02f1d7e32bcb263774ce20c61c73","0x90a93f913f1c112144293938eb3989d60edcff0c01f299fee7eec3cba2b0c9b7","0x73da4a124b394eb414ec182550bfa3107714684defaf50874ebbb81add982157","0x8666b27559d10ec76a01108810945fa82c9d9662c2b87ed293c4d17174edb405","0x681e84716a0a852e5f3942d81200f335fa6bd15ab32f942471f1b66064deb370","0xea1928836d0193d304f39b554e6b9d3b471e76ee8cec4a7386e4031eb52d794c","0x02f1da6db1858e2012ab686062418ebdef99a295ec83ca754288c630e10694bf","0x1c3faf8024f2e9924aff8b39a12d7d0de859a981beecfabe2785596ab26e7b51","0x2c0e4e57dab40e0ae698b325743a72269c42b5b6412577f56c36da26debb31a9","0x16d4f2c22b458687f8b68645d3ae8217ccfb3c3b319119466b45ab2091ff96e2","0x4be8c2e7d86514af7ea8ee47967b842215edba0e77680929ed9ea5a564d4edad","0xc12e215f8254d8b62065cca2539bb1c7282e88f430c23f3128c3452b0fd3497f","0xfb5d47663917b609a6fb680ddb447a0c55e7a39e606a20013092064948c2b096","0x69e5ed3d8ef342fac630026e9992f27c32bfa6ff3a4efea0ffc7a4fe4f686c7d","0x47ad1c7741145a9e9c8f73aa5fe19fd6c07a5e8a897c0839a0be89e7465ba1fa","0xe8578131cde3cfa791a9b4ee47ff003ee7c191e18c203f14b0e70f4fa80f9dfc","0xe1228628a207941c1ab18c2e7fd32c2516bdab49ab66a1849dd5b850ef52d6dd","0xa6b337b32e055b8c3a27c7643af38b007227217a7a74d9971899c28cf69c34b4","0x4717ae38aa0b7c42ac7990c23323244268076b5b9faf4f86c3a414d8c63ebeda","0xacd8f958688a12620208d0ae8f39f0e70745904b33a8f634f5554b744a60bb3e","0x5c956d3a946db745f238546e63621f665681a230c6d01ab5be4204d9a6c31200","0x4ed27317a4c4333062b965aaf37e7315cde890aaba6554d69626eff05feb8309","0x2ce7f5ca7aae3dd05794bac105f49f6e3f4a355226a3bf05a7b7b61b937f50b7","0xcd3ae71a17d3f7fa547ecf535876598772e86ad5f9c36e9d32d91618dc5e01ad","0xf75364a8c9108c2adaa5b3d55133e4c17a9d435903f4a9cec2c609a6a9576f7c","0x88efe3c47f2b43acb32d108f1ca2e5dd84e943f67d37e4f53b539204a5d5fb07","0x05bb5ea8f6303e68673972dee1e901a9a942940873caa1a02448daebd73fc89d","0x8ae05d7afd4fbf1f4b69f04cc819af0eb53e9a6fd5193a0bb23ac4bef56ceb63","0x034b24ad60256039d8fe215c74665cf34faea82a7f34e6baf03334712f319918","0x257fda879481a990df8a83f775a8608b6b524757b72962c5967bb00f1fe89347","0xeb8f1774515136b5ad4db710141539d321e43f3bcb46ecab48c3aa453f07cc93","0x688ae1cc115346e34bb6244d5d0840da987170c0c2abe084b8c31832d71f90b1","0xb0374e204f455c11f30e263c6c944cef8e292401d9e93de33a2b1d9eea75093c","0xe9070e058ec62284b000ea1fbbc2c037eeeb74cb959aa155bf807698692e14dd","0x098568414818820802766ac50446ed6ad4744b9dcb6e10e5ff3d87fbab2ea788","0xef0c265aa423b74135b0335d2703b0bcd630f567e1f1d234e0af02202ec2b36b","0xe88b837d9e0bb9a692927b2bfe51742892aa897430567dc13f0b898c957d794d","0xbd00577b8ecc2b285f2d1af06154d3a0397e4288e93294b979d52cab9e020e6f","0x8b2e3c291304efa4a20e06a0807eb5302d2c04da0078b7ecd6314ad31e3dde67","0xdcc6692dd7ac2059aa9a3c9560b7cad7feebcebea0a575d83e54c6ad93179391","0xef2d01f8c8d1d13ba83ee03e7ff402eb4d544c88bf0a03b7abd6c536c0335c96","0x968fdc5c428408e35dbdf85cc731a8c19bfc7d9a8cb9d9646a0334c1db59efb6","0xcdb589358fbf44d9b747f74405870f90cd1e71f8672e553eaf5a6b94774b44ac","0xca9223146e939630a59d21b4118d50ae1563f2f4007d05f7493823b1af98af34","0xa2a1317b69beabc458e172987bfb91b2f41ad40e03c08ab643318954a76d8f58","0xd77345baa8bfc7778c825d604569b7c2df9501096e77b9a5a20429523cd6a3bc","0x1357747f44cfab49bcbca3fe7ebef18fe25e0debaed526a1421ca8db846460a3","0x51879c692a3dd8380f7fd48943b32fb1012616b999109b92894bf7a61ed67acc","0xfd0ced1f6a2fd27c6d5b115845f4aa94aad8e1c814deecdb7554597267e4d279","0x16d56cf9ee3ee5cd39090919386c116d453e779a7fe2ff43a96e4687baf7c2a1","0x9416568108876d48b8e6716956db5bd9dabd7314d21588e7a31cd89637d163a6","0x9420f2f78e517ddbb2f35dc0130843786d51b10bc00631fc89b23d6523c6df4b","0xb56cde9fa98aa9b0c50a89e396461f0b0e501c6c4dbdb63582c4da688e94f431","0x15a8cece6b0a496c324e2fd4af9746793ec768a54a2d24cfbe1765100 11294  100 11153  100   141   124k   1613 --:--:-- --:--:-- --:--:--  129k55c686f0483bb882c3aba285ba9","0x7b1173febbceb77734bb386974ed70d71533e65c29a91f2acc29330ab18acab4","0xecaaa60223795c18c665b222e305eae54680ccdd25cfb84699913f5e84dc5979","0xf410e0995896cf4a8490dbbd3db4ab87f714215244cd40bee7a1135b0a824c66","0x25d2c61bacf84461196d98e7f8ad780a065e77e1bb7a5bd74098d299e2909791","0xdc51a60a8cfe8874f1bf8085ad15571e6b2e088e86965b7d92788fce4aae23a3","0x8ff28d816e6840c01f0d246f6e84ee4fbe787dcf4d905f279d69d703bf2e499a","0x302ebfbcd16c6c3ddc2d8e150c09da97c02e8e0d241dd77f495e8a5719685dbf","0x859109c973aeb0826bfacb52385d9e3157cba580449f7c72ae78383af32f6518","0x16d0f57b38fd8847e573c670e324db1ff2e7b8e979676e9fdf52d1e16ad03045","0x2495b0000b21f05096d239efcc1ebfdce78ed242001bbbd117d29bd94fa3d763","0x07a4976c3d78694d0eb4acbcc1e489c2516672c32925809fc440464ec09147c4","0xdc7cad873ec141ea5e4c6932784557771660d59a414204d6ca2d437705aa96b5","0x9618557f66a112d0e6508c18a81b98be1a229e7b4a67fb309d997025d394b1b4","0x0957cc35494bd886f1b7a8ba36371a0ac73bfca00547ffd8af5d83c909fd811c","0xe0d38ab08dd5fc088ac712425a5202a818021ba1bd935722631279eea3764d97","0x956b905c7aab8b0c795bc3eeff0d2cfd0728ce34330f68fed5b65e5e098b7b8d","0xc9a51e9503432a55cdac738edbe7f2317f73574976ab86abeafcbd190b7064d3","0x7754e4367b7af0b9002e189f09020121b10cb1ed3b6ec664a5cfe26c5d635b8f","0x1b542d7377edb2f33505d401d4a9f59192d70d6d42eb58c43aa2a5fffb241d48","0x73a859ebc8e35d3799b4639c0d7a59164266060e53b33ca2ce92a73bfb0ffb68","0x07565847ae0fa298629d5a8c135439d92e34a0a2c629d7336c8ac0aadf40c115","0x93e9d3d0634660d981889494af9cb82085148976af59e9ceecfb9a1e2852c91a","0xf8632df0f4e726b444555521621870e62d3b593b669380144eab1133db372a19","0x6a96f4da30b8422b9b832046d18c1e5a1cf66e0207f933bfcf18d4c7756f0b58","0x16a42cba7bbc96a0c2a88ecfbd8c18266316dacf5451ba09620d2304fc45960a","0x47732c64c734c765c00c21cfb775a859172a89719d5a6015f73bd96b7210d2eb","0xa9b3495bcbb7af427dad8e93ac546a648ad1281d9588edd658569ba47755c077","0xb9953e2c218ba50a2419c44ce1687a327a167fff0c4830681334df927d3df7d0","0xdc086363c18acfb6e3f077ad76b033ed9e6fcb6b2a0ee2c99a5fda8139d17fbc","0x4b0078e13d6f1166c6c6ccf2aac924efe16e091de1043903449fa11829362c1a","0x5883d8a58afa97396ff1a8e79c3892d8e3ba822ba112ae655edcce9969003d2e","0xbb3d134b0f887884b94e8ce8eed6f48830e5eda180eac693b926918ce18815b6","0xf929b5027feaa754fa0c2e81a3d7fd349b91acd583d4428692c4645864f8fda0","0x644fdfde040aa98c2414ad7ac2bd2ec61e269b9cd383b1194d1b5c2412abdfe8","0x487ee30830ffaf37355578eb68a07c5a981e457b81e69486a08ec1d633ada0ce","0xd04d3d4d14f09e2ca7ec498297656c2052b019e224645a1928c309e83761488a","0xe283994a22efcabc01580f65f94b6c8af564d073fb43f3ec468c8347626203fc","0x29e3b769fda69c5d6533d45c8da4183ac2ee56eeccc61d6eea49041073387bb8","0x957d1c13ec6dd6acd800a95a96c3d875268782979847c5ffc8caed3a0a5f125b","0x5206ebc63d07883a5960161e526da62237c265f7e192ca7ee30fd4674a2493cb","0x36574a3770772b8a365753a3c5d6c96f8419099c3058c5ed26195e888984b2d7"],
    "transactionsRoot":"0x6f7b725bc43c2a3ad666751059041d722a17b9d69cf9f23e3a73af3a54c01eb7",
    "uncles":[]}}
 
}

Need RPC API keys?

Get 12.5M archival requests for free today.

JSON-RPC Polygon API Documentation by CHAINNODES is based on Erigon node client. Contact us if you are interested in specific methods that are only available on geth, besu, Nethermind or reth