eth_getTransactionByBlockHashAndIndex

Retrieves a specific transaction from a block using the block's hash and the transaction's index position

Request
Examples
curl https://rpc.xone.org \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getTransactionByBlockHashAndIndex","params":["0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b","0x0"],"id":1,"jsonrpc":"2.0"}'
Response
200 OK
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0xbf06c77f6ed9a65441795eb8c2ccd694b3fc9b4d1be6066bf7ed52c73c5ec97c",
    "blockNumber": "0xfb6d2d",
    "from": "0x2b94cb7ce403ccc9ca89aea9aa8cddb409e6fb6a",
    "gas": "0x5208",
    "gasPrice": "0x2757a4abf6",
    "maxFeePerGas": "0x314492d449",
    "maxPriorityFeePerGas": "0x59682f00",
    "hash": "0x32b8edb39cd1f9d1299253ceb734539745f9bba284c7c7a2391ac62223192c68",
    "input": "0x",
    "nonce": "0xa2",
    "to": "0x514368a3dfb523dd8e0e049d9b22e20eec96eaf7",
    "transactionIndex": "0x64",
    "value": "0x16423069e486f18",
    "type": "0x2",
    "accessList": [],
    "chainId": "0x1",
    "v": "0x0",
    "r": "0x98695bf77dc2aed3308c913e9a5ac273d1de992f61da7eb7352174b30d9ce2e6",
    "s": "0x186b72d1ee15e3e76a7ed301062a2da3d93b1727135f063d845dca258445fab1",
    "yParity": "0x0"
  }
}

Request params

NameTypeDescription
idintegerRequest identifier
jsonrpcstringJSON-RPC version
methodstringAPI method name
Parametersarray of strings 
blockHashstringThe hash of the block containing the transaction.
indexstringThe index position of the transaction within the block, specified as an integer or hexadecimal string.

Response

200
Detailed transaction object if found, or null if no transaction is found at the given index.
NameTypeDescription
Parametersobject 
idinteger
jsonrpcstring
resultobject