kaia_getTransactionByBlockNumberAndIndex
POST
Returns transaction information in a block by block number and transaction index.
param[0]
blockNumberOrTagstringrequired
Use one of block number or block tag to specify the block.- Block number: Hexadecimal string (e.g. "0x1")
- Block tag: Enum string (e.g. "latest", "earliest", "pending")
earliest: The oldest available block on the chain.finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.safe: A recent block considered safe by the network (immune to reorgs).latest: The most recent block on the chain (may be subject to reorgs).pending: The next block to be mined, including pending transactions in the mempool.
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 transactionsblockNumberstring
Block number containing this transaction (hex). Null for pending transactionsfromstring
Sender address of the transactiongasstring
Gas limit set for the transaction (hex)gasPricestring
Gas price (hex, in peb)hashstring
Transaction hashinputstring
Transaction input data (hex)noncestring
Number of transactions sent by the sender prior to this one (hex)tostring
Recipient address. Null for contract creation transactionstransactionIndexstring
Transaction position index within the block (hex). Null for pending transactionsvaluestring
Amount of KAIA transferred (hex, in peb)typestring
Transaction type (hex string)typeIntinteger
Transaction type as integerArray 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_getTransactionByBlockNumberAndIndex","params": ["0x1076B5A","0x0"]}'