web3data.handlers.address¶
This module contains the address subhandler.
-
class
web3data.handlers.address.
AddressHandler
(initial_headers: Dict[str, str], chain: web3data.chains.Chains)[source]¶ Bases:
web3data.handlers.base.BaseHandler
The subhandler for address-related queries.
-
adoption
(address: str, **kwargs) → Dict[source]¶ Retrieves the historical adoption for the specified address.
- Parameters
address – The address to fetch information for
- Key timeFormat
The time format to use with the timestamps: milliseconds/ms or iso/iso8611 (str)
- Key timeFrame
The time frame to return the historical data in (str): by day (1d, 2d, …, all), by hour (1h, 2h, …, 72h) or by minute (1m, 2m, …, 360m)
- Key timePeriod
The time period (in minutes) to aggregate the historical data (str)
- Returns
The API response parsed into a dict
-
balance_historical
(address: str, **kwargs) → Dict[source]¶ Retrieves the historical (time series) account balances for the specified address.
- Parameters
address – The address to fetch information for
- Key blockNumber
Filter by account balances at block number (int)
- Key startDate
Filter by account balances which happened after this date (int)
- Key endDate
Filter by account balances which happened before this date (int)
- Key value
Filter by account balances where the balance is equal to this value (int)
- Key valueGt
Filter by account balances where the balance is greater than this value (int)
- Key valueGte
Filter by account balances where the balance is greater than or equal to this value (int)
- Key valueLt
Filter by account balances where the balance is less than this value (int)
- Key valueLte
Filter by account balances where the balance is less than or equal to this value (int)
- 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 page
The page number to return. (int)
- Key size
Number of records per page (int)
- Returns
The API response parsed into a dict
-
balance_latest
(address: str, **kwargs) → Dict[source]¶ Retrieves the current account balance for the specified address.
- Parameters
address – The address to fetch information for
- Key includePrice
Indicates whether or not to include price data with the results. Options: true, false. (str)
- Key currency
The currency of the price information. Options: usd, btc. Only used in conjunction with includePrice. (str)
- Returns
The API response parsed into a dict
-
balances
(address: str, **kwargs) → Dict[source]¶ Retrieves the latest account and token balances for the specified address.
- Parameters
address – The address to fetch information for
- 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 timeFormat
The time format to use for the timestamps (milliseconds, ms, iso, iso8611). (str)
- Returns
The API response parsed into a dict
-
balances_batch
(addresses: List[str], **kwargs) → Dict[source]¶ Retrieves the latest account and token balances for the specified addresses.
This is super useful if you want to get an entire portfolio’s summary in a single call. Get totals for ETH & all token amounts with market prices.
- Parameters
addresses – The addresses to fetch information for
- 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 timeFormat
The time format to use for the timestamps (milliseconds, ms, iso, iso8611). (str)
- Returns
The API response parsed into a dict
-
information
(address: str, **kwargs) → Dict[source]¶ Retrieves information about the specified address.
This includes network(s) and blockchain(s) this address exist within.
- Parameters
address – The address to fetch information for
- 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
-
internal_messages
(address: str, **kwargs) → Dict[source]¶ Retrieves internal messages where this address is either the originator or a recipient.
- Parameters
address – The address to fetch information for
- Key blockNumber
Filter by internal messages contained within this block number (int)
- Key from
Filter by internal messages for this “from” address (str)
- Key to
Filter by internal messages for this “to” address (str)
- Key transactionHash
Filter by internal messages for this transaction (str)
- Key startDate
Filter by internal messages which happened after this date (int)
- Key endDate
Filter by internal messages which happened before this date (int)
- Key validationMethod
The validation method to be added to the response: none, basic, full. Default: none. (str)
- Key page
The page number to return. (int)
- Key size
Number of records per page (int)
- Returns
The API response parsed into a dict
-
logs
(address: str, **kwargs) → Dict[source]¶ Retrieves the logs for the transactions where this address is either the originator or a recipient.
- Parameters
address – The address to fetch information for
- Key blockNumber
Filter by logs contained in this block number (int)
- Key startDate
Filter by logs which happened after this date (int)
- Key endDate
Filter by logs which happened before this date (int)
- Key topic
Filter by logs containing this topic (str)
- Key page
The page number to return. (int)
- Key size
Number of records per page (int)
- Returns
The API response parsed into a dict
-
metadata
(address: str, **kwargs) → Dict[source]¶ Retrieves statistics about the specified address: balances, holdings, etc.
- Parameters
address – The address to fetch information for
- Key timeFormat
The time format to use for the timestamps (milliseconds, ms, iso, iso8611). (str)
- Returns
The API response parsed into a dict
-
metrics
() → Dict[source]¶ Get metrics for all addresses that have exist publicly for a given blockchain.
Default metrics are for Ethereum over a 24h period.
- Returns
The API response parsed into a dict
-
pending_transactions
(address: str, **kwargs) → Dict[source]¶ Retrieves pending transactions the specified address is involved in.
- Parameters
address – The address to fetch information for
- Key from
Filter by transactions for this “from” address. (str)
- Key to
Filter by transactions for this “to” address (str)
- Key startDate
Filter by transactions which happened after this date. (int)
- Key endDate
Filter by transactions which happened before this date. (int)
- 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 page
The page number to return. (int)
- Key size
The number of records per page. (int)
- Returns
The API response parsed into a dict
-
token_balances_historical
(address: str, **kwargs) → Dict[source]¶ Retrieves the historical (time series) token balances for the specified address.
- Parameters
address – The address to fetch information for
- Key amount
Filters by token balances which value is equal to this amount (int)
- Key amountGt
Filter by token balances which value is greater than this amount (int)
- Key amountGte
Filter by token balances which value is greater than or equal to this amount (int)
- Key amountLt
Filter by token balances which value is less than this amount (int)
- Key amountLte
Filter by token balances which value is less than or equal to this amount (int)
- Key tokenHolder
Filter by token balances which are held by this address (str)
- Key page
The page number to return. (int)
- Key size
Number of records per page (int)
- Returns
The API response parsed into a dict
-
token_balances_latest
(address: str, **kwargs) → Dict[source]¶ Retrieves the tokens this address is holding.
- Parameters
address – The address to fetch information for
- Key direction
The direction by which to sort the tokens (ascending or descending). (str)
- Key includePrice
Indicates whether or not to include price data with the results. Options: true, false. (str)
- Key currency
The currency of the price information (usd or eth.) - only used in conjunction with includePrice. (str)
- Key sortType
The metric by which to rank the tokens (amount, name, symbol). (str)
- Key page
The page number to return. (str)
- Key size
The number of records per page. (str)
- Returns
The API response parsed into a dict
-
token_transfers
(address: str, **kwargs) → Dict[source]¶ Retrieves all token transfers involving the specified address.
- Parameters
address – The address to fetch information for
- Key amount
Filter by token transfers which value is equal to this amount. (int)
- Key amountGt
Filter by token transfers which value is greater than this amount. (int)
- Key amountGte
Filter by token transfers which value is greater than or equal to this amount. (int)
- Key amountLt
Filter by token transfers which value is less than this amount. (int)
- Key amountLte
Filter by token transfers which value is less than or equal to this amount (int)
- Key blockNumber
Filter by token transfers with this block number. (int)
- Key recipientAddress
Filter by token transfers which recipient is the specified address. (str)
- Key senderAddress
Filter by token transfers which sender is the specified address. (str)
- Key startDate
Filter by token transfers which happened after this date. (int)
- Key endDate
Filter by token transfers which happened before this date. (int)
- Key tokenAddress
Filter by token transfers for this token. (str)
- Key transactionHash
Filter by token transfers for this transaction hash. (str)
- Key page
The page number to return. (int)
- Key size
Number of records per page. (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. Options: usd, btc. Only used in conjunction with includePrice. (str)
- Returns
The API response parsed into a dict
-
total
(**kwargs) → Dict[source]¶ Retrieves every Ethereum address that has been seen on the network.
- Key hash
Filter by a specific address (str)
- Key blockNumber
Filter by addresses first encountered at this block number (int)
- Key blockNumberGt
Filter by addresses first encountered after this block number, not including this blocknumber (int)
- Key blockNumberGte
Filter by addresses first encountered after this block number, including this block number (str)
- Key blockNumberLt
Filter by addresses first encountered before this block number, not including this block number (int)
- Key blockNumberLte
Filter by addresses first encountered before this block number, including this block number (str)
- Key startDate
Filter by addresses first encountered after this date (int)
- Key endDate
Filter by addresses first encountered after before date (int)
- Key type
Filter by addresses of the specified type (EOA or CONTRACT) (str)
- Key transactionHash
Filter by addresses first encountered at this transaction hash (str)
- Key page
The page number to return. (int)
- Key size
Number of records per page. (int)
- Returns
The API response parsed into a dict
-
transactions
(address: str, **kwargs) → Dict[source]¶ Retrieves the transactions where this address was either the originator or a recipient.
- Parameters
address – The address to fetch information for
- Key blockNumber
Filter by transactions for this block number. (int)
- Key from
Filter by transactions for this “from” address. (str)
- Key to
Filter by transactions for this “to” address (str)
- Key startDate
Filter by transactions which happened after this date. (date)
- Key endDate
Filter by transactions which happened before this date. (date)
- Key validationMethod
The validation method to be added to the response: none, basic, full. Default: none. (str)
- Key includeFunctions
Indicates whether or not to include functions (aka internal messages) information for each transaction, if available (false|true). (bool)
- Key includeLogs
Indicates whether or not to include log information for each transaction, if available (false|true). (bool)
- Key includeTokenTransfers
Indicates whether or not to include token transfers information for each transaction, if available (false|true). (bool)
- 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 page
The page number to return. (int)
- Key size
The number of records per page. (int)
- Returns
The API response parsed into a dict
-
usage
(address: str, **kwargs) → Dict[source]¶ Retrieves the historical usage for the specified address.
- Parameters
address – The address to fetch information for
- Key timeFormat
The time format to use with the timestamps: milliseconds/ms or iso/iso8611 (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)
- Key timePeriod
The time period (in minutes) to aggregate the historical data. (str)
- Returns
The API response parsed into a dict
-