Skip to main content

kaia_getTransactionByBlockHashAndIndex

POST

Returns transaction information by block hash and transaction index.
param[0]
blockHashstringrequired
Block hash is a unique identifier for a block. Block hash is expressed as a 64-digit hexadecimal string.
param[1]
transactionIndexstringrequired
Transaction index represents the position of a specific transaction within a block. It is expressed as a hexadecimal string.
Responses
blockHashstring
Hash of the block containing this transaction. Null for pending transactions
blockNumberstring
Block number containing this transaction (hex). Null for pending transactions
fromstring
Sender address of the transaction
gasstring
Gas limit set for the transaction (hex)
gasPricestring
Gas price (hex, in peb)
hashstring
Transaction hash
inputstring
Transaction input data (hex)
noncestring
Number of transactions sent by the sender prior to this one (hex)
tostring
Recipient address. Null for contract creation transactions
transactionIndexstring
Transaction position index within the block (hex). Null for pending transactions
valuestring
Amount of KAIA transferred (hex, in peb)
typestring
Transaction type (hex string)
typeIntinteger
Transaction type as integer
Array of transaction signatures
Vstring
ECDSA signature v value (hex)
Rstring
ECDSA signature r value (hex)
Sstring
ECDSA signature s value (hex)
chainIdstring
Chain ID of the network this transaction belongs to (hex)
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://kaia-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "kaia_getTransactionByBlockHashAndIndex",
"params": [
"0x59f63e3840e0f4a1659074c1a4021e881a268a52d31958688da1d66bfbf6d2ca",
"0x0"
]
}'