post https://api.infstones.com/okc/mainnet/
Returns information about a transaction by block hash and transaction index position.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK HASH | ✅ | String | A hex code of an integer that represents the hash of a block. |
TRANSACTION INDEX POSITION | ✅ | String | A hex code of an integer that represents the position of a transaction in the block. |
"params": [
"0xAC39BE33905675520B82AE390DD912BCF9D0A6974879C4CDFABB93ACC710607F",
"0x1"
]
Result
A transaction object, or null
if no transaction was found.
Result Fields
Key | Type | Detail |
---|---|---|
blockHash | String | Hash of the block where this transaction was in. null if the transaction is pending. |
blockNumber | String | A hex code of an integer that represents the block number where this transaction was in. null if the transaction is pending. |
from | String | Address the transaction is sent from. |
gas | String | A hex code of an integer that represents the gas provided by the sender. |
gasPrice | String | A hex code of an integer that represents the gas price provided by the sender in Wei. |
hash | String | Hash of the transaction, 32 Bytes. |
input | String | The data send along with the transaction. |
nonce | String | A hex code of an integer that represents the number of transactions made by the sender prior to this one. |
r | String | ECDSA signature r. |
s | String | ECDSA signature s. |
to | String | Address the transaction is directed to. null if it's a contract creation transaction. |
transactionIndex | String | A hex code of an integer that represents the transactions index position in the block. null if the transaction is pending. |
v | String | ECDSA recovery id. |
value | String | Value transferred in Wei. |
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xAC39BE33905675520B82AE390DD912BCF9D0A6974879C4CDFABB93ACC710607F","0x1"],"id":1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xac39be33905675520b82ae390dd912bcf9d0a6974879c4cdfabb93acc710607f",
"blockNumber": "0xb994dd",
"from": "0x1de4f1ae2efb80716a73fbb2457b1efba5ae2759",
"gas": "0x3bc8f",
"gasPrice": "0x53724e00",
"hash": "0x859dd0c5319b71af9ec6e16c32ecf494bad9aa4c9349bace6f27d081f50e9e24",
"input": "0x42842e0e0000000000000000000000001de4f1ae2efb80716a73fbb2457b1efba5ae27590000000000000000000000007d884341b838693f1c8fd3ab30c44f942ae9c91e0000000000000000000000000000000000000000000000000000000000003ad9",
"nonce": "0x952",
"to": "0xf8b973fdf2e6f700a775aa94ff72180688b5a044",
"transactionIndex": "0x1",
"value": "0x0",
"v": "0xa7",
"r": "0x8315de16729919d6b23f00197c7d5c364a28ad4186b8cadb1d860cd25a9f0ac9",
"s": "0x33ca330085972d119e1d95180ce0c7719f0613f5502e826c397fdfe9554fc248"
}
}