🟪 Polygon
eth_getRawTransactionByBlockHashAndIndex

Polygon API Documentation


eth_getRawTransactionByBlockHashAndIndex RPC Method

The eth_getRawTransactionByBlockHashAndIndex the raw transaction data of a transaction at a specific index in a specific block, given the block's hash.

Parameters

  • block hash - The hash of the block.

  • transaction index - The index of the transaction in the block, hex encoded.

Returns

The raw transaction, hex encoded.

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_getRawTransactionByBlockHashAndIndex","params":["0x5cdeba3eea0c5a709e762db2a083f809635c6b791eb686a5fb3ede00078ad97d","0x1"],"id":1}'

Body

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x02f902fc018205d88405f5e100850e12c5d1dc8303362294ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b88016345785d8a0000b902843593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000642f1f1f00000000000000000000000000000000000000000000000000000000000000020b080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000006b3263a489ce406e1c400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b6c3d7b0d449895160233c28ff7ba0deaaa3a31c080a0311332b5519c29d218c43bb82bc867e245ac058827008bc88766540c3391d303a0613a6167c5081d5a9dab75698e59a98a249733191bf90bf6388a056e98a40b9e"
}

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