one

ONE

POST

GET

eth_accounts
eth_blockNumber
eth_call
eth_chainId
eth_estimateGas
eth_gasPrice
eth_getBalance
eth_getBlockByHash
eth_getBlockByNumber
eth_getBlockReceipts
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByNumber
eth_getCode
eth_getFilterChanges
eth_getLogs
eth_getProof
eth_getStorageAt
eth_getTransactionByBlockHashAndIndex
eth_getTransactionByBlockNumberAndIndex
eth_getTransactionByHash
eth_getTransactionCount
eth_getTransactionReceipt
eth_newBlockFilter
eth_newFilter
eth_newPendingTransactionFilter
eth_syncing
eth_uninstallFilter
hmy_accounts
hmy_blockNumber
hmy_call
hmy_chainId
hmy_estimateGas
hmy_gasPrice
hmy_getBalance
hmy_getBlockByHash
hmy_getBlockByNumber
hmy_getBlockReceipts
hmy_getBlockTransactionCountByHash
hmy_getBlockTransactionCountByNumber
hmy_getCode
hmy_getFilterChanges
hmy_getLogs
hmy_getProof
hmy_getStorageAt
hmy_getTransactionByBlockHashAndIndex
hmy_getTransactionByBlockNumberAndIndex
hmy_getTransactionByHash
hmy_getTransactionCount
hmy_getTransactionReceipt
hmy_newBlockFilter
hmy_newFilter
hmy_newPendingTransactionFilter
hmy_syncing
hmy_uninstallFilter
hmyv2_accounts
hmyv2_blockNumber
hmyv2_call
hmyv2_chainId
hmyv2_estimateGas
hmyv2_gasPrice
hmyv2_getBalance
hmyv2_getBlockByHash
hmyv2_getBlockByNumber
hmyv2_getBlockReceipts
hmyv2_getBlockTransactionCountByHash
hmyv2_getBlockTransactionCountByNumber
hmyv2_getCode
hmyv2_getProof
hmyv2_getStorageAt
hmyv2_getTransactionByBlockHashAndIndex
hmyv2_getTransactionByBlockNumberAndIndex
hmyv2_getTransactionByHash
hmyv2_getTransactionCount
hmyv2_getTransactionReceipt
hmyv2_syncing
net_peerCount
net_version
web3_clientVersion
chevron-right

Last updated on January 1, 1970

2 min read

Method hmyv2_getTransactionByBlockHashAndIndex undefined ()
connect with JSON-RPC protocol

hmyv2_getTransactionByBlockHashAndIndex

info-circle-fill

Returns transaction information for the specified block hash andtransaction index position.

Parameters

DATA - hex string

32-byte hash of a block.

QUANTITY - hex string

Integer representing the transaction index position.

Request

curl --location --request POST 'https://one.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "hmyv2_getTransactionByBlockHashAndIndex",
"params": ["0x910c18611575d42685a4d122a71c9d359a68c3f9786e1ca5a18c27819f8504ff", "0x0"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "blockHash": "0x910c18611575d42685a4d122a71c9d359a68c3f9786e1ca5a18c27819f8504ff",
        "blockNumber": 42379341,
        "ethHash": "0x48a4124c61f3e81f8a3fe7b885a6705e8096343ece3bac530dc88a864c9c0439",
        "from": "one1qku72aj98fskvge07h9j0gtfu9sdw62ucgff67",
        "gas": 720000,
        "gasPrice": 110000000000,
        "hash": "0xef7ec4991840bd66569fa070ea9ab39b38a2233bbc5b3cfd272fa456e893b135",
        "input": "0x5f4f928600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000001129c6909c8950000000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007000000000000000000000000cf664087a5bb0237a0bad6742852ec6c8d69a27a000000000000000000000000632a7f749f98812bf07fa00a8aa53e390046467e0000000000000000000000003f56e0c36d275367b8c502090edf38289b3dea0d000000000000000000000000c1726df372dec10ffe72a3afbae3b670b88d5abe000000000000000000000000eeeeeb57642040be42185f49c52f7e9b38f8eeee0000000000000000000000000e00af5734e64340d4d145b39da16a8c8aa20547000000000000000000000000cf664087a5bb0237a0bad6742852ec6c8d69a27a000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000026f200000000000000000000000000000000000000000000000000000000000026f200000000000000000000000000000000000000000000000000000000000026f200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000437edd8885b00810000000000000000000000000000000000000000000000001f801de71f869e010000000000000000000000000000000000000000000000011311a65d062b8000",
        "nonce": 34759,
        "r": "0x3587ffb5986a067068b00c51d8018976a08dbc5032f370dee3adc75f213b4874",
        "s": "0x3ccf87d7296f37afeed53d071c1ce328a2fcc22d032e0f5ee8837ca0a112ca50",
        "shardID": 0,
        "timestamp": 1685326309,
        "to": "one15f9mx8rzd5anlfs887rx86dvp2upl50eslufrq",
        "toShardID": 0,
        "transactionIndex": 0,
        "v": "0xc6ac98a3",
        "value": 0
    }
}
banner icon

Start Building with GetBlock RPCs for Free