Skip to main content

Get Transaction By Hash

POST

Retrieves information about a specific transaction.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.
networkstringrequired
Parameter specifying the network of the target chain.
Request Body
transactionHashstringrequired
Parameter specifying the transaction hash to query. Can be entered as a 64-character hexadecimal string starting with 0x.
withLogsboolean
Parameter specifying whether to include the logs field in the response. Response speed may be slower when set to true.
withDecodeboolean
Parameter specifying whether to include decodedInput and decodedLog fields in the response. Response speed may be slower when set to true.decodedLog is part of logs, so it is not included when withLogs is false even if withDecode is true.decodedInput interprets the transaction input field and provides the result. However, different functions may use the same function selector, so the result may not match the actually called function. Additional verification is recommended for non-standard ERC functions.
Responses
transactionHashstringrequired
A field representing the hash of the transaction. Provided as a 64-character hexadecimal string prefixed with 0x.
transactionIndexintegerrequired
A field representing the index of the transaction. Indicates the order within the block. Provided in decimal string format.
blockHashstringrequired
A field representing the hash of the block. Provided as a 64-character hexadecimal string prefixed with 0x.
blockNumberintegerrequired
A field representing the block number.
fromstringrequired
A field representing the address that initiated the transaction. Provided as a 40-character hexadecimal string prefixed with 0x.
tostringrequired
A field representing the recipient address of the transaction. For contract creation transactions, this field returns null. Provided as a 40-character hexadecimal string prefixed with 0x.
valuestringrequired
A field representing the amount of tokens transferred in the transaction. Provided in decimal string format.
inputstringrequired
A field representing the data of the transaction. For Native Token (ETH, MATIC, etc.) transfers, this field is empty. Provided as a hexadecimal string prefixed with 0x.
A field representing the decoded result of the transaction input. Included in the response only when the withDecode parameter is set to true, providing function data executed based on the decoded input. This field is not provided even when withDecode is true if the function cannot be identified.
typestring
A field representing the function type of the transaction.
namestring
A field representing the function name of the transaction.
signaturestring
A field representing the function signature of the transaction.
namestring
A field representing the name of the argument.
typestring
A field representing the type of the argument.
valuestring
A field representing the value of the argument.
functionSelectorstringrequired
A 4-byte function selector value that identifies the called function. The function selector is the first 4 bytes of the Keccak-256 hash of the function signature. Provided as an 8-character hexadecimal string prefixed with 0x.
noncestringrequired
A field representing the nonce value of the transaction. Used for transaction deduplication and ordering. Provided in decimal string format.
gasstringrequired
A field representing the maximum amount of gas the user intends to allocate for transaction execution. Provided in decimal string format.
gasPricestringrequired
A field representing the amount the user is willing to pay per unit of gas. Used in the transaction model before EIP-1559 (London Hard fork) with fixed fees; users can manually set the price based on network congestion. Provided in decimal string format.
maxFeePerGasstring
A field representing the maximum fee the user is willing to pay per unit of gas. Must be greater than or equal to the sum of baseFeePerGas and maxPriorityFeePerGas. Part of the variable fee model introduced in EIP-1559 (London Hard fork). This field is not provided for transactions before this introduction. Provided in decimal string format.
maxPriorityFeePerGasstring
The maximum fee per unit of gas that the user wants to pay directly to the block builder. Higher values cause the block builder to prioritize the transaction. Part of the variable fee model introduced in EIP-1559 (London Hard fork). This field is not provided for transactions before this introduction. Provided in decimal string format.
gasUsedstringrequired
A field representing the amount of gas actually used in transaction execution. Provided in decimal string format.
cumulativeGasUsedstringrequired
A field representing the total gas used by all transactions in the block up to and including the current transaction. Provided in decimal string format.
effectiveGasPricestringrequired
A field representing the average price actually paid per unit of gas by the transaction. For transactions before EIP-1559 (London Hard fork), this field returns the same value as gasPrice. Provided in decimal string format.
contractAddressstringrequired
A field representing the created contract address when the transaction is a contract creation transaction. Provided as a 40-character hexadecimal string prefixed with 0x.
typestring
A field representing the type of the transaction. This field may not be provided depending on the block context. Provided in decimal string format.0: Represents a standard Ethereum transaction. This is the traditional transaction format before EIP-2718.1: Represents the 'Access List' transaction introduced in EIP-2930. This type includes an access list for specific addresses and storage slots to optimize gas costs.2: Represents the 'Fee Market' transaction introduced in EIP-1559. This type uses a variable gas cost model and includes maxFeePerGas and maxPriorityFeePerGas fields.3: Represents the 'Blob Transaction' introduced in EIP-4844. This type includes additional blob data separate from the body, improving data availability and supporting scalability in conjunction with Layer2 solutions such as Rollups.4: An extended transaction type introduced in EIP-7702, containing an authorizationList field with signature/authorization information. Used when multi-signature or additional authentication procedures are required.
statusstring
A field representing the status of the transaction. 1 indicates success; 0 indicates failure. This field is not provided for transactions before the Byzantium Hard Fork. Provided in decimal string format.
logsBloomstringrequired
A field representing all logs bloom of the transaction. Provided as a 512-character hexadecimal string prefixed with 0x.
A field representing the access list of the transaction.
addressstringrequired
A field representing the contract address accessed in the transaction. Provided as a 40-character hexadecimal string prefixed with 0x.
storageKeysarrayrequired
A field representing the list of storage keys of the contract accessed in the transaction.
timestampintegerrequired
A field representing when the transaction was created. This field is provided as a UNIX timestamp.
This field is a list containing the transaction's signature and authorization information. Each item includes chain ID, nonce, signature values, etc. required for signature verification. Provided after EIP-7702. Support and adoption may vary by network, and this field may not be present depending on the transaction type (e.g., type 4 or higher).
chainIdstring
A field representing the ID of the chain for which the authorization is valid. Used for signature verification and replay attack prevention. Expressed in decimal string format.
noncestring
A nonce value to ensure the uniqueness of this authorization item and prevent replay attacks. Expressed in decimal string format.
addressstring
The address of the account that provided the authorization (signature).
yParitystring
A 1-bit parity value used to select the y-coordinate of the signed public key. Typically 0 or 1, used for public key recovery. Expressed in decimal string format.
rstring
The first value of the ECDSA signature, generated through the nonce used for signing and curve operations. Used for public key recovery and signature verification.
sstring
The second value of the ECDSA signature, calculated based on the message hash and private key. Essential for verifying signature validity.
A field representing the list of logs included in the transaction. Provided only when the withLogs parameter is true.
contractAddressstringrequired
A field representing the contract address that generated the log. Provided as a 40-character hexadecimal string prefixed with 0x.
transactionHashstringrequired
A field representing the hash of the transaction that generated the log. Provided as a 64-character hexadecimal string prefixed with 0x.
transactionIndexintegerrequired
A field representing the index of the transaction that generated the log. Indicates the order within the block. Provided in decimal string format.
blockHashstringrequired
A field representing the hash of the block that generated the log. Provided as a 64-character hexadecimal string prefixed with 0x.
blockNumberintegerrequired
A field representing the block number that generated the log.
datastringrequired
A field representing the data of the log. Provided as a hexadecimal string prefixed with 0x. This field represents the event data of the log.
logIndexintegerrequired
A field representing the index of the log. Indicates the order of events in the transaction. Provided in decimal string format.
removedbooleanrequired
A field indicating whether the log was removed. Returns true if the log was removed due to chain reorganization (Reorg).
topicsarrayrequired
A field representing the indexed arguments of the log. Can have up to 4 topics.
A field representing the event data of the log. Included in the response only when the withDecode parameter is set to true.
namestringrequired
A field representing the event name of the log.
eventFragmentstringrequired
A field representing the event fragment of the log.
signaturestringrequired
A field representing the event signature of the log.
eventHashstringrequired
A field representing the event hash of the log.
A field representing the arguments of the log.
namestring
A field representing the name of the argument.
typestring
A field representing the type of the argument.
valuestring
A field representing the value of the argument.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter: { PARAMETER_NAME }"
}
cURL
curl -X POST 'https://web3.nodit.io/v1/avalanche/mainnet/blockchain/getTransactionByHash' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"transactionHash": "0x45d5ca108b4bf1e11e2ca6e92c6ee34911cd458726400ebb9810a4e2a51eaa98",
"withLogs": false,
"withDecode": false
}'