mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-08-13 02:33:05 -07:00
2074 lines
70 KiB
Plaintext
2074 lines
70 KiB
Plaintext
# Bitcoin Research Kit (BRK) — Full API Reference
|
||
|
||
> Generated from BRK's OpenAPI specification and metric tree. Do not edit this file manually.
|
||
|
||
- Version: `v0.3.6`
|
||
- Base URL: https://bitview.space
|
||
- MCP endpoint: https://mcp.bitview.space/
|
||
- Metrics: 57886
|
||
- Operations: 97
|
||
|
||
For machine-readable tool construction, use [https://bitview.space/openapi.json](https://bitview.space/openapi.json). For the complete source-derived series tree, use [https://bitview.space/api/series](https://bitview.space/api/series).
|
||
|
||
## Operations
|
||
|
||
### Address
|
||
|
||
#### GET `/api/address/hash-prefix/{addr_type}/{prefix}`
|
||
|
||
Address hash-prefix matches
|
||
|
||
Find addresses by address type and by the first 1-16 hex nibbles of RapidHash v3 over the raw address payload bytes. Intended for privacy-preserving client-side wallet discovery without sending raw addresses or xpubs. Fetch metadata with `GET /api/address/{address}`.
|
||
|
||
Parameters:
|
||
- `addr_type` (path, OutputType, required)
|
||
- `prefix` (path, string, required): First 1–16 hexadecimal nibbles of the RapidHash v3 hash over the raw address payload bytes.
|
||
|
||
Returns: JSON `AddrHashPrefixMatches`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/address/hash-prefix/<addr_type>/<prefix>"
|
||
```
|
||
|
||
#### GET `/api/address/{address}`
|
||
|
||
Address information
|
||
|
||
Retrieve address information including current balance and transaction counts. Supports all standard Bitcoin address types (P2PKH, P2SH, P2WPKH, P2WSH, P2TR). *[Mempool.space docs](https://mempool.space/docs/api/rest#get-address)*
|
||
|
||
Parameters:
|
||
- `address` (path, Addr, required)
|
||
|
||
Returns: JSON `AddrStats`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/address/<address>"
|
||
```
|
||
|
||
#### GET `/api/address/{address}/txs`
|
||
|
||
Address transactions
|
||
|
||
Get transaction history for an address, newest first. Returns up to 50 mempool transactions plus a confirmed page sized to fill the response to 50 total (chain floor of 25, so 25-50 confirmed depending on mempool weight). To paginate further confirmed history, request `GET /api/address/{address}/txs/chain/{after_txid}` with the last returned txid. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-address-transactions)*
|
||
|
||
Parameters:
|
||
- `address` (path, Addr, required)
|
||
|
||
Returns: JSON `Transaction[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/address/<address>/txs"
|
||
```
|
||
|
||
#### GET `/api/address/{address}/txs/chain`
|
||
|
||
Address confirmed transactions
|
||
|
||
Get the first 25 confirmed transactions for an address. For pagination, request `GET /api/address/{address}/txs/chain/{after_txid}` with the last returned txid. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-address-transactions-chain)*
|
||
|
||
Parameters:
|
||
- `address` (path, Addr, required)
|
||
|
||
Returns: JSON `Transaction[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/address/<address>/txs/chain"
|
||
```
|
||
|
||
#### GET `/api/address/{address}/txs/chain/{after_txid}`
|
||
|
||
Address confirmed transactions (paginated)
|
||
|
||
Get the next 25 confirmed transactions strictly older than `after_txid` (Esplora-canonical pagination form, matches mempool.space). *[Mempool.space docs](https://mempool.space/docs/api/rest#get-address-transactions-chain)*
|
||
|
||
Parameters:
|
||
- `address` (path, Addr, required)
|
||
- `after_txid` (path, Txid, required): Last txid from the previous page (return transactions strictly older than this)
|
||
|
||
Returns: JSON `Transaction[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/address/<address>/txs/chain/<after_txid>"
|
||
```
|
||
|
||
#### GET `/api/address/{address}/txs/mempool`
|
||
|
||
Address mempool transactions
|
||
|
||
Get unconfirmed transactions for an address from the mempool, newest first (up to 50). *[Mempool.space docs](https://mempool.space/docs/api/rest#get-address-transactions-mempool)*
|
||
|
||
Parameters:
|
||
- `address` (path, Addr, required)
|
||
|
||
Returns: JSON `Transaction[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/address/<address>/txs/mempool"
|
||
```
|
||
|
||
#### GET `/api/address/{address}/utxo`
|
||
|
||
Address UTXOs
|
||
|
||
Get unspent transaction outputs (UTXOs) for an address. Returns txid, vout, value, and confirmation status for each UTXO. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-address-utxo)*
|
||
|
||
Parameters:
|
||
- `address` (path, Addr, required)
|
||
|
||
Returns: JSON `Utxo[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/address/<address>/utxo"
|
||
```
|
||
|
||
### Api.json
|
||
|
||
#### GET `/api.json`
|
||
|
||
Compact OpenAPI specification
|
||
|
||
Compact OpenAPI specification optimized for LLM consumption. Removes redundant fields while preserving essential API information. The full specification is available at `GET /openapi.json`.
|
||
|
||
Returns: JSON `*`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api.json"
|
||
```
|
||
|
||
### Block
|
||
|
||
#### GET `/api/block/{hash}`
|
||
|
||
Block information
|
||
|
||
Retrieve block information by block hash. Returns block metadata including height, timestamp, difficulty, size, weight, and transaction count. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required)
|
||
|
||
Returns: JSON `BlockInfo`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block/<hash>"
|
||
```
|
||
|
||
#### GET `/api/block/{hash}/header`
|
||
|
||
Block header
|
||
|
||
Returns the hex-encoded 80-byte block header. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-header)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required)
|
||
|
||
Returns: text `Hex`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block/<hash>/header"
|
||
```
|
||
|
||
#### GET `/api/block/{hash}/raw`
|
||
|
||
Raw block
|
||
|
||
Returns the raw block data in binary format. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-raw)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required)
|
||
|
||
Returns: binary data
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block/<hash>/raw"
|
||
```
|
||
|
||
#### GET `/api/block/{hash}/status`
|
||
|
||
Block status
|
||
|
||
Retrieve the status of a block. Returns whether the block is in the best chain and, if so, its height and the hash of the next block. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-status)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required)
|
||
|
||
Returns: JSON `BlockStatus`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block/<hash>/status"
|
||
```
|
||
|
||
#### GET `/api/block/{hash}/txid/{index}`
|
||
|
||
Transaction ID at index
|
||
|
||
Retrieve a single transaction ID at a specific index within a block. Returns plain text txid. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-transaction-id)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required): Bitcoin block hash
|
||
- `index` (path, BlockTxIndex, required): Transaction index within the block (0-based)
|
||
|
||
Returns: text `Txid`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block/<hash>/txid/<index>"
|
||
```
|
||
|
||
#### GET `/api/block/{hash}/txids`
|
||
|
||
Block transaction IDs
|
||
|
||
Retrieve all transaction IDs in a block. Returns an array of txids in block order. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-transaction-ids)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required)
|
||
|
||
Returns: JSON `Txid[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block/<hash>/txids"
|
||
```
|
||
|
||
#### GET `/api/block/{hash}/txs`
|
||
|
||
Block transactions
|
||
|
||
Retrieve transactions in a block by block hash. Returns up to 25 transactions starting from index 0. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-transactions)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required)
|
||
|
||
Returns: JSON `Transaction[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block/<hash>/txs"
|
||
```
|
||
|
||
#### GET `/api/block/{hash}/txs/{start_index}`
|
||
|
||
Block transactions (paginated)
|
||
|
||
Retrieve transactions in a block by block hash, starting from the specified index. Returns up to 25 transactions at a time. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-transactions)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required): Bitcoin block hash
|
||
- `start_index` (path, BlockTxIndex, required): Starting transaction index within the block (0-based)
|
||
|
||
Returns: JSON `Transaction[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block/<hash>/txs/<start_index>"
|
||
```
|
||
|
||
#### GET `/api/v1/block/{hash}`
|
||
|
||
Block (v1)
|
||
|
||
Returns block details with extras by hash. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-v1)*
|
||
|
||
Parameters:
|
||
- `hash` (path, BlockHash, required)
|
||
|
||
Returns: JSON `BlockInfoV1`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/block/<hash>"
|
||
```
|
||
|
||
### Block Height
|
||
|
||
#### GET `/api/block-height/{height}`
|
||
|
||
Block hash by height
|
||
|
||
Retrieve the block hash at a given height. Returns the hash as plain text. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-height)*
|
||
|
||
Parameters:
|
||
- `height` (path, Height, required)
|
||
|
||
Returns: text `BlockHash`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/block-height/<height>"
|
||
```
|
||
|
||
### Blocks
|
||
|
||
#### GET `/api/blocks`
|
||
|
||
Recent blocks
|
||
|
||
Retrieve the last 10 blocks. Returns block metadata for each block. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-blocks)*
|
||
|
||
Returns: JSON `BlockInfo[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/blocks"
|
||
```
|
||
|
||
#### GET `/api/blocks/tip/hash`
|
||
|
||
Block tip hash
|
||
|
||
Returns the hash of the last block. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-tip-hash)*
|
||
|
||
Returns: text `BlockHash`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/blocks/tip/hash"
|
||
```
|
||
|
||
#### GET `/api/blocks/tip/height`
|
||
|
||
Block tip height
|
||
|
||
Returns the height of the last block. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-tip-height)*
|
||
|
||
Returns: text `Height`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/blocks/tip/height"
|
||
```
|
||
|
||
#### GET `/api/blocks/{height}`
|
||
|
||
Blocks from height
|
||
|
||
Retrieve up to 10 blocks going backwards from the given height. For example, height=100 returns blocks 100, 99, 98, ..., 91. Height=0 returns only block 0. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-blocks)*
|
||
|
||
Parameters:
|
||
- `height` (path, Height, required)
|
||
|
||
Returns: JSON `BlockInfo[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/blocks/<height>"
|
||
```
|
||
|
||
#### GET `/api/v1/blocks`
|
||
|
||
Recent blocks with extras
|
||
|
||
Retrieve the last 15 blocks with extended data including pool identification and fee statistics. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-blocks-v1)*
|
||
|
||
Returns: JSON `BlockInfoV1[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/blocks"
|
||
```
|
||
|
||
#### GET `/api/v1/blocks/{height}`
|
||
|
||
Blocks from height with extras
|
||
|
||
Retrieve up to 15 blocks with extended data going backwards from the given height. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-blocks-v1)*
|
||
|
||
Parameters:
|
||
- `height` (path, Height, required)
|
||
|
||
Returns: JSON `BlockInfoV1[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/blocks/<height>"
|
||
```
|
||
|
||
### Cpfp
|
||
|
||
#### GET `/api/v1/cpfp/{txid}`
|
||
|
||
CPFP info
|
||
|
||
Returns ancestors and descendants for a CPFP (Child Pays For Parent) transaction, including the effective fee rate of the package. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-children-pay-for-parent)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: JSON `CpfpInfo`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/cpfp/<txid>"
|
||
```
|
||
|
||
### Difficulty Adjustment
|
||
|
||
#### GET `/api/v1/difficulty-adjustment`
|
||
|
||
Difficulty adjustment
|
||
|
||
Get current difficulty adjustment progress and estimates. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-difficulty-adjustment)*
|
||
|
||
Returns: JSON `DifficultyAdjustment`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/difficulty-adjustment"
|
||
```
|
||
|
||
### Fees
|
||
|
||
#### GET `/api/v1/fees/mempool-blocks`
|
||
|
||
Projected mempool blocks
|
||
|
||
Projected blocks for fee estimation. Block 0 reflects Bitcoin Core's actual next-block selection; blocks 1+ are a fee-tier approximation. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mempool-blocks-fees)*
|
||
|
||
Returns: JSON `MempoolBlock[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/fees/mempool-blocks"
|
||
```
|
||
|
||
#### GET `/api/v1/fees/precise`
|
||
|
||
Precise recommended fees
|
||
|
||
Recommended fee rates with sub-integer precision. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-recommended-fees-precise)*
|
||
|
||
Returns: JSON `RecommendedFees`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/fees/precise"
|
||
```
|
||
|
||
#### GET `/api/v1/fees/recommended`
|
||
|
||
Recommended fees
|
||
|
||
Recommended fee rates by confirmation target. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-recommended-fees)*
|
||
|
||
Returns: JSON `RecommendedFees`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/fees/recommended"
|
||
```
|
||
|
||
### Fullrbf
|
||
|
||
#### GET `/api/v1/fullrbf/replacements`
|
||
|
||
Recent full-RBF replacements
|
||
|
||
Same response shape as `GET /api/v1/replacements`, but limited to trees where at least one predecessor was non-signaling (full-RBF). *[Mempool.space docs](https://mempool.space/docs/api/rest#get-fullrbf-replacements)*
|
||
|
||
Returns: JSON `ReplacementNode[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/fullrbf/replacements"
|
||
```
|
||
|
||
### Health
|
||
|
||
#### GET `/health`
|
||
|
||
Health check
|
||
|
||
Liveness probe. Returns server identity, uptime, and indexed/computed heights from local state only (no bitcoind round-trip). For real chain-tip catch-up, request `GET /api/server/sync`.
|
||
|
||
Returns: JSON `Health`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/health"
|
||
```
|
||
|
||
### Historical Price
|
||
|
||
#### GET `/api/v1/historical-price`
|
||
|
||
Historical price
|
||
|
||
Get historical BTC/USD price. Optionally specify a UNIX timestamp to get the price at that time. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-historical-price)*
|
||
|
||
Parameters:
|
||
- `timestamp` (query, Timestamp, optional)
|
||
|
||
Returns: JSON `HistoricalPrice`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/historical-price?timestamp=<timestamp>"
|
||
```
|
||
|
||
### Mempool
|
||
|
||
#### GET `/api/mempool`
|
||
|
||
Mempool statistics
|
||
|
||
Get current mempool statistics including transaction count, total vsize, total fees, and fee histogram. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mempool)*
|
||
|
||
Returns: JSON `MempoolInfo`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/mempool"
|
||
```
|
||
|
||
#### GET `/api/mempool/hash`
|
||
|
||
Mempool content hash
|
||
|
||
Returns an opaque hash that changes whenever the projected next block changes. Same value as the mempool ETag. Useful as a freshness/liveness signal: if it stays constant for tens of seconds on a live network, the mempool sync loop has stalled.
|
||
|
||
Returns: JSON `NextBlockHash`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/mempool/hash"
|
||
```
|
||
|
||
#### GET `/api/mempool/price`
|
||
|
||
Live BTC/USD price
|
||
|
||
Returns the current BTC/USD price in dollars, derived from on-chain round-dollar output patterns in the last 12 blocks plus mempool.
|
||
|
||
Returns: JSON `Dollars`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/mempool/price"
|
||
```
|
||
|
||
#### GET `/api/mempool/recent`
|
||
|
||
Recent mempool transactions
|
||
|
||
Get the last 10 transactions to enter the mempool. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mempool-recent)*
|
||
|
||
Returns: JSON `MempoolRecentTx[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/mempool/recent"
|
||
```
|
||
|
||
#### GET `/api/mempool/txids`
|
||
|
||
Mempool transaction IDs
|
||
|
||
Get all transaction IDs currently in the mempool. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mempool-transaction-ids)*
|
||
|
||
Returns: JSON `Txid[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/mempool/txids"
|
||
```
|
||
|
||
#### GET `/api/v1/mempool/block-template`
|
||
|
||
Projected next block template
|
||
|
||
Bitcoin Core's `getblocktemplate` selection: full transaction bodies in GBT order with aggregate stats. The returned `hash` is an opaque content token; pass it to `GET /api/v1/mempool/block-template/diff/{hash}` to fetch deltas instead of refetching the whole template.
|
||
|
||
Returns: JSON `BlockTemplate`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mempool/block-template"
|
||
```
|
||
|
||
#### GET `/api/v1/mempool/block-template/diff/{hash}`
|
||
|
||
Block template diff since hash
|
||
|
||
Delta of the projected next block since `<hash>`. `order` is the full new template in order: each entry is either a number (index into the prior template the client cached at `<hash>`) or a transaction object (new body to insert at this position). Walk `order` once to rebuild; `removed` is a convenience list of txids that left so clients can evict cached bodies. After applying, use the response `hash` as `<hash>` on the next call to keep iterating. Returns `404` when `<hash>` has aged out of server history; clients should fall back to `GET /api/v1/mempool/block-template`.
|
||
|
||
Parameters:
|
||
- `hash` (path, NextBlockHash, required)
|
||
|
||
Returns: JSON `BlockTemplateDiff`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mempool/block-template/diff/<hash>"
|
||
```
|
||
|
||
### Mining
|
||
|
||
#### GET `/api/v1/mining/blocks/fee-rates/{time_period}`
|
||
|
||
Block fee rates
|
||
|
||
Get block fee rate percentiles (min, 10th, 25th, median, 75th, 90th, max) for a time period. Valid periods: `24h`, `3d`, `1w`, `1m`, `3m`, `6m`, `1y`, `2y`, `3y`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-feerates)*
|
||
|
||
Parameters:
|
||
- `time_period` (path, TimePeriod, required)
|
||
|
||
Returns: JSON `BlockFeeRatesEntry[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/blocks/fee-rates/<time_period>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/blocks/fees/{time_period}`
|
||
|
||
Block fees
|
||
|
||
Get average total fees per block for a time period. Valid periods: `24h`, `3d`, `1w`, `1m`, `3m`, `6m`, `1y`, `2y`, `3y`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-fees)*
|
||
|
||
Parameters:
|
||
- `time_period` (path, TimePeriod, required)
|
||
|
||
Returns: JSON `BlockFeesEntry[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/blocks/fees/<time_period>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/blocks/rewards/{time_period}`
|
||
|
||
Block rewards
|
||
|
||
Get average coinbase reward (subsidy + fees) per block for a time period. Valid periods: `24h`, `3d`, `1w`, `1m`, `3m`, `6m`, `1y`, `2y`, `3y`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-rewards)*
|
||
|
||
Parameters:
|
||
- `time_period` (path, TimePeriod, required)
|
||
|
||
Returns: JSON `BlockRewardsEntry[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/blocks/rewards/<time_period>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/blocks/sizes-weights/{time_period}`
|
||
|
||
Block sizes and weights
|
||
|
||
Get average block sizes and weights for a time period. Valid periods: `24h`, `3d`, `1w`, `1m`, `3m`, `6m`, `1y`, `2y`, `3y`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-sizes-weights)*
|
||
|
||
Parameters:
|
||
- `time_period` (path, TimePeriod, required)
|
||
|
||
Returns: JSON `BlockSizesWeights`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/blocks/sizes-weights/<time_period>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/blocks/timestamp/{timestamp}`
|
||
|
||
Block by timestamp
|
||
|
||
Find the block closest to a given UNIX timestamp. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-timestamp)*
|
||
|
||
Parameters:
|
||
- `timestamp` (path, Timestamp, required)
|
||
|
||
Returns: JSON `BlockTimestamp`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/blocks/timestamp/<timestamp>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/difficulty-adjustments`
|
||
|
||
Difficulty adjustments (all time)
|
||
|
||
Get historical difficulty adjustments including timestamp, block height, difficulty value, and percentage change. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-difficulty-adjustments)*
|
||
|
||
Returns: JSON `DifficultyAdjustmentEntry[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/difficulty-adjustments"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/difficulty-adjustments/{time_period}`
|
||
|
||
Difficulty adjustments
|
||
|
||
Get historical difficulty adjustments for a time period. Valid periods: `24h`, `3d`, `1w`, `1m`, `3m`, `6m`, `1y`, `2y`, `3y`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-difficulty-adjustments)*
|
||
|
||
Parameters:
|
||
- `time_period` (path, TimePeriod, required)
|
||
|
||
Returns: JSON `DifficultyAdjustmentEntry[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/difficulty-adjustments/<time_period>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/hashrate`
|
||
|
||
Network hashrate (all time)
|
||
|
||
Get network hashrate and difficulty data for all time. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-hashrate)*
|
||
|
||
Returns: JSON `HashrateSummary`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/hashrate"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/hashrate/pools`
|
||
|
||
All pools hashrate (all time)
|
||
|
||
Get hashrate data for all mining pools. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pool-hashrates)*
|
||
|
||
Returns: JSON `PoolHashrateEntry[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/hashrate/pools"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/hashrate/pools/{time_period}`
|
||
|
||
All pools hashrate
|
||
|
||
Get hashrate data for all mining pools for a time period. Valid periods: `1m`, `3m`, `6m`, `1y`, `2y`, `3y`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pool-hashrates)*
|
||
|
||
Parameters:
|
||
- `time_period` (path, TimePeriod, required)
|
||
|
||
Returns: JSON `PoolHashrateEntry[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/hashrate/pools/<time_period>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/hashrate/{time_period}`
|
||
|
||
Network hashrate
|
||
|
||
Get network hashrate and difficulty data for a time period. Valid periods: `24h`, `3d`, `1w`, `1m`, `3m`, `6m`, `1y`, `2y`, `3y`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-hashrate)*
|
||
|
||
Parameters:
|
||
- `time_period` (path, TimePeriod, required)
|
||
|
||
Returns: JSON `HashrateSummary`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/hashrate/<time_period>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/pool/{slug}`
|
||
|
||
Mining pool details
|
||
|
||
Get detailed information about a specific mining pool including block counts and shares for different time periods. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pool)*
|
||
|
||
Parameters:
|
||
- `slug` (path, PoolSlug, required)
|
||
|
||
Returns: JSON `PoolDetail`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/pool/<slug>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/pool/{slug}/blocks`
|
||
|
||
Mining pool blocks
|
||
|
||
Get the 10 most recent blocks mined by a specific pool. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pool-blocks)*
|
||
|
||
Parameters:
|
||
- `slug` (path, PoolSlug, required)
|
||
|
||
Returns: JSON `BlockInfoV1[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/pool/<slug>/blocks"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/pool/{slug}/blocks/{height}`
|
||
|
||
Mining pool blocks from height
|
||
|
||
Get 10 blocks mined by a specific pool before (and including) the given height. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pool-blocks)*
|
||
|
||
Parameters:
|
||
- `slug` (path, PoolSlug, required)
|
||
- `height` (path, Height, required)
|
||
|
||
Returns: JSON `BlockInfoV1[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/pool/<slug>/blocks/<height>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/pool/{slug}/hashrate`
|
||
|
||
Mining pool hashrate
|
||
|
||
Get hashrate history for a specific mining pool. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pool-hashrate)*
|
||
|
||
Parameters:
|
||
- `slug` (path, PoolSlug, required)
|
||
|
||
Returns: JSON `PoolHashrateEntry[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/pool/<slug>/hashrate"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/pools`
|
||
|
||
List all mining pools
|
||
|
||
Get list of all known mining pools with their identifiers. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pools)*
|
||
|
||
Returns: JSON `PoolInfo[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/pools"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/pools/{time_period}`
|
||
|
||
Mining pool statistics
|
||
|
||
Get mining pool statistics for a time period. Valid periods: `24h`, `3d`, `1w`, `1m`, `3m`, `6m`, `1y`, `2y`, `3y`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pools)*
|
||
|
||
Parameters:
|
||
- `time_period` (path, TimePeriod, required)
|
||
|
||
Returns: JSON `PoolsSummary`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/pools/<time_period>"
|
||
```
|
||
|
||
#### GET `/api/v1/mining/reward-stats/{block_count}`
|
||
|
||
Mining reward statistics
|
||
|
||
Get mining reward statistics for the last N blocks including total rewards, fees, and transaction count. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-reward-stats)*
|
||
|
||
Parameters:
|
||
- `block_count` (path, integer, required): Number of recent blocks to include
|
||
|
||
Returns: JSON `RewardStats`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/mining/reward-stats/<block_count>"
|
||
```
|
||
|
||
### Openapi.json
|
||
|
||
#### GET `/openapi.json`
|
||
|
||
OpenAPI specification
|
||
|
||
Full OpenAPI 3.1 specification for this API.
|
||
|
||
Returns: text
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/openapi.json"
|
||
```
|
||
|
||
### Oracle
|
||
|
||
#### GET `/api/oracle/histogram/outputs/live`
|
||
|
||
Live output value histogram
|
||
|
||
Live unfiltered output value histogram for the forming mempool block. Every live output is binned by value on the oracle log scale; no oracle payment filters are applied. A flat array of log-scale bins, all zero when no mempool is configured.
|
||
|
||
Returns: JSON `integer[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/oracle/histogram/outputs/live"
|
||
```
|
||
|
||
#### GET `/api/oracle/histogram/outputs/{point}`
|
||
|
||
Output value histogram at height or day
|
||
|
||
Unfiltered output value histogram for a confirmed point. A block height (`840000`) gives every output in that block, coinbase included, binned by value on the oracle log scale; a calendar date (`YYYY-MM-DD`) sums every block that day. A flat array of log-scale bins.
|
||
|
||
Parameters:
|
||
- `point` (path, string, required): Confirmed block height as decimal digits (`840000`) or calendar date in `YYYY-MM-DD` format.
|
||
|
||
Returns: JSON `integer[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/oracle/histogram/outputs/<point>"
|
||
```
|
||
|
||
#### GET `/api/oracle/histogram/payments/live`
|
||
|
||
Live payment output histogram
|
||
|
||
Live smoothed histogram of oracle-eligible payment outputs, binned by output value on the oracle log scale. It combines the committed oracle window with the forming mempool block. A flat array of log-scale bins.
|
||
|
||
Returns: JSON `integer[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/oracle/histogram/payments/live"
|
||
```
|
||
|
||
#### GET `/api/oracle/histogram/payments/{point}`
|
||
|
||
Payment output histogram at height or day
|
||
|
||
Smoothed histogram of oracle-eligible payment outputs for a confirmed point. A block height (`840000`) gives that block's oracle payment histogram; a calendar date (`YYYY-MM-DD`) gives the average of that day's per-block payment histograms. A flat array of log-scale bins.
|
||
|
||
Parameters:
|
||
- `point` (path, string, required): Confirmed block height as decimal digits (`840000`) or calendar date in `YYYY-MM-DD` format.
|
||
|
||
Returns: JSON `integer[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/oracle/histogram/payments/<point>"
|
||
```
|
||
|
||
#### GET `/api/oracle/price`
|
||
|
||
Live BTC/USD price
|
||
|
||
Current BTC/USD price in dollars. Same value as `GET /api/mempool/price`. Confirmed per-height history is available at `GET /api/series/price/height`.
|
||
|
||
Returns: JSON `Dollars`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/oracle/price"
|
||
```
|
||
|
||
### Prices
|
||
|
||
#### GET `/api/v1/prices`
|
||
|
||
Current BTC price
|
||
|
||
Returns bitcoin latest price (on-chain derived, USD only). *[Mempool.space docs](https://mempool.space/docs/api/rest#get-price)*
|
||
|
||
Returns: JSON `Prices`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/prices"
|
||
```
|
||
|
||
### Replacements
|
||
|
||
#### GET `/api/v1/replacements`
|
||
|
||
Recent RBF replacements
|
||
|
||
Returns up to 25 most-recent RBF replacement trees across the whole mempool. Each entry has the same shape as `tx_rbf().replacements`. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-replacements)*
|
||
|
||
Returns: JSON `ReplacementNode[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/replacements"
|
||
```
|
||
|
||
### Series
|
||
|
||
#### GET `/api/series`
|
||
|
||
Series catalog
|
||
|
||
Returns the complete hierarchical catalog of available series organized as a tree structure. Series are grouped by categories and subcategories.
|
||
|
||
Returns: JSON `TreeNode`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series"
|
||
```
|
||
|
||
#### GET `/api/series/bulk`
|
||
|
||
Bulk series data
|
||
|
||
Fetch multiple series in a single request. Supports filtering by index and date range. Returns an array of SeriesData objects. For a single series, use `get_series` instead.
|
||
|
||
Parameters:
|
||
- `series` (query, SeriesList, required): Requested series
|
||
- `index` (query, Index, required): Index to query
|
||
- `start` (query, RangeIndex, optional): Inclusive start: integer index, date (YYYY-MM-DD), or timestamp (ISO 8601). Negative integers count from end. Aliases: `from`, `f`, `s`
|
||
- `end` (query, RangeIndex, optional): Exclusive end: integer index, date (YYYY-MM-DD), or timestamp (ISO 8601). Negative integers count from end. Aliases: `to`, `t`, `e`
|
||
- `limit` (query, Limit, optional): Maximum number of values to return (ignored if `end` is set). Aliases: `count`, `c`, `l`
|
||
- `format` (query, Format, optional): Format of the output
|
||
|
||
Returns: JSON `SeriesData[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/bulk?series=<series>&index=<index>&start=<start>&end=<end>&limit=<limit>&format=<format>"
|
||
```
|
||
|
||
#### GET `/api/series/count`
|
||
|
||
Series count
|
||
|
||
Returns the number of series available per index type.
|
||
|
||
Returns: JSON `SeriesCount[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/count"
|
||
```
|
||
|
||
#### GET `/api/series/indexes`
|
||
|
||
List available indexes
|
||
|
||
Returns all available indexes with their accepted query aliases. Use any alias when querying series.
|
||
|
||
Returns: JSON `IndexInfo[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/indexes"
|
||
```
|
||
|
||
#### GET `/api/series/list`
|
||
|
||
Series list
|
||
|
||
Paginated flat list of all available series names. Use `page` query param for pagination.
|
||
|
||
Parameters:
|
||
- `page` (query, integer, optional): Pagination index
|
||
- `per_page` (query, integer, optional): Results per page (default: 1000, max: 1000)
|
||
|
||
Returns: JSON `PaginatedSeries`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/list?page=<page>&per_page=<per_page>"
|
||
```
|
||
|
||
#### GET `/api/series/search`
|
||
|
||
Search series
|
||
|
||
Fuzzy search for series by name. Supports partial matches and typos.
|
||
|
||
Parameters:
|
||
- `q` (query, SeriesName, required): Search query string
|
||
- `limit` (query, Limit, optional): Maximum number of results
|
||
|
||
Returns: JSON `string[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/search?q=<q>&limit=<limit>"
|
||
```
|
||
|
||
#### GET `/api/series/{series}`
|
||
|
||
Get series info
|
||
|
||
Returns the supported indexes and value type for the specified series.
|
||
|
||
Parameters:
|
||
- `series` (path, SeriesName, required)
|
||
|
||
Returns: JSON `SeriesInfo`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/<series>"
|
||
```
|
||
|
||
#### GET `/api/series/{series}/{index}`
|
||
|
||
Get series data
|
||
|
||
Fetch data for a specific series at the given index. Use query parameters to filter by date range and format (json/csv).
|
||
|
||
Parameters:
|
||
- `series` (path, SeriesName, required): Series name
|
||
- `index` (path, Index, required): Aggregation index
|
||
- `start` (query, RangeIndex, optional): Inclusive start: integer index, date (YYYY-MM-DD), or timestamp (ISO 8601). Negative integers count from end. Aliases: `from`, `f`, `s`
|
||
- `end` (query, RangeIndex, optional): Exclusive end: integer index, date (YYYY-MM-DD), or timestamp (ISO 8601). Negative integers count from end. Aliases: `to`, `t`, `e`
|
||
- `limit` (query, Limit, optional): Maximum number of values to return (ignored if `end` is set). Aliases: `count`, `c`, `l`
|
||
- `format` (query, Format, optional): Format of the output
|
||
|
||
Returns: JSON `SeriesData`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/<series>/<index>?start=<start>&end=<end>&limit=<limit>&format=<format>"
|
||
```
|
||
|
||
#### GET `/api/series/{series}/{index}/data`
|
||
|
||
Get raw series data
|
||
|
||
Returns just the data array without the SeriesData wrapper. Supports the same range and format parameters as `GET /api/series/{series}/{index}`.
|
||
|
||
Parameters:
|
||
- `series` (path, SeriesName, required): Series name
|
||
- `index` (path, Index, required): Aggregation index
|
||
- `start` (query, RangeIndex, optional): Inclusive start: integer index, date (YYYY-MM-DD), or timestamp (ISO 8601). Negative integers count from end. Aliases: `from`, `f`, `s`
|
||
- `end` (query, RangeIndex, optional): Exclusive end: integer index, date (YYYY-MM-DD), or timestamp (ISO 8601). Negative integers count from end. Aliases: `to`, `t`, `e`
|
||
- `limit` (query, Limit, optional): Maximum number of values to return (ignored if `end` is set). Aliases: `count`, `c`, `l`
|
||
- `format` (query, Format, optional): Format of the output
|
||
|
||
Returns: JSON `boolean[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/<series>/<index>/data?start=<start>&end=<end>&limit=<limit>&format=<format>"
|
||
```
|
||
|
||
#### GET `/api/series/{series}/{index}/latest`
|
||
|
||
Get latest series value
|
||
|
||
Returns the single most recent value for a series, unwrapped (not inside a SeriesData object).
|
||
|
||
Parameters:
|
||
- `series` (path, SeriesName, required): Series name
|
||
- `index` (path, Index, required): Aggregation index
|
||
|
||
Returns: JSON `*`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/<series>/<index>/latest"
|
||
```
|
||
|
||
#### GET `/api/series/{series}/{index}/len`
|
||
|
||
Get series data length
|
||
|
||
Returns the total number of data points for a series at the given index.
|
||
|
||
Parameters:
|
||
- `series` (path, SeriesName, required): Series name
|
||
- `index` (path, Index, required): Aggregation index
|
||
|
||
Returns: JSON `integer`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/<series>/<index>/len"
|
||
```
|
||
|
||
#### GET `/api/series/{series}/{index}/version`
|
||
|
||
Get series version
|
||
|
||
Returns the current version of a series. Changes when the series data is updated.
|
||
|
||
Parameters:
|
||
- `series` (path, SeriesName, required): Series name
|
||
- `index` (path, Index, required): Aggregation index
|
||
|
||
Returns: JSON `Version`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/series/<series>/<index>/version"
|
||
```
|
||
|
||
### Server
|
||
|
||
#### GET `/api/server/disk`
|
||
|
||
Disk usage
|
||
|
||
Returns the disk space used by BRK and Bitcoin data.
|
||
|
||
Returns: JSON `DiskUsage`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/server/disk"
|
||
```
|
||
|
||
#### GET `/api/server/sync`
|
||
|
||
Sync status
|
||
|
||
Returns the sync status of the indexer, including indexed height, tip height, blocks behind, and last indexed timestamp.
|
||
|
||
Returns: JSON `SyncStatus`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/server/sync"
|
||
```
|
||
|
||
### Transaction Times
|
||
|
||
#### GET `/api/v1/transaction-times`
|
||
|
||
Transaction first-seen times
|
||
|
||
Returns timestamps when transactions were first seen in the mempool. Returns 0 for mined or unknown transactions. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-times)*
|
||
|
||
Parameters:
|
||
- `txId[]` (query, Txid[], required): Transaction IDs to look up (max 250 per request).
|
||
|
||
Returns: JSON `integer[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/transaction-times?txId[]=<txId[]>"
|
||
```
|
||
|
||
### Tx
|
||
|
||
#### POST `/api/tx`
|
||
|
||
Broadcast transaction
|
||
|
||
Broadcast a raw transaction to the network. The transaction should be provided as hex in the request body. The txid will be returned on success. *[Mempool.space docs](https://mempool.space/docs/api/rest#post-transaction)*
|
||
|
||
Request body: `string` (required)
|
||
|
||
Returns: JSON `Txid`
|
||
|
||
```bash
|
||
curl -s -X POST --data '<string>' "https://bitview.space/api/tx"
|
||
```
|
||
|
||
#### GET `/api/tx/{txid}`
|
||
|
||
Transaction information
|
||
|
||
Retrieve complete transaction data by transaction ID (txid). Returns inputs, outputs, fee, size, and confirmation status. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: JSON `Transaction`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx/<txid>"
|
||
```
|
||
|
||
#### GET `/api/tx/{txid}/hex`
|
||
|
||
Transaction hex
|
||
|
||
Retrieve the raw transaction as a hex-encoded string. Returns the serialized transaction in hexadecimal format. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-hex)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: text `Hex`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx/<txid>/hex"
|
||
```
|
||
|
||
#### GET `/api/tx/{txid}/merkle-proof`
|
||
|
||
Transaction merkle proof
|
||
|
||
Get the merkle inclusion proof for a transaction. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-merkle-proof)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: JSON `MerkleProof`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx/<txid>/merkle-proof"
|
||
```
|
||
|
||
#### GET `/api/tx/{txid}/merkleblock-proof`
|
||
|
||
Transaction merkleblock proof
|
||
|
||
Get the merkleblock proof for a transaction (BIP37 format, hex encoded). *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-merkleblock-proof)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: text `Hex`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx/<txid>/merkleblock-proof"
|
||
```
|
||
|
||
#### GET `/api/tx/{txid}/outspend/{vout}`
|
||
|
||
Output spend status
|
||
|
||
Get the spending status of a transaction output. Returns whether the output has been spent and, if so, the spending transaction details. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-outspend)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required): Transaction ID
|
||
- `vout` (path, Vout, required): Output index
|
||
|
||
Returns: JSON `TxOutspend`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx/<txid>/outspend/<vout>"
|
||
```
|
||
|
||
#### GET `/api/tx/{txid}/outspends`
|
||
|
||
All output spend statuses
|
||
|
||
Get the spending status of all outputs in a transaction. Returns an array with the spend status for each output. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-outspends)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: JSON `TxOutspend[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx/<txid>/outspends"
|
||
```
|
||
|
||
#### GET `/api/tx/{txid}/raw`
|
||
|
||
Transaction raw
|
||
|
||
Returns a transaction as binary data. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-raw)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: binary data
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx/<txid>/raw"
|
||
```
|
||
|
||
#### GET `/api/tx/{txid}/status`
|
||
|
||
Transaction status
|
||
|
||
Retrieve the confirmation status of a transaction. Returns whether the transaction is confirmed and, if so, the block height, hash, and timestamp. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-status)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: JSON `TxStatus`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx/<txid>/status"
|
||
```
|
||
|
||
#### GET `/api/v1/tx/{txid}/rbf`
|
||
|
||
RBF replacement history
|
||
|
||
Returns the RBF replacement tree for a transaction, if any. Both `replacements` and `replaces` are null when the tx has no known RBF history within the mempool monitor's retention window. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-rbf-history)*
|
||
|
||
Parameters:
|
||
- `txid` (path, Txid, required)
|
||
|
||
Returns: JSON `RbfResponse`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/tx/<txid>/rbf"
|
||
```
|
||
|
||
### Tx Index
|
||
|
||
#### GET `/api/tx-index/{index}`
|
||
|
||
Txid by index
|
||
|
||
Retrieve the transaction ID (txid) at a given global transaction index. Returns the txid as plain text.
|
||
|
||
Parameters:
|
||
- `index` (path, TxIndex, required)
|
||
|
||
Returns: text `Txid`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/tx-index/<index>"
|
||
```
|
||
|
||
### Urpd
|
||
|
||
#### GET `/api/urpd`
|
||
|
||
Available URPD cohorts
|
||
|
||
Cohorts for which URPD data is available. Returns names like `all`, `sth`, `lth`, `utxos_under_1h_old`.
|
||
|
||
Returns: JSON `Cohort[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/urpd"
|
||
```
|
||
|
||
#### GET `/api/urpd/{cohort}`
|
||
|
||
Latest URPD
|
||
|
||
URPD for the most recent available date in the cohort. The response's `date` field echoes which date was served. Returns `{ cohort, date, weight, aggregation, close, total_supply, buckets }`. `close` and each bucket's `price_floor`, `realized_cap`, and `unrealized_pnl` are USD; `total_supply` and bucket `supply` are BTC. `unrealized_pnl` can be negative.
|
||
|
||
Parameters:
|
||
- `cohort` (path, Cohort, required)
|
||
- `agg` (query, UrpdAggregation, optional): Aggregation strategy. Default: raw (no aggregation). Accepts `bucket` as alias.
|
||
- `weight` (query, UrpdWeight, optional): Supply weighting. Default: raw (unweighted).
|
||
|
||
Returns: JSON `Urpd`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/urpd/<cohort>?agg=<agg>&weight=<weight>"
|
||
```
|
||
|
||
#### GET `/api/urpd/{cohort}/dates`
|
||
|
||
Available URPD dates
|
||
|
||
Dates for which a URPD snapshot is available for the cohort and selected `weight`. One entry per UTC day, sorted ascending.
|
||
|
||
Parameters:
|
||
- `cohort` (path, Cohort, required)
|
||
- `weight` (query, UrpdWeight, optional): Supply weighting. Default: raw (unweighted).
|
||
|
||
Returns: JSON `Date[]`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/urpd/<cohort>/dates?weight=<weight>"
|
||
```
|
||
|
||
#### GET `/api/urpd/{cohort}/{date}`
|
||
|
||
URPD at date
|
||
|
||
URPD for a (cohort, date) pair. Returns `{ cohort, date, weight, aggregation, close, total_supply, buckets }` where each bucket is `{ price_floor, supply, realized_cap, unrealized_pnl }`. `close`, `price_floor`, `realized_cap`, and `unrealized_pnl` are USD; `total_supply` and `supply` are BTC. `unrealized_pnl` can be negative.
|
||
|
||
Parameters:
|
||
- `cohort` (path, Cohort, required)
|
||
- `date` (path, string, required): Calendar date of the URPD snapshot in `YYYY-MM-DD` format.
|
||
- `agg` (query, UrpdAggregation, optional): Aggregation strategy. Default: raw (no aggregation). Accepts `bucket` as alias.
|
||
- `weight` (query, UrpdWeight, optional): Supply weighting. Default: raw (unweighted).
|
||
|
||
Returns: JSON `Urpd`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/urpd/<cohort>/<date>?agg=<agg>&weight=<weight>"
|
||
```
|
||
|
||
### Validate Address
|
||
|
||
#### GET `/api/v1/validate-address/{address}`
|
||
|
||
Validate address
|
||
|
||
Validate a Bitcoin address and get information about its type and scriptPubKey. Returns `isvalid: false` with an error message for invalid addresses. *[Mempool.space docs](https://mempool.space/docs/api/rest#get-address-validate)*
|
||
|
||
Parameters:
|
||
- `address` (path, string, required): Bitcoin address to validate (can be any string)
|
||
|
||
Returns: JSON `AddrValidation`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/api/v1/validate-address/<address>"
|
||
```
|
||
|
||
### Version
|
||
|
||
#### GET `/version`
|
||
|
||
API version
|
||
|
||
Returns the current version of the API server
|
||
|
||
Returns: JSON `string`
|
||
|
||
```bash
|
||
curl -s "https://bitview.space/version"
|
||
```
|
||
|
||
## Schemas
|
||
|
||
### `Addr`
|
||
|
||
`string`
|
||
|
||
### `AddrChainStats`
|
||
|
||
- `balance`: `Sats` (required) — Current confirmed balance in satoshis
|
||
- `funded_txo_count`: `integer` (required) — Total number of transaction outputs that funded this address
|
||
- `funded_txo_sum`: `Sats` (required) — Total amount in satoshis received by this address across all funded outputs
|
||
- `spent_txo_count`: `integer` (required) — Total number of transaction outputs spent from this address
|
||
- `spent_txo_sum`: `Sats` (required) — Total amount in satoshis spent from this address
|
||
- `tx_count`: `integer` (required) — Total number of confirmed transactions involving this address
|
||
- `type_index`: `TypeIndex` (required) — Index of this address within its type on the blockchain
|
||
- `realized_price`: `Dollars` (required) — Realized price (average cost basis) in USD
|
||
|
||
### `AddrHashPrefixMatches`
|
||
|
||
- `addr_type`: `OutputType` (required)
|
||
- `prefix`: `string` (required)
|
||
- `truncated`: `boolean` (required)
|
||
- `addresses`: `Addr[]` (required)
|
||
|
||
### `AddrMempoolStats`
|
||
|
||
- `balance_delta`: `SatsSigned` (required) — Net pending (unconfirmed) balance change in satoshis; negative when pending spends exceed receipts
|
||
- `funded_txo_count`: `integer` (required) — Number of unconfirmed transaction outputs funding this address
|
||
- `funded_txo_sum`: `Sats` (required) — Total amount in satoshis being received in unconfirmed transactions
|
||
- `spent_txo_count`: `integer` (required) — Number of unconfirmed transaction inputs spending from this address
|
||
- `spent_txo_sum`: `Sats` (required) — Total amount in satoshis being spent in unconfirmed transactions
|
||
- `tx_count`: `integer` (required) — Number of unconfirmed transactions involving this address
|
||
|
||
### `AddrStats`
|
||
|
||
- `address`: `Addr` (required) — Bitcoin address string
|
||
- `addr_type`: `OutputType` (required) — Address type (p2pkh, p2sh, v0_p2wpkh, v0_p2wsh, v1_p2tr, etc.)
|
||
- `chain_stats`: `AddrChainStats` (required) — Statistics for confirmed transactions on the blockchain
|
||
- `mempool_stats`: `AddrMempoolStats` (required) — Statistics for unconfirmed transactions in the mempool
|
||
- `balance`: `Sats` (required) — Total current balance in satoshis, including pending (unconfirmed) mempool changes
|
||
|
||
### `AddrValidation`
|
||
|
||
- `isvalid`: `boolean` (required) — Whether the address is valid
|
||
- `address`: `object` — The validated address
|
||
- `scriptPubKey`: `object` — The scriptPubKey in hex
|
||
- `isscript`: `object` — Whether this is a script address (P2SH)
|
||
- `iswitness`: `object` — Whether this is a witness address
|
||
- `witness_version`: `object` — Witness version (0 for P2WPKH/P2WSH, 1 for P2TR)
|
||
- `witness_program`: `object` — Witness program in hex
|
||
- `error_locations`: `object` — Error locations (empty array for most errors)
|
||
- `error`: `object` — Error message for invalid addresses
|
||
|
||
### `Bitcoin`
|
||
|
||
`number`
|
||
|
||
### `BlockExtras`
|
||
|
||
- `totalFees`: `Sats` (required) — Total fees in satoshis
|
||
- `medianFee`: `FeeRate` (required) — Median fee rate in sat/vB
|
||
- `feeRange`: `FeeRate[]` (required) — Fee rate range: [min, 10%, 25%, 50%, 75%, 90%, max]
|
||
- `reward`: `Sats` (required) — Total block reward (subsidy + fees) in satoshis
|
||
- `pool`: `BlockPool` (required) — Mining pool that mined this block
|
||
- `avgFee`: `Sats` (required) — Average fee per transaction in satoshis
|
||
- `avgFeeRate`: `FeeRate` (required) — Average fee rate in sat/vB
|
||
- `coinbaseRaw`: `string` (required) — Raw coinbase transaction scriptsig as hex
|
||
- `coinbaseAddress`: `object` — Primary coinbase output address
|
||
- `coinbaseAddresses`: `string[]` (required) — All coinbase output addresses
|
||
- `coinbaseSignature`: `string` (required) — Coinbase output script in ASM format
|
||
- `coinbaseSignatureAscii`: `string` (required) — Coinbase scriptsig decoded as ASCII
|
||
- `avgTxSize`: `number` (required) — Average transaction size in bytes
|
||
- `totalInputs`: `integer` (required) — Total number of inputs (excluding coinbase)
|
||
- `totalOutputs`: `integer` (required) — Total number of outputs
|
||
- `totalOutputAmt`: `Sats` (required) — Total output amount in satoshis
|
||
- `medianFeeAmt`: `Sats` (required) — Median fee amount in satoshis
|
||
- `feePercentiles`: `Sats[]` (required) — Fee amount percentiles in satoshis: [min, 10%, 25%, 50%, 75%, 90%, max]
|
||
- `segwitTotalTxs`: `integer` (required) — Number of segwit transactions
|
||
- `segwitTotalSize`: `integer` (required) — Total size of segwit transactions in bytes
|
||
- `segwitTotalWeight`: `Weight` (required) — Total weight of segwit transactions
|
||
- `header`: `string` (required) — Raw 80-byte block header as hex
|
||
- `utxoSetChange`: `integer` (required) — UTXO set change (total outputs - total inputs, includes unspendable like OP_RETURN). Note: intentionally differs from utxo_set_size diff which excludes unspendable outputs. Matches mempool.space/bitcoin-cli behavior.
|
||
- `utxoSetSize`: `integer` (required) — Total spendable UTXO set size at this height (excludes OP_RETURN and other unspendable outputs)
|
||
- `totalInputAmt`: `Sats` (required) — Total input amount in satoshis
|
||
- `virtualSize`: `number` (required) — Virtual size in vbytes
|
||
- `firstSeen`: `object` — Timestamp when the block was first seen (always null, not yet supported)
|
||
- `orphans`: `string[]` (required) — Orphaned blocks (always empty)
|
||
- `price`: `Dollars` (required) — USD price at block height
|
||
|
||
### `BlockHash`
|
||
|
||
`string`
|
||
|
||
### `BlockInfo`
|
||
|
||
- `id`: `BlockHash` (required) — Block hash
|
||
- `height`: `Height` (required) — Block height
|
||
- `version`: `integer` (required) — Block version
|
||
- `timestamp`: `Timestamp` (required) — Block timestamp (Unix time)
|
||
- `bits`: `integer` (required) — Compact target (bits)
|
||
- `nonce`: `integer` (required) — Nonce
|
||
- `difficulty`: `number` (required) — Block difficulty
|
||
- `merkle_root`: `string` (required) — Merkle root of the transaction tree
|
||
- `tx_count`: `integer` (required) — Number of transactions
|
||
- `size`: `integer` (required) — Block size in bytes
|
||
- `weight`: `Weight` (required) — Block weight in weight units
|
||
- `previousblockhash`: `BlockHash` (required) — Previous block hash
|
||
- `mediantime`: `Timestamp` (required) — Median time of the last 11 blocks
|
||
|
||
### `BlockInfoV1`
|
||
|
||
- `id`: `BlockHash` (required) — Block hash
|
||
- `height`: `Height` (required) — Block height
|
||
- `version`: `integer` (required) — Block version
|
||
- `timestamp`: `Timestamp` (required) — Block timestamp (Unix time)
|
||
- `bits`: `integer` (required) — Compact target (bits)
|
||
- `nonce`: `integer` (required) — Nonce
|
||
- `difficulty`: `number` (required) — Block difficulty
|
||
- `merkle_root`: `string` (required) — Merkle root of the transaction tree
|
||
- `tx_count`: `integer` (required) — Number of transactions
|
||
- `size`: `integer` (required) — Block size in bytes
|
||
- `weight`: `Weight` (required) — Block weight in weight units
|
||
- `previousblockhash`: `BlockHash` (required) — Previous block hash
|
||
- `mediantime`: `Timestamp` (required) — Median time of the last 11 blocks
|
||
- `stale`: `boolean` — Whether this block has been replaced by a longer chain
|
||
- `extras`: `BlockExtras` (required) — Extended block data
|
||
|
||
### `BlockPool`
|
||
|
||
- `id`: `integer` (required) — Unique pool identifier
|
||
- `name`: `string` (required) — Pool name
|
||
- `slug`: `PoolSlug` (required) — URL-friendly pool identifier
|
||
- `blockNumber`: `integer` (required) — This block's ordinal among blocks attributed to this pool
|
||
- `minerNames`: `object` — Miner name tags found in coinbase scriptsig
|
||
|
||
### `BlockSizeEntry`
|
||
|
||
- `avgHeight`: `Height` (required) — Average block height in this window
|
||
- `timestamp`: `Timestamp` (required) — Unix timestamp at the window midpoint
|
||
- `avgSize`: `integer` (required) — Rolling 24h median block size (bytes)
|
||
|
||
### `BlockSizesWeights`
|
||
|
||
- `sizes`: `BlockSizeEntry[]` (required) — Block size data points
|
||
- `weights`: `BlockWeightEntry[]` (required) — Block weight data points
|
||
|
||
### `BlockStatus`
|
||
|
||
- `in_best_chain`: `boolean` (required) — Whether this block is in the best chain
|
||
- `height`: `Height | null` — Block height (only if in best chain)
|
||
- `next_best`: `BlockHash | null` — Hash of the next block in the best chain (null if tip)
|
||
|
||
### `BlockTemplate`
|
||
|
||
- `hash`: `NextBlockHash` (required) — Pass to `GET /api/v1/mempool/block-template/diff/{hash}` to fetch deltas.
|
||
- `stats`: `MempoolBlock` (required) — Aggregate stats for this block (size, vsize, fee range, ...).
|
||
- `transactions`: `Transaction[]` (required) — Full transaction bodies in `getblocktemplate` order.
|
||
|
||
### `BlockTemplateDiff`
|
||
|
||
- `hash`: `NextBlockHash` (required) — Current next-block hash. Use as `since` on the next diff call.
|
||
- `since`: `NextBlockHash` (required) — Echoed prior hash the diff was computed against.
|
||
- `order`: `BlockTemplateDiffEntry[]` (required) — New template in order. Each entry is either an index into the prior template's transactions or a full transaction body.
|
||
- `removed`: `Txid[]` (required) — Txids that left the projected next block since `since` (confirmed, evicted, replaced, or pushed past block 0).
|
||
|
||
### `BlockTemplateDiffEntry`
|
||
|
||
`integer | Transaction`
|
||
|
||
### `BlockTimestamp`
|
||
|
||
- `height`: `Height` (required) — Block height
|
||
- `hash`: `BlockHash` (required) — Block hash
|
||
- `timestamp`: `string` (required) — Block timestamp in ISO 8601 format
|
||
|
||
### `BlockWeightEntry`
|
||
|
||
- `avgHeight`: `Height` (required) — Average block height in this window
|
||
- `timestamp`: `Timestamp` (required) — Unix timestamp at the window midpoint
|
||
- `avgWeight`: `Weight` (required) — Rolling 24h median block weight (weight units)
|
||
|
||
### `Cohort`
|
||
|
||
`all | sth | lth | utxos_under_1h_old | utxos_1h_to_1d_old | utxos_1d_to_1w_old | utxos_1w_to_1m_old | utxos_1m_to_2m_old | utxos_2m_to_3m_old | utxos_3m_to_4m_old | utxos_4m_to_5m_old | utxos_5m_to_6m_old | utxos_6m_to_9m_old | utxos_9m_to_1y_old | utxos_1y_to_18m_old | utxos_18m_to_2y_old | utxos_2y_to_3y_old | utxos_3y_to_4y_old | utxos_4y_to_5y_old | utxos_5y_to_6y_old | utxos_6y_to_7y_old | utxos_7y_to_8y_old | utxos_8y_to_10y_old | utxos_10y_to_12y_old | utxos_12y_to_15y_old | utxos_over_15y_old`
|
||
|
||
### `CpfpCluster`
|
||
|
||
- `txs`: `CpfpClusterTx[]` (required) — All txs in the cluster, in topological order (parents before children).
|
||
- `chunks`: `CpfpClusterChunk[]` (required) — SFL-emitted chunks ordered by descending feerate.
|
||
- `chunkIndex`: `integer` (required) — Index into `chunks` of the chunk containing the seed tx.
|
||
|
||
### `CpfpClusterChunk`
|
||
|
||
- `txs`: `CpfpClusterTxIndex[]` (required)
|
||
- `feerate`: `FeeRate` (required)
|
||
|
||
### `CpfpClusterTx`
|
||
|
||
- `txid`: `Txid` (required)
|
||
- `weight`: `Weight` (required)
|
||
- `fee`: `Sats` (required)
|
||
- `parents`: `CpfpClusterTxIndex[]` (required) — In-cluster parents of this tx.
|
||
|
||
### `CpfpClusterTxIndex`
|
||
|
||
`integer`
|
||
|
||
### `CpfpEntry`
|
||
|
||
- `txid`: `Txid` (required)
|
||
- `weight`: `Weight` (required)
|
||
- `fee`: `Sats` (required)
|
||
|
||
### `CpfpInfo`
|
||
|
||
- `ancestors`: `CpfpEntry[]` (required) — Ancestor transactions in the CPFP chain.
|
||
- `bestDescendant`: `CpfpEntry | null` — Best (highest fee rate) descendant, if any.
|
||
- `descendants`: `CpfpEntry[]` (required) — Descendant transactions in the CPFP chain.
|
||
- `effectiveFeePerVsize`: `FeeRate` (required) — Effective fee rate considering CPFP relationships (sat/vB). This is the seed's chunk feerate after lift-merging, i.e. the rate Core/mempool.space would surface for this tx.
|
||
- `sigops`: `SigOps` (required) — BIP-141 sigop cost for the seed tx (witness sigops count as 1, legacy and P2SH-redeem sigops count as 4).
|
||
- `fee`: `Sats` (required) — Transaction fee (sats).
|
||
- `vsize`: `VSize` (required) — Virtual size of the seed tx (vbytes).
|
||
- `adjustedVsize`: `VSize` (required) — Policy-adjusted virtual size: `max(vsize, sigops * 5)`.
|
||
- `cluster`: `CpfpCluster | null` — Cluster the seed belongs to: full tx list, SFL-linearized chunks, and the seed's chunk index. Omitted when the seed has no ancestors and no descendants (matches mempool.space).
|
||
|
||
### `Date`
|
||
|
||
`integer`
|
||
|
||
### `DifficultyAdjustment`
|
||
|
||
- `progressPercent`: `number` (required) — Progress through current difficulty epoch (0-100%)
|
||
- `difficultyChange`: `number` (required) — Estimated difficulty change at next retarget (%)
|
||
- `estimatedRetargetDate`: `integer` (required) — Estimated timestamp of next retarget (milliseconds)
|
||
- `remainingBlocks`: `integer` (required) — Blocks remaining until retarget
|
||
- `remainingTime`: `integer` (required) — Estimated time until retarget (milliseconds)
|
||
- `previousRetarget`: `number` (required) — Previous difficulty adjustment (%)
|
||
- `previousTime`: `Timestamp` (required) — Timestamp of most recent retarget (seconds)
|
||
- `nextRetargetHeight`: `Height` (required) — Height of next retarget
|
||
- `timeAvg`: `integer` (required) — Average block time in current epoch (milliseconds)
|
||
- `adjustedTimeAvg`: `integer` (required) — Time-adjusted average (milliseconds)
|
||
- `timeOffset`: `integer` (required) — Time offset from expected schedule (seconds)
|
||
- `expectedBlocks`: `number` (required) — Expected blocks based on wall clock time since epoch start
|
||
|
||
### `DifficultyEntry`
|
||
|
||
- `time`: `Timestamp` (required) — Unix timestamp of the difficulty adjustment
|
||
- `height`: `Height` (required) — Block height of the adjustment
|
||
- `difficulty`: `number` (required) — Difficulty value
|
||
- `adjustment`: `number` (required) — Adjustment ratio (new/previous, e.g. 1.068 = +6.8%)
|
||
|
||
### `DiskUsage`
|
||
|
||
- `brk`: `string` (required) — Human-readable brk data size (e.g., "48.8 GiB")
|
||
- `brk_bytes`: `integer` (required) — brk data size in bytes
|
||
- `bitcoin`: `string` (required) — Human-readable Bitcoin blocks directory size
|
||
- `bitcoin_bytes`: `integer` (required) — Bitcoin blocks directory size in bytes
|
||
- `ratio`: `number` (required) — brk as percentage of Bitcoin data
|
||
|
||
### `Dollars`
|
||
|
||
`number`
|
||
|
||
### `ExchangeRates`
|
||
|
||
`object`
|
||
|
||
### `FeeRate`
|
||
|
||
`number`
|
||
|
||
### `HashrateEntry`
|
||
|
||
- `timestamp`: `Timestamp` (required) — Unix timestamp
|
||
- `avgHashrate`: `integer` (required) — Average hashrate (H/s)
|
||
|
||
### `HashrateSummary`
|
||
|
||
- `hashrates`: `HashrateEntry[]` (required) — Historical hashrate data points
|
||
- `difficulty`: `DifficultyEntry[]` (required) — Historical difficulty adjustments
|
||
- `currentHashrate`: `integer` (required) — Current network hashrate (H/s)
|
||
- `currentDifficulty`: `number` (required) — Current network difficulty
|
||
|
||
### `Health`
|
||
|
||
- `status`: `string` (required) — Health status ("healthy")
|
||
- `service`: `string` (required) — Service name
|
||
- `version`: `string` (required) — Server version
|
||
- `timestamp`: `string` (required) — Current server time (ISO 8601)
|
||
- `started_at`: `string` (required) — Server start time (ISO 8601)
|
||
- `uptime_seconds`: `integer` (required) — Uptime in seconds
|
||
- `indexed_height`: `Height` (required) — Height of the last indexed block
|
||
- `computed_height`: `Height` (required) — Height of the last computed block (series)
|
||
- `tip_height`: `Height` (required) — Height of the chain tip (from Bitcoin node)
|
||
- `blocks_behind`: `Height` (required) — Number of blocks behind the tip
|
||
- `last_indexed_at`: `string` (required) — Human-readable timestamp of the last indexed block (ISO 8601)
|
||
- `last_indexed_at_unix`: `Timestamp` (required) — Unix timestamp of the last indexed block
|
||
|
||
### `Height`
|
||
|
||
`integer`
|
||
|
||
### `Hex`
|
||
|
||
`string`
|
||
|
||
### `HistoricalPrice`
|
||
|
||
- `prices`: `HistoricalPriceEntry[]` (required) — Price data points
|
||
- `exchangeRates`: `ExchangeRates` (required) — Exchange rates (currently empty)
|
||
|
||
### `HistoricalPriceEntry`
|
||
|
||
- `time`: `Timestamp` (required) — Unix timestamp
|
||
- `USD`: `Dollars` (required) — BTC/USD price
|
||
|
||
### `Index`
|
||
|
||
`minute10 | minute30 | hour1 | hour4 | hour12 | day1 | day3 | week1 | month1 | month3 | month6 | year1 | year10 | halving | epoch | height | tx_index | txin_index | txout_index | empty_output_index | op_return_index | p2a_addr_index | p2ms_output_index | p2pk33_addr_index | p2pk65_addr_index | p2pkh_addr_index | p2sh_addr_index | p2tr_addr_index | p2wpkh_addr_index | p2wsh_addr_index | unknown_output_index | funded_addr_index | empty_addr_index`
|
||
|
||
### `MempoolBlock`
|
||
|
||
- `blockSize`: `integer` (required) — Total serialized block size in bytes (witness + non-witness).
|
||
- `blockVSize`: `number` (required) — Total block virtual size in vbytes
|
||
- `nTx`: `integer` (required) — Number of transactions in the projected block
|
||
- `totalFees`: `Sats` (required) — Total fees in satoshis
|
||
- `medianFee`: `FeeRate` (required) — Median fee rate in sat/vB
|
||
- `feeRange`: `FeeRate[]` (required) — Fee rate range: [min, 10%, 25%, 50%, 75%, 90%, max]
|
||
|
||
### `MempoolInfo`
|
||
|
||
- `count`: `integer` (required) — Number of transactions in the mempool
|
||
- `vsize`: `VSize` (required) — Total virtual size of all transactions in the mempool (vbytes)
|
||
- `total_fee`: `Sats` (required) — Total fees of all transactions in the mempool (satoshis)
|
||
- `fee_histogram`: `object` (required) — Fee histogram: `[[fee_rate, vsize], ...]` sorted by descending fee rate
|
||
|
||
### `MerkleProof`
|
||
|
||
- `block_height`: `Height` (required) — Block height containing the transaction
|
||
- `merkle`: `string[]` (required) — Merkle proof path (hex-encoded hashes)
|
||
- `pos`: `integer` (required) — Transaction position in the block (0-indexed)
|
||
|
||
### `NextBlockHash`
|
||
|
||
`integer`
|
||
|
||
### `OutputType`
|
||
|
||
`p2pk | p2pk | p2pkh | multisig | p2sh | op_return | v0_p2wpkh | v0_p2wsh | v1_p2tr | p2a | empty | unknown`
|
||
|
||
### `PaginatedSeries`
|
||
|
||
- `current_page`: `integer` (required) — Current page number (0-indexed)
|
||
- `max_page`: `integer` (required) — Maximum valid page index (0-indexed)
|
||
- `total_count`: `integer` (required) — Total number of series
|
||
- `per_page`: `integer` (required) — Results per page
|
||
- `has_more`: `boolean` (required) — Whether more pages are available after the current one
|
||
- `series`: `string[]` (required) — List of series names
|
||
|
||
### `PoolBlockCounts`
|
||
|
||
- `all`: `integer` (required) — Total blocks mined (all time)
|
||
- `24h`: `integer` (required) — Blocks mined in last 24 hours
|
||
- `1w`: `integer` (required) — Blocks mined in last week
|
||
|
||
### `PoolBlockShares`
|
||
|
||
- `all`: `number` (required) — Share of all blocks (0.0 - 1.0)
|
||
- `24h`: `number` (required) — Share of blocks in last 24 hours (0.0 - 1.0)
|
||
- `1w`: `number` (required) — Share of blocks in last week (0.0 - 1.0)
|
||
|
||
### `PoolDetail`
|
||
|
||
- `pool`: `PoolDetailInfo` (required) — Pool information
|
||
- `blockCount`: `PoolBlockCounts` (required) — Block counts for different time periods
|
||
- `blockShare`: `PoolBlockShares` (required) — Pool's share of total blocks for different time periods
|
||
- `estimatedHashrate`: `integer` (required) — Estimated hashrate based on blocks mined (H/s)
|
||
- `reportedHashrate`: `object` — Self-reported hashrate (if available, H/s)
|
||
- `totalReward`: `Sats | null` — Total reward earned by this pool (sats, all time; None for minor pools)
|
||
|
||
### `PoolDetailInfo`
|
||
|
||
- `id`: `integer` (required) — Pool identifier
|
||
- `name`: `string` (required) — Pool name
|
||
- `link`: `string` (required) — Pool website URL
|
||
- `addresses`: `string[]` (required) — Known payout addresses
|
||
- `regexes`: `string[]` (required) — Coinbase tag patterns (regexes)
|
||
- `slug`: `PoolSlug` (required) — URL-friendly pool identifier
|
||
- `unique_id`: `integer` (required) — Unique pool identifier
|
||
|
||
### `PoolSlug`
|
||
|
||
`unknown | blockfills | ultimuspool | terrapool | luxor | 1thash | btccom | bitfarms | huobipool | wayicn | canoepool | btctop | bitcoincom | 175btc | gbminers | axbt | asicminer | bitminter | bitcoinrussia | btcserv | simplecoinus | btcguild | eligius | ozcoin | eclipsemc | maxbtc | triplemining | coinlab | 50btc | ghashio | stminingcorp | bitparking | mmpool | polmine | kncminer | bitalo | f2pool | hhtt | megabigpower | mtred | nmcbit | yourbtcnet | givemecoins | braiinspool | antpool | multicoinco | bcpoolio | cointerra | kanopool | solock | ckpool | nicehash | bitclub | bitcoinaffiliatenetwork | btcc | bwpool | exxbw | bitsolo | bitfury | 21inc | digitalbtc | 8baochi | mybtccoinpool | tbdice | hashpool | nexious | bravomining | hotpool | okexpool | bcmonster | 1hash | bixin | tatmaspool | viabtc | connectbtc | batpool | waterhole | dcexploration | dcex | btpool | 58coin | bitcoinindia | shawnp0wers | phashio | rigpool | haozhuzhu | 7pool | miningkings | hashbx | dpool | rawpool | haominer | helix | bitcoinukraine | poolin | secretsuperstar | tigerpoolnet | sigmapoolcom | okpooltop | hummerpool | tangpool | bytepool | spiderpool | novablock | miningcity | binancepool | minerium | lubiancom | okkong | aaopool | emcdpool | foundryusa | sbicrypto | arkpool | purebtccom | marapool | kucoinpool | entrustcharitypool | okminer | titan | pegapool | btcnuggets | cloudhashing | digitalxmintsy | telco214 | btcpoolparty | multipool | transactioncoinmining | btcdig | trickysbtcpool | btcmp | eobot | unomp | patels | gogreenlight | bitcoinindiapool | ekanembtc | canoe | tiger | 1m1x | zulupool | secpool | ocean | whitepool | wiz | wk057 | futurebitapollosolo | carbonnegative | portlandhodl | phoenix | neopool | maxipool | bitfufupool | gdpool | miningdutch | publicpool | miningsquared | innopolistech | btclab | parasite | redrockpool | est3lar | braiinssolo | solopoolcom | noderunners | dmnd`
|
||
|
||
### `PoolStats`
|
||
|
||
- `poolId`: `integer` (required) — Unique pool identifier
|
||
- `name`: `string` (required) — Pool name
|
||
- `link`: `string` (required) — Pool website URL
|
||
- `blockCount`: `integer` (required) — Number of blocks mined in the time period
|
||
- `rank`: `integer` (required) — Pool ranking by block count (1 = most blocks)
|
||
- `emptyBlocks`: `integer` (required) — Number of empty blocks mined
|
||
- `slug`: `PoolSlug` (required) — URL-friendly pool identifier
|
||
- `share`: `number` (required) — Pool's share of total blocks (0.0 - 1.0)
|
||
- `poolUniqueId`: `integer` (required) — Unique pool identifier
|
||
|
||
### `PoolsSummary`
|
||
|
||
- `pools`: `PoolStats[]` (required) — List of pools sorted by block count descending
|
||
- `blockCount`: `integer` (required) — Total blocks in the time period
|
||
- `lastEstimatedHashrate`: `integer` (required) — Estimated network hashrate (H/s)
|
||
- `lastEstimatedHashrate3d`: `integer` (required) — Estimated network hashrate over last 3 days (H/s)
|
||
- `lastEstimatedHashrate1w`: `integer` (required) — Estimated network hashrate over last 1 week (H/s)
|
||
|
||
### `Prices`
|
||
|
||
- `time`: `Timestamp` (required) — Unix timestamp
|
||
- `USD`: `Dollars` (required) — BTC/USD price
|
||
|
||
### `RawLockTime`
|
||
|
||
`integer`
|
||
|
||
### `RbfResponse`
|
||
|
||
- `replacements`: `ReplacementNode | null`
|
||
- `replaces`: `object`
|
||
|
||
### `RbfTx`
|
||
|
||
- `txid`: `Txid` (required)
|
||
- `fee`: `Sats` (required)
|
||
- `vsize`: `VSize` (required)
|
||
- `value`: `Sats` (required) — Sum of output amounts.
|
||
- `rate`: `FeeRate` (required)
|
||
- `time`: `Timestamp` (required)
|
||
- `rbf`: `boolean` (required) — BIP-125 signaling: at least one input has sequence < 0xffffffff-1.
|
||
- `fullRbf`: `object` — Only populated on the root `tx` of an RBF response. `true` iff this tx displaced at least one non-signaling predecessor.
|
||
|
||
### `RecommendedFees`
|
||
|
||
- `fastestFee`: `FeeRate` (required) — Fee rate for fastest confirmation (next block)
|
||
- `halfHourFee`: `FeeRate` (required) — Fee rate for confirmation within ~30 minutes (3 blocks)
|
||
- `hourFee`: `FeeRate` (required) — Fee rate for confirmation within ~1 hour (6 blocks)
|
||
- `economyFee`: `FeeRate` (required) — Fee rate for economical confirmation
|
||
- `minimumFee`: `FeeRate` (required) — Minimum relay fee rate
|
||
|
||
### `ReplacementNode`
|
||
|
||
- `tx`: `RbfTx` (required)
|
||
- `time`: `Timestamp` (required) — First-seen timestamp, duplicated here to match mempool.space's on-the-wire shape.
|
||
- `fullRbf`: `boolean` (required) — Any predecessor in this subtree was non-signaling.
|
||
- `interval`: `object` — Seconds between this node's `time` and the successor that replaced it. Omitted on the root of an RBF response.
|
||
- `mined`: `object` — `Some(true)` iff this node's tx is currently confirmed. Absent on serialization otherwise.
|
||
- `replaces`: `ReplacementNode[]` (required)
|
||
|
||
### `RewardStats`
|
||
|
||
- `startBlock`: `Height` (required) — First block in the range
|
||
- `endBlock`: `Height` (required) — Last block in the range
|
||
- `totalReward`: `Sats` (required) — Total coinbase rewards (subsidy + fees) in sats
|
||
- `totalFee`: `Sats` (required) — Total transaction fees in sats
|
||
- `totalTx`: `integer` (required) — Total number of transactions
|
||
|
||
### `Sats`
|
||
|
||
`integer`
|
||
|
||
### `SatsSigned`
|
||
|
||
`integer`
|
||
|
||
### `SeriesData`
|
||
|
||
- `version`: `Version` (required) — Version of the series data
|
||
- `index`: `Index` (required) — The index type used for this query
|
||
- `type`: `string` — Value type (e.g. "f32", "u64", "Sats")
|
||
- `start`: `integer` (required) — Start index (inclusive) of the returned range
|
||
- `end`: `integer` (required) — End index (exclusive) of the returned range
|
||
- `stamp`: `string` (required) — ISO 8601 timestamp of when the response was generated
|
||
- `data`: `object[]` (required) — The series data
|
||
|
||
### `SeriesInfo`
|
||
|
||
- `indexes`: `Index[]` (required) — Available indexes
|
||
- `type`: `string` (required) — Value type (e.g. "f32", "u64", "Sats")
|
||
|
||
### `SeriesLeafWithSchema`
|
||
|
||
- `name`: `string` (required) — The series name/identifier
|
||
- `kind`: `string` (required) — The Rust type (e.g., "Sats", "StoredF64")
|
||
- `indexes`: `Index[]` (required) — Available indexes for this series
|
||
- `type`: `string` (required) — JSON Schema type (e.g., "integer", "number", "string", "boolean", "array", "object")
|
||
|
||
### `SigOps`
|
||
|
||
`integer`
|
||
|
||
### `SyncStatus`
|
||
|
||
- `indexed_height`: `Height` (required) — Height of the last indexed block
|
||
- `computed_height`: `Height` (required) — Height of the last computed block (series)
|
||
- `tip_height`: `Height` (required) — Height of the chain tip (from Bitcoin node)
|
||
- `blocks_behind`: `Height` (required) — Number of blocks behind the tip
|
||
- `last_indexed_at`: `string` (required) — Human-readable timestamp of the last indexed block (ISO 8601)
|
||
- `last_indexed_at_unix`: `Timestamp` (required) — Unix timestamp of the last indexed block
|
||
|
||
### `Timestamp`
|
||
|
||
`integer`
|
||
|
||
### `Transaction`
|
||
|
||
- `index`: `TxIndex | null` — Internal transaction index (brk-specific, not in mempool.space)
|
||
- `txid`: `Txid` (required) — Transaction ID
|
||
- `version`: `TxVersionRaw` (required) — Transaction version (raw i32 from Bitcoin protocol, may contain non-standard values in coinbase txs)
|
||
- `locktime`: `RawLockTime` (required) — Transaction lock time
|
||
- `vin`: `TxIn[]` (required) — Transaction inputs
|
||
- `vout`: `TxOut[]` (required) — Transaction outputs
|
||
- `size`: `integer` (required) — Transaction size in bytes
|
||
- `weight`: `Weight` (required) — Transaction weight
|
||
- `sigops`: `SigOps` (required) — Number of signature operations
|
||
- `fee`: `Sats` (required) — Transaction fee in satoshis
|
||
- `status`: `TxStatus` (required) — Confirmation status (confirmed, block height/hash/time)
|
||
|
||
### `TreeNode`
|
||
|
||
`object | SeriesLeafWithSchema`
|
||
|
||
### `TxIn`
|
||
|
||
- `txid`: `Txid` (required) — Transaction ID of the output being spent
|
||
- `vout`: `Vout` (required) — Output index being spent (u16: coinbase is 65535, mempool.space uses u32: 4294967295)
|
||
- `prevout`: `TxOut | null` — Information about the previous output being spent
|
||
- `scriptsig`: `string` (required) — Signature script (hex, for non-SegWit inputs)
|
||
- `scriptsig_asm`: `string` (required) — Signature script in assembly format
|
||
- `witness`: `Witness` (required) — Witness data (stack items, present for SegWit inputs; hex-encoded on the wire)
|
||
- `is_coinbase`: `boolean` (required) — Whether this input is a coinbase (block reward) input
|
||
- `sequence`: `integer` (required) — Input sequence number
|
||
- `inner_redeemscript_asm`: `string` (required) — Inner redeemscript in assembly (for P2SH-wrapped SegWit: scriptsig + witness both present)
|
||
- `inner_witnessscript_asm`: `string` (required) — Inner witnessscript in assembly (for P2WSH: last witness item decoded as script)
|
||
|
||
### `TxIndex`
|
||
|
||
`integer`
|
||
|
||
### `TxOut`
|
||
|
||
- `scriptpubkey`: `string` (required) — Script pubkey (locking script)
|
||
- `value`: `Sats` (required) — Value of the output in satoshis
|
||
|
||
### `TxOutspend`
|
||
|
||
- `spent`: `boolean` (required) — Whether the output has been spent
|
||
- `txid`: `Txid | null` — Transaction ID of the spending transaction (only present if spent)
|
||
- `vin`: `Vin | null` — Input index in the spending transaction (only present if spent)
|
||
- `status`: `TxStatus | null` — Status of the spending transaction (only present if spent)
|
||
|
||
### `TxStatus`
|
||
|
||
- `confirmed`: `boolean` (required) — Whether the transaction is confirmed
|
||
- `block_height`: `Height | null` — Block height (only present if confirmed)
|
||
- `block_hash`: `BlockHash | null` — Block hash (only present if confirmed)
|
||
- `block_time`: `Timestamp | null` — Block timestamp (only present if confirmed)
|
||
|
||
### `TxVersionRaw`
|
||
|
||
`integer`
|
||
|
||
### `Txid`
|
||
|
||
`string`
|
||
|
||
### `TypeIndex`
|
||
|
||
`integer`
|
||
|
||
### `Urpd`
|
||
|
||
- `cohort`: `Cohort` (required)
|
||
- `date`: `Date` (required)
|
||
- `weight`: `UrpdWeight` (required) — Weighting applied to the source supply.
|
||
- `aggregation`: `UrpdAggregation` (required) — Aggregation strategy applied to the buckets.
|
||
- `close`: `Dollars` (required) — Close price on `date`, in USD. Anchor for `unrealized_pnl`.
|
||
- `total_supply`: `Bitcoin` (required) — Sum of `supply` across all buckets, in BTC.
|
||
- `buckets`: `UrpdBucket[]` (required)
|
||
|
||
### `UrpdAggregation`
|
||
|
||
`raw | lin200 | lin500 | lin1000 | log10 | log50 | log100 | log200 | log500 | log1000 | log2000`
|
||
|
||
### `UrpdBucket`
|
||
|
||
- `price_floor`: `Dollars` (required) — Lower bound of the bucket, in USD. Equals the exact realized price for `Raw`.
|
||
- `supply`: `Bitcoin` (required) — Supply held with a last-move price inside this bucket, in BTC.
|
||
- `realized_cap`: `Dollars` (required) — Realized cap contribution in USD: sum of `realized_price * supply` over the coins in this bucket.
|
||
- `unrealized_pnl`: `Dollars` (required) — Unrealized P&L in USD against the close on the snapshot date: `close * supply - realized_cap`. Can be negative.
|
||
|
||
### `UrpdWeight`
|
||
|
||
`raw | cointime | coinflow`
|
||
|
||
### `VSize`
|
||
|
||
`integer`
|
||
|
||
### `Version`
|
||
|
||
`integer`
|
||
|
||
### `Vin`
|
||
|
||
`integer`
|
||
|
||
### `Vout`
|
||
|
||
`integer`
|
||
|
||
### `Weight`
|
||
|
||
`integer`
|
||
|
||
### `Witness`
|
||
|
||
`string[]`
|