Skip to main content

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.
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 (excluding "0x").
  • block tag: Use "earliest" or "latest" to specify the first block or the most recent block.
Notes:
  • This field cannot be used together with fromDate and toDate.
  • 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 fromBlock and toBlock are 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 (excluding "0x").
  • block tag: Use "earliest" or "latest" to specify the first block or the most recent block.
Notes:
  • This field cannot be used together with fromDate and toDate.
  • 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 fromBlock and toBlock are 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 fromDate and toDate are 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 fromDate and toDate are 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.
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.
idstringrequired
Unique identifier of the transaction; a value that uniquely identifies each transaction.
indexintegerrequired
Indicates the index of the transaction within the block. Starts at 0; represents the order of transactions included in the block.
hashstringrequired
Hash value of the transaction; a unique identifier calculated from the transaction data. Computed including SegWit data.
versionintegerrequired
Value indicating the transaction version; defines the transaction format.
lockTimeintegerrequired
Lock time of the transaction; indicates the condition (block height or UNIX timestamp) under which the transaction becomes valid. A value of 0 means the transaction is immediately valid.
sizeintegerrequired
Actual size of the transaction in bytes; represents the length of the transaction data.
vsizeintegerrequired
Virtual size of the transaction in bytes; represents the effective size of the transaction as included in a block when SegWit data is included. Calculated by dividing weight by 4 and rounding up, per BIP-141.
weightintegerrequired
Weight of the transaction; represents the network cost of the transaction as calculated per BIP-141. Calculated as (non-witness size * 3) + total size.
feeintegerrequired
Transaction fee (in BTC units); the remainder when output value is subtracted from input value.
vinCountintegerrequired
Indicates the number of input (Vin) transactions.
voutCountintegerrequired
Indicates the number of output (Vout) transactions.
blockHeightintegerrequired
Indicates the height of the block containing the transaction.
blockHashstringrequired
Hash of the block containing the transaction.
blockTimestampintegerrequired
Indicates when the block containing the transaction was created; displayed in UNIX timestamp format.
indexintegerrequired
Indicates the index of the Vin (input) within the containing transaction.
addressstringrequired
Address of the previous Vout (output) referenced by the Vin (input); represents the sender address that transferred the Bitcoin.
valuestringrequired
Output value of the previous Vout (output) referenced by the Vin (input); represents the amount of Bitcoin being transferred (in BTC units).
coinbasestringrequired
Used in coinbase transactions (mining reward transactions); contains arbitrary data defined by the miner. Set to null for regular transactions.
voutTransactionIdstringrequired
ID of the previous transaction (Vout) referenced by the Vin (input). This field is null for coinbase transactions.
voutIndexintegerrequired
Index of the previous Vout (output) referenced by the Vin (input). Null for coinbase transactions.
Signature script of the Vin (input); used to unlock the lock script of the referenced previous Vout (output).
hexstringrequired
Signature script of the Vin (input) in hexadecimal format. Provided as an empty string for SegWit transactions.
asmstringrequired
Signature script of the Vin (input) in assembly format. Provided as an empty string for SegWit transactions.
typestringrequired
Indicates the signature script type of the Vin (input) (e.g., p2pkh, p2sh).
sequenceintegerrequired
Sequence number of the Vin (input); controls transaction validity or works with locktime. Also used for RBF (Replace-By-Fee) control.
witnessarrayrequired
Array of script signature data for the Vin (input), included for SegWit transactions.
indexintegerrequired
Indicates the index of the Vout (output) within the containing transaction.
addressstringrequired
Represents the recipient address that will receive the Bitcoin from the Vout (output).
valuestringrequired
Represents the amount of Bitcoin transferred in the Vout (output) (in BTC units).
Script of the Vout (output); defines the conditions (lock script) required to spend the Bitcoin.
hexstringrequired
Script of the Vout (output) in hexadecimal format.
asmstringrequired
Script of the Vout (output) in assembly format.
typestringrequired
Indicates the script type of the Vout (output) (e.g., pubkey, p2sh, p2pkh).
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/bitcoincash/mainnet/blockchain/getTransactionsByAccount' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"accountAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"relation": "both",
"fromDate": "2025-01-01T00:00:00+00:00",
"toDate": "2025-01-31T00:00:00+00:00"
}'