🟪 Polygon
eth_getRawTransactionByBlockNumberAndIndex

Polygon API Documentation


eth_getRawTransactionByBlockNumberAndIndex RPC Method

The eth_getRawTransactionByBlockNumberAndIndex returns an a raw transaction, given a block number on Polygon and transaction index.

🔌 To use eth_getRawTransactionByBlockNumberAndIndex you must be connected to a blockchain node.

Parameters

  • block number - The number of the block, hex encoded.
  • 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 blockchain developers in Chainnodes Telegram Chat (opens in a new tab)

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

Body

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

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