Search

[INDEXER] Search for Transactions

/search/transactions allows the caller to search for transactions that meet certain conditions. Some conditions include matching a transaction hash, containing an operation with a certain status, or containing an operation that affects a certain account.

/search/transactions is considered an "indexer" endpoint and Rosetta implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta "indexer" MUST support this endpoint.

post/search/transactions

Request body

network_identifierNetworkIdentifier required— unresolved $ref
operatorOperator — unresolved $ref
max_blockinteger

max_block is the largest block index to consider when searching for transactions. If this field is not populated, the current block is considered the max_block.

If you do not specify a max_block, it is possible a newly synced block will interfere with paginated transaction queries (as the offset could become invalid with newly added rows).

offsetinteger

offset is the offset into the query result to start returning transactions.

If any search conditions are changed, the query offset will change and you must restart your search iteration.

limitinteger

limit is the maximum number of transactions to return in one call. The implementation may return <= limit transactions.

transaction_identifierTransactionIdentifier — unresolved $ref
account_identifierAccountIdentifier — unresolved $ref
coin_identifierCoinIdentifier — unresolved $ref
currencyCurrency — unresolved $ref
statusstring

status is the network-specific operation type.

typestring

type is the network-specific operation type.

addressstring

address is AccountIdentifier.Address. This is used to get all transactions related to an AccountIdentifier.Address, regardless of SubAccountIdentifier.

successboolean

success is a synthetic condition populated by parsing network-specific operation statuses (using the mapping provided in /network/options).

Response

Expected response to a valid request

transactionsBlockTransaction[] required— unresolved $ref

transactions is an array of BlockTransactions sorted by most recent BlockIdentifier (meaning that transactions in recent blocks appear first).

If there are many transactions for a particular search, transactions may not contain all matching transactions. It is up to the caller to paginate these transactions using the max_block field.

total_countinteger required

total_count is the number of results for a given search. Callers typically use this value to concurrently fetch results by offset or to display a virtual page number associated with results.

next_offsetinteger

next_offset is the next offset to use when paginating through transaction results. If this field is not populated, there are no more transactions to query.

Changes