---
title: "Mempool"
description: "mempool.space for Bitcoin. litecoinspace.org for Litecoin. peppool.space for Pepecoin. Fees in sat/vB. Unspent outputs. OP_RETURN decoded. No key."
canonical_url: "https://explorers.agntn.dev/providers/mempool"
---
# Mempool

> mempool.space for Bitcoin. litecoinspace.org for Litecoin. peppool.space for Pepecoin. Fees in sat/vB. Unspent outputs. OP_RETURN decoded. No key.

<provider-facts provider="mempool">



</provider-facts>

## Address it

```ts
import { Mempool } from "@agntn/explorers/providers/mempool";

const mempool = new Mempool();
const history = await mempool.getTxHistory("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "bitcoin");
history[0]?.opReturn; // [{ hex, text? }] when the transaction carries one
const utxos = await mempool.getUtxos("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "bitcoin");
const reveal = await mempool.getPubkey("1XPTgDRhN8RFnzniWCddobD9iKZatrvH4", "bitcoin");
```

Default chain Bitcoin. Litecoin goes to litecoinspace.org and Pepecoin to peppool.space, the same Esplora API on three hosts.

## What it reads

`/api/address/:address` for the balance with funded and spent totals and the mempool delta, `/api/address/:address/txs` for history, `/api/address/:address/utxo` for the unspent outputs, `/api/tx/:hash` for one transaction, `/api/v1/fees/recommended` for fees, and `/api/blocks/:height` for a block, which answers a page of blocks the provider searches for the exact height.

`getPubkey` needs nothing new. It reads the balance route and the history again. `getOutspends` asks `/api/tx/:hash` and `/api/tx/:hash/outspends` together, one for addresses and values, one for the spends. `getTxHex` reads `/api/tx/:hash/hex` on all three hosts.

## Gotchas

- Gas and blocks work on Bitcoin and Litecoin only. Peppool has no fee endpoint and doesn't return complete block metadata, so on Pepecoin those two throw `UnsupportedOperationError` even though the provider advertises them elsewhere. Capabilities are per provider, not per chain, and this is the one place it shows.
- History sorting and block bounds walk a feed that only runs newest first. A block range leaves out unconfirmed mempool rows. A request that needs rows beyond the newest 1000 transactions throws `UnsupportedOperationError`.
- `getOutspends()` throws `UnsupportedOperationError` on Pepecoin before any request. peppool.space has no outspends route.
- Peppool paginates confirmed history with `?after_txid=`, not Esplora's `/txs/chain/:txid` route, and the provider knows which host it's talking to.
- Peppool allows 15 requests a minute. Go over and the 429 asks you to come back in about a minute. So `getPubkey` reads 250 rows on Pepecoin, not 1000. An older key comes back as `null` with `spent: true`. Better than a wait of a few minutes, right?
- `balance` is the confirmed amount. What's sitting in the mempool goes to `unconfirmed` as a signed delta, so a balance never moves backwards on you when a transaction drops out.
- `/utxo` has a ceiling. mempool.space answers 400 past 500 unspent outputs, and the library passes that on as an `HTTPError`, so the genesis address is exactly the one you can't list. Blockstream draws the same line.
- OP_RETURN pushes are decoded from every output. `hex` is always there; `text` only when the bytes are printable UTF-8, so Runes and Omni carriers never become mojibake.
- `getTxDetail` reads Ordinals inscriptions from the input witnesses. A body past 4096 bytes comes back as its size alone. [Transactions](https://explorers.agntn.dev/guide/transactions#inscriptions) says why.
- A block keeps its header: version, merkle root, bits, nonce, difficulty, median time, size and weight. No gas fields, because Bitcoin has no gas. [Gas and blocks](https://explorers.agntn.dev/guide/gas-and-blocks#blocks) shows block 0.
- Fee units are `sat/vB` on Bitcoin and `litoshi/vB` on Litecoin, and the unit is in the answer.

## Where it lives

`src/providers/mempool.ts`, with the shared Esplora mapping in `src/core/esplora.ts`.


## Sitemap

See the full [sitemap](https://explorers.agntn.dev/sitemap.md) for all pages.
