Get Transactions By Account
POST
Retrieves the list of transactions sent or received by a specific account.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.networkstringrequired
Parameter specifying the network of the target chain.Request Body
accountAddressstringrequired
Parameter specifying the account address to query. Can be entered as a 40-character hexadecimal string starting with 0x.relationstring
Parameter for filtering transactions where the queried account address is the sender or recipient.- from: Filter by sender only.
- to: Filter by recipient only.
- both (default): Returns all transactions where the queried address appears in from or to.
fromBlockstring
Parameter specifying the starting block for the query. You can enter one of the following formats:- block number: Enter block number as a decimal string.
- block hash: 64-character hexadecimal (including "0x").
- block tag: Use "earliest" or "latest" to specify the first block or the most recent block.
- This field cannot be used together with
fromDateandtoDate. - If provided without fromBlock, results are queried from genesis block to this block.
- toBlock value cannot be less than fromBlock value.
- If fromBlock and toBlock have the same value, only that block is queried.
- "earliest" for toBlock is only allowed when fromBlock is "earliest".
- If
fromBlockandtoBlockare not provided, the API queries data from the latest 30 days.
toBlockstring
Parameter specifying the ending block for the query. You can enter one of the following formats:- block number: Enter block number as a decimal string.
- block hash: 64-character hexadecimal (including "0x").
- block tag: Use "earliest" or "latest" to specify the first block or the most recent block.
- This field cannot be used together with
fromDateandtoDate. - If provided without fromBlock, results are queried from genesis block to this block.
- toBlock value cannot be less than fromBlock value.
- If fromBlock and toBlock have the same value, only that block is queried.
- "earliest" for toBlock is only allowed when fromBlock is "earliest".
- If
fromBlockandtoBlockare not provided, the API queries data from the latest 30 days.
fromDatestring
Parameter specifying the start date for the query. Date must follow ISO 8601 format (YYYY-MM-DDThh:mm:ss{time zone}) including seconds.Notes:- If provided without toDate, results are queried from this date to the latest block.
- fromDate value must be equal to or earlier than toDate value.
- If fromDate and toDate have the same value, only blocks from that date are queried.
- This field cannot be used together with fromBlock and toBlock.
- If
fromDateandtoDateare not provided, the API queries data from the latest 30 days.
toDatestring
Parameter specifying the end date for the query. Date must follow ISO 8601 format (YYYY-MM-DDThh:mm:ss{time zone}) including seconds.Notes:- If provided without fromDate, results are queried from genesis block to this date.
- toDate value must be equal to or later than fromDate value.
- If fromDate and toDate have the same value, only blocks from that date are queried.
- This field cannot be used together with fromBlock and toBlock.
- If
fromDateandtoDateare not provided, the API queries data from the latest 30 days.
pageinteger
The page parameter specifies the data page to query. It accepts values up to 100; for pages exceeding 100, use the cursor pagination method.The page and cursor parameters cannot be used together. If both page and cursor are empty, cursor pagination is used.rppinteger
rpp stands for results per page and specifies the page size. You can specify a number greater than 0 and up to 100.cursorstring
The cursor parameter supports pagination and data navigation between pages. Provide the cursor value from the previous page in the next request to load the next page of data.The page and cursor parameters cannot be used together. If both page and cursor are empty, cursor pagination is used.withCountboolean
Parameter specifying whether to include the count field in the response. The count field indicates the total number of requested data items. When set to true, the count field is included and response speed may be slower.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
pageinteger
Field representing the page number specified in the page parameter. This field is only included in the response when a value greater than 0 is specified for the page parameter.rppinteger
Field representing the number of results per page specified in the rpp parameter.cursorstring
A field for cursor pagination. This value must be provided in the next request to load the next page of data.countinteger
Field representing the total count of requested data. This field is only included in the response when true is set for the withCount parameter.Field representing the actual range applied to the query. The same kind of values used in the request's range parameters are returned. A Date-based request returns fromDate and toDate, a Block-based request returns fromBlock and toBlock, and a Ledger-based request returns fromLedger and toLedger; different kinds are never mixed in a single response. When all range parameters are omitted, a default window of the last 30 days is applied and fromDate, toDate are returned. Block and Ledger values are always returned as heights (numbers), even if a hash or tag (latest, earliest) was provided in the request.
fromDatestring
Field representing the start of the query range in Date mode. Returned in ISO 8601 format.toDatestring
Field representing the end of the query range in Date mode. Returned in ISO 8601 format.fromBlockinteger
Field representing the start block height of the query range in Block mode.toBlockinteger
Field representing the end block height of the query range in Block mode.fromLedgerinteger
Field representing the start ledger index of the query range in Ledger mode.toLedgerinteger
Field representing the end ledger index of the query range in Ledger mode.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/getTransactionsByAccount' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"accountAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","relation": "both","fromDate": "2025-01-01T00:00:00+00:00","toDate": "2025-01-31T00:00:00+00:00"}'