2.1. Addresses¶
The Addresses class is available in all explorers.
2.1.1. Usage¶
from bloxplorer import bitcoin_testnet_explorer as explorer
result = explorer.addr.get('mwog86wxZsWf6KGufzwA69xbvzE9TGZ5vA')
print(result.data)
"""
{
'address': 'mwog86wxZsWf6KGufzwA69xbvzE9TGZ5vA',
'chain_stats':
{
'funded_txo_count': 1,
'funded_txo_sum': 4809083,
'spent_txo_count': 0,
'spent_txo_sum': 0,
'tx_count': 1
},
'mempool_stats':
{
'funded_txo_count': 0,
'funded_txo_sum': 0,
'spent_txo_count': 0,
'spent_txo_sum': 0,
'tx_count': 0
}
}
"""
-
class
bloxplorer.addresses.
Addresses
(*args, **kwargs)¶ Wrapper class around the Esplora Addresses endpoint.
Blockstream Esplora Addresses API Docs
-
get
(address, **kwargs)¶ Get information about an address.
- Parameters
address – String representing the address.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_address_prefix
(prefix, **kwargs)¶ Search for addresses beginning with :prefix. Returns an array with up to 10 results.
- Parameters
prefix – String representing the prefix the address begins with.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
static
get_address_type
(address)¶ Get the Bitcoin address type. Not available for Liquid.
- Parameters
address – The alphanumeric Bitcoin address
- Returns
String representing the address type (P2PKH, P2SH, etc.)
-
get_confirmed_scripthash_tx_history
(hash, last_seen_txid=None, **kwargs)¶ Get confirmed transaction history for the specified scripthash, sorted with newest first. Returns 25 transactions per request. More can be requested by specifying the last_seen_txid from get_scripthash_tx_history response.
- Parameters
hash – String representing the scripthash.
last_seen_txid – (Optional) String representing the transaction hash.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_confirmed_tx_history
(address, last_seen_txid=None, **kwargs)¶ Get confirmed transaction history for the specified address, sorted with newest first. Returns 25 transactions per request. More can be requested by specifying the last_seen_txid from get_tx_history response.
- Parameters
address – String representing the address.
last_seen_txid – (Optional) String representing the transaction hash.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_scripthash
(hash, **kwargs)¶ Get information about a scripthash.
- Parameters
hash – String representing the scripthash.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_scripthash_tx_history
(hash, **kwargs)¶ Get transaction history for the specified scripthash, sorted with newest first. Returns up to 50 mempool transactions plus the first 25 confirmed transactions. You can request more confirmed transactions using last_seen_txid inside get_confirmed_scripthash_tx_history method.
- Parameters
hash – String representing the scripthash.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_scripthash_utxo
(hash, **kwargs)¶ Get the list of unspent transaction outputs associated with the scripthash.
- Parameters
hash – String representing the scripthash.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_tx_history
(address, **kwargs)¶ Get transaction history for the specified address, sorted with newest first. Returns up to 50 unconfirmed transactions plus the first 25 confirmed transactions. You can request more confirmed transactions using last_seen_txid inside get_confirmed_tx_history method.
- Parameters
address – String representing the address.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_unconfirmed_scripthash_tx_history
(hash, **kwargs)¶ Get unconfirmed transaction history for the specified scripthash. Returns up to 50 transactions.
- Parameters
hash – String representing the scripthash.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_unconfirmed_tx_history
(address, **kwargs)¶ Get unconfirmed transaction history for the specified address. Returns up to 50 transactions.
- Parameters
address – String representing the address.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-
get_utxo
(address, **kwargs)¶ Get the list of unspent transaction outputs associated with the address.
- Parameters
address – String representing the address.
**kwargs – (Optional) Arguments that Requests takes.
- Returns
- class
Response object.
-