Up to 50% Off on Your First Month

Subscribe by April 30th with a credit card and save big!

Sale bannerSale banner
one

Harmony

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 hmy_getTransactionByBlockHashAndIndex Harmony (ONE)
connect with JSON-RPC protocol

hmy_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": "hmy_getTransactionByBlockHashAndIndex",
"params": ["0x910c18611575d42685a4d122a71c9d359a68c3f9786e1ca5a18c27819f8504ff", "0x0"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "blockHash": "0x910c18611575d42685a4d122a71c9d359a68c3f9786e1ca5a18c27819f8504ff",
        "blockNumber": "0x286a84d",
        "ethHash": "0x48a4124c61f3e81f8a3fe7b885a6705e8096343ece3bac530dc88a864c9c0439",
        "from": "one1qku72aj98fskvge07h9j0gtfu9sdw62ucgff67",
        "gas": "0xafc80",
        "gasPrice": "0x199c82cc00",
        "hash": "0xef7ec4991840bd66569fa070ea9ab39b38a2233bbc5b3cfd272fa456e893b135",
        "input": "0x5f4f928600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000001129c6909c8950000000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007000000000000000000000000cf664087a5bb0237a0bad6742852ec6c8d69a27a000000000000000000000000632a7f749f98812bf07fa00a8aa53e390046467e0000000000000000000000003f56e0c36d275367b8c502090edf38289b3dea0d000000000000000000000000c1726df372dec10ffe72a3afbae3b670b88d5abe000000000000000000000000eeeeeb57642040be42185f49c52f7e9b38f8eeee0000000000000000000000000e00af5734e64340d4d145b39da16a8c8aa20547000000000000000000000000cf664087a5bb0237a0bad6742852ec6c8d69a27a000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000026f200000000000000000000000000000000000000000000000000000000000026f200000000000000000000000000000000000000000000000000000000000026f200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000437edd8885b00810000000000000000000000000000000000000000000000001f801de71f869e010000000000000000000000000000000000000000000000011311a65d062b8000",
        "nonce": "0x87c7",
        "r": "0x3587ffb5986a067068b00c51d8018976a08dbc5032f370dee3adc75f213b4874",
        "s": "0x3ccf87d7296f37afeed53d071c1ce328a2fcc22d032e0f5ee8837ca0a112ca50",
        "shardID": 0,
        "timestamp": "0x647409e5",
        "to": "one15f9mx8rzd5anlfs887rx86dvp2upl50eslufrq",
        "toShardID": 0,
        "transactionIndex": "0x0",
        "v": "0xc6ac98a3",
        "value": "0x0"
    }
}