web3data.handlers.transaction

This module contains the address subhandler.

class web3data.handlers.transaction.TransactionHandler(initial_headers: Dict[str, str], chain: web3data.chains.Chains)[source]

Bases: web3data.handlers.base.BaseHandler

The subhandler for transaction-related queries.

find(**kwargs) → Dict[source]

Retrieves all transactions matching the specified filters.

Key status

Filter by the status of the transactions to retrieve (all, completed, failed, pending). (str)

Key startDate

Filter by transactions executed after this date. Note that the interval can not exceed 1 minute (startDate and endDate should be both specified, or both empty) (int)

Key endDate

Filter by transactions executed before this date. Note that the interval can not exceed 1 minute (startDate and endDate should be both specified, or both empty). (int)

Key validationMethod

The validation method to be added to the response: none, basic, full. Default: none. (str)

Key includePrice

Indicates whether or not to include price data with the results. Options: true, false. (bool)

Key currency

The currency of the price information (usd or btc.) - only used in conjunction with includePrice. (str)

Key size

The number of results to return. (int)

Key includeFunctions

Indicates whether or not to include log information for each transaction, if available (false|true) (bool)

Key includeLogs

Indicates whether or not to include price information (false|true) (bool)

Key includeTokenTransfers

Indicates whether or not to include token transfers information for each transaction, if available (false|true) (bool)

Returns

The API response parsed into a dict

gas_percentiles(**kwargs) → Dict[source]

Retrieves the latest gas price percentiles for the transactions.

Key numBlocks

Number of past blocks on which to base the percentiles. (int)

Returns

The API response parsed into a dict

gas_predictions() → Dict[source]

Retrieves the latest gas predictions for the transactions.

Returns

The API response parsed into a dict

information(tx_hash: str, **kwargs) → Dict[source]

Retrieves the transaction information for the specified hash.

Parameters

tx_hash – The transaction hash to fetch information for

Key validationMethod

The validation method to be added to the response: none, basic, full. Default: none. (str)

Key includePrice

Indicates whether or not to include price data with the results. Options: true, false. (bool)

Key currency

The currency of the price information (usd or btc.) - only used in conjunction with includePrice. (str)

Returns

The API response parsed into a dict

metrics() → Dict[source]

Get metrics for recent confirmed transactions for a given blockchain.

Returns

The API response parsed into a dict

token_transfers(tx_hash: str) → Dict[source]

Retrieves the token transfers that took place in the specified transaction.

Parameters

tx_hash – The transaction hash to fetch information for

Returns

The API response parsed into a dict

volume(**kwargs) → Dict[source]

Retrieves the historical (time series) volume of transactions.

Parameters

kwargs – Additional query parameter options

Key timeFormat

The time format to use for the timestamps: milliseconds/ms or iso/iso861. (str)

Key timeFrame

The time frame to return the historical data in: by day (1d, 2d, …, all), by hour (1h, 2h, …, 72h) or by minute (1m, 2m, …, 360m) (str)

Returns

The API response parsed into a dict