# Mempool API

> Returns Bitcoin fee rates, chain tip, address totals, transactions, recent blocks and mempool status.

Category: Finance & Crypto. Region: global. 17 endpoints at `https://api.hoshime.com/v1/mempool/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/mempool
## GET /v1/mempool/fees

Recommended Bitcoin fee rates in sat/vB for the next blocks.

Scope: `social:read` · Units: 1 · Cached: 1 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `economyFee` (integer (int64)), `fastestFee` (integer (int64)), `halfHourFee` (integer (int64)), `hourFee` (integer (int64)), `minimumFee` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/fees" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/blockTip

The height and hash of the best block.

Scope: `social:read` · Units: 1

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `hash` (string), `height` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/blockTip" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/address

Funding and spending totals of a Bitcoin address, confirmed and in the mempool.

Scope: `social:read` · Units: 1 · Cached: 1 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `address` | string | yes | Bitcoin address or mempool.space address URL. (e.g. 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `address` (string), `chainStats` (Stats), `chainStats.fundedTxoCount` (integer (int64)), `chainStats.fundedTxoSum` (integer (int64)), `chainStats.spentTxoCount` (integer (int64)), `chainStats.spentTxoSum` (integer (int64)), `chainStats.txCount` (integer (int64)), `mempoolStats` (Stats), `mempoolStats.fundedTxoCount` (integer (int64)), `mempoolStats.fundedTxoSum` (integer (int64)), `mempoolStats.spentTxoCount` (integer (int64)), `mempoolStats.spentTxoSum` (integer (int64)), `mempoolStats.txCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/address?address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/tx

A Bitcoin transaction: confirmation status, fee and outputs.

Scope: `social:read` · Units: 1 · Cached: 1 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `txid` | string | yes | Transaction id or mempool.space transaction URL. (e.g. 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `blockHash` (string), `blockHeight` (integer (int64)), `blockTime` (string), `coinbase` (boolean), `confirmed` (boolean), `fee` (integer (int64)), `outputs` (Output[]), `outputs[].address` (string), `outputs[].value` (integer (int64)), `size` (integer (int64)), `txid` (string), `version` (integer (int64)), `weight` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/tx?txid=4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/blocks

The last 15 blocks, newest first, from the chain tip or from a start height.

Scope: `social:read` · Units: 1 · Cached: 2 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `height` | integer | no | Start height. Returns that block and the 14 below it. Omit for the chain tip. (e.g. 840000) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `difficulty` (number (double)), `feeRange` (number (double)[]), `height` (integer (int64)), `id` (string), `medianFee` (number (double)), `minedAt` (string), `pool` (string), `reward` (integer (int64)), `size` (integer (int64)), `totalFees` (integer (int64)), `txCount` (integer (int64)), `weight` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/blocks?height=840000" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/mempool

Pending transactions in the mempool and the fee-rate histogram behind them.

Scope: `social:read` · Units: 1 · Cached: 1 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `count` (integer (int64)), `feeHistogram` (FeeBucket[]), `feeHistogram[].feeRate` (number (double)), `feeHistogram[].vsize` (number (double)), `totalFee` (integer (int64)), `vsize` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/mempool" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/difficultyAdjustment

Progress to the next difficulty retarget and the change it is projected to bring.

Scope: `social:read` · Units: 1 · Cached: 2 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `difficultyChange` (number (double)), `estimatedRetargetTime` (string), `expectedBlocks` (number (double)), `nextRetargetHeight` (integer (int64)), `previousRetarget` (number (double)), `progressPercent` (number (double)), `remainingBlocks` (integer (int64)), `remainingSeconds` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/difficultyAdjustment" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/feeProjection

The blocks mempool.space expects to mine next from the current mempool, by fee band.

Scope: `social:read` · Units: 1 · Cached: 1 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `blockSize` (integer (int64)), `blockVirtualSize` (number (double)), `feeRange` (number (double)[]), `medianFee` (number (double)), `totalFees` (integer (int64)), `txCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/feeProjection" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/blockDetail

One Bitcoin block by its hash: height, time, size, difficulty and transaction count.

Scope: `social:read` · Units: 1 · Cached: 10 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `hash` | string | yes | Block hash, 64 hex characters. (e.g. 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `difficulty` (number (double)), `height` (integer (int64)), `id` (string), `medianAt` (string), `merkleRoot` (string), `minedAt` (string), `nonce` (integer (int64)), `previousBlock` (string), `size` (integer (int64)), `txCount` (integer (int64)), `version` (integer (int64)), `weight` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/blockDetail?hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/recentMempoolTxs

The most recent transactions that entered the mempool, newest first, with fee and size.

Scope: `social:read` · Units: 1 · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `fee` (integer (int64)), `txid` (string), `value` (integer (int64)), `vsize` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/recentMempoolTxs" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/hashrate

Network hashrate and difficulty history over a time window, with the current values.

Scope: `social:read` · Units: 1 · Cached: 30 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `timespan` | string | no | Window: 24h, 3d, 1w, 1m, 3m, 6m, 1y, 2y or 3y. (one of 24h, 3d, 1w, 1m, 3m, 6m, 1y, 2y, 3y; default 3d; e.g. 1w) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `currentDifficulty` (number (double)), `currentHashrate` (number (double)), `items` (HashratePoint[]), `items[].hashrate` (number (double)), `items[].time` (string)

```bash
curl "https://api.hoshime.com/v1/mempool/hashrate?timespan=1w" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/miningPools

Bitcoin mining pools ranked by blocks found in a time window.

Scope: `social:read` · Units: 1 · Cached: 30 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `timespan` | string | no | Window: 24h, 3d, 1w, 1m, 3m, 6m, 1y, 2y or 3y. (one of 24h, 3d, 1w, 1m, 3m, 6m, 1y, 2y, 3y; default 1w; e.g. 1w) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `blockCount` (integer (int64)), `items` (MiningPool[]), `items[].blockCount` (integer (int64)), `items[].emptyBlocks` (integer (int64)), `items[].id` (string), `items[].link` (string), `items[].name` (string), `items[].rank` (integer (int64)), `items[].slug` (string)

```bash
curl "https://api.hoshime.com/v1/mempool/miningPools?timespan=1w" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/historicalPrice

The price of one bitcoin in USD, EUR, GBP and other currencies at a Unix time.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `timestamp` | integer | yes | Unix time in seconds. (e.g. 1704067200) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `prices` (map), `time` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/historicalPrice?timestamp=1704067200" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/txOutspends

For each output of a transaction, whether it is spent and by which transaction.

Scope: `social:read` · Units: 1 · Cached: 1 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `txid` | string | yes | Transaction id or mempool.space transaction URL. (e.g. 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `confirmed` (boolean), `index` (integer (int64)), `spent` (boolean), `spentBy` (string), `spentInput` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/txOutspends?txid=4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/addressTxs

The transactions of a Bitcoin address, newest first: unconfirmed ones, then confirmed ones 25 per page. Page with cursor.

Scope: `social:read` · Units: 1 · Cached: 1 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `address` | string | yes | Bitcoin address or mempool.space address URL. (e.g. 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `blockHash` (string), `blockHeight` (integer (int64)), `blockTime` (string), `coinbase` (boolean), `confirmed` (boolean), `fee` (integer (int64)), `outputs` (Output[]), `outputs[].address` (string), `outputs[].value` (integer (int64)), `size` (integer (int64)), `txid` (string), `version` (integer (int64)), `weight` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/addressTxs?address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/addressUtxos

The unspent outputs (UTXOs) of a Bitcoin address, confirmed and unconfirmed, with their amounts.

Scope: `social:read` · Units: 1 · Cached: 1 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `address` | string | yes | Bitcoin address or mempool.space address URL. (e.g. bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `blockHeight` (integer (int64)), `confirmed` (boolean), `txid` (string), `value` (integer (int64)), `vout` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/addressUtxos?address=bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mempool/blockTxs

The transactions of one Bitcoin block by its hash, in block order, 25 per page. Page with cursor.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `hash` | string | yes | Block hash, 64 hex digits, as the blocks and blockDetail endpoints give it. (e.g. 00000000000000000000d327e01b1988f4572a34e630d9844b5031dc94af143c) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `blockHash` (string), `blockHeight` (integer (int64)), `blockTime` (string), `coinbase` (boolean), `confirmed` (boolean), `fee` (integer (int64)), `outputs` (Output[]), `outputs[].address` (string), `outputs[].value` (integer (int64)), `size` (integer (int64)), `txid` (string), `version` (integer (int64)), `weight` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/mempool/blockTxs?hash=00000000000000000000d327e01b1988f4572a34e630d9844b5031dc94af143c" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
