2.4. Mempool#

The Mempool class is available in all explorers.

2.4.1. Sync Usage#

from bloxplorer import bitcoin_explorer as explorer

result = explorer.mempool.get()
print(result.data)

2.4.2. Async Usage#

from bloxplorer import async_bitcoin_explorer as async_explorer

result = await async_explorer.mempool.get()
print(result.data)

2.4.3. Result#

Both usages will output the same result data. Example output:

"""
{
    'count': 8,
    'vsize': 2023,
    'total_fee': 7069,
    'fee_histogram': [
        [
            1.0,
            2023
        ]
    ]
}
"""

2.4.4. Available methods#

class bloxplorer.mempool.SyncMempool(*args, **kwargs)#

Wrapper class around the Esplora Mempool endpoint.

Blockstream Esplora Mempool API Docs

get(**kwargs)#

Get mempool backlog statistics.

Parameters:

**kwargs – (Optional) Arguments that Requests takes.

Returns:

class:

Response object.

get_latest_txs(**kwargs)#

Get a list of the last 10 transactions to enter the mempool.

Parameters:

**kwargs – (Optional) Arguments that Requests takes.

Returns:

class:

Response object.

get_txids(**kwargs)#

Get the full list of txids in the mempool as an array. The order of the txids is arbitrary and does not match bitcoind’s.

Parameters:

**kwargs – (Optional) Arguments that Requests takes.

Returns:

class:

Response object.