Skip to main content

GET /api/v2/xpub/{xpub} - Blockbook REST API

Returns balances and transactions for an XPUB or output descriptor via the Blockbook REST API.

Updated on
Aug 09, 2026
Please note that this REST method requires the Bitcoin Blockbook enabled on your Quicknode endpoint.

Path Parameters

xpub
string
REQUIRED

An extended public key, or an output descriptor wrapping one. Supported descriptor forms: pkh(...), wpkh(...), sh(wpkh(...)), and tr(...). Must be an account-level key, not a master key. Example: tr(xpub...). URL-encode the descriptor when placing it in the REST path.

Descriptors containing a / are not supported and return an error.

This includes:

  • key origin prefixes: tr([73c5da0a/86'/0'/0']xpub...)
  • multipath selectors: tr(xpub.../<0;1>/*)
  • explicit branch paths: tr(xpub.../0/*)

Percent-encoding the slash does not help. Note the origin prefix cannot be shortened either, since it contains slashes of its own.

Use the bare form instead - tr(xpub...) - which is fully supported. The branch selector is unnecessary: Blockbook automatically scans both the receive (0) and change (1) branches for the account.

Query Parameters

page
integer

The page number to retrieve for paginated results.

size
integer

The number of transactions per page.

fromHeight
integer

Filter transactions from this block height (inclusive).

details
string

Level of detail for returned transactions. Must be one of: basic, txids, or txs.

filter
string

Filter transactions by token. Provide a token's contract address, or 0 to return only transactions with no token transfers.

contract
string

Limit returned token balances and transactions to the specified token contract address.

protocols
string

Comma-separated list of token protocols to include (for example erc20).

gap
integer

The gap limit used when deriving addresses from an extended public key (xpub). Defaults to 20.

Returns

page
integer

Current page number

totalPages
integer

Total number of pages

itemsOnPage
integer

Number of items on each page

address
string

The queried xpub key

balance
string

Current confirmed balance in satoshis

totalReceived
string

Total amount received in satoshis

totalSent
string

Total amount sent in satoshis

unconfirmedBalance
string

Unconfirmed balance in satoshis

unconfirmedTxs
integer

Number of unconfirmed transactions

txs
integer

Total number of transactions

txids
array

List of transaction IDs

tokens
array

Derived addresses from the xpub

type
string

Token type (e.g., XPUBAddress)

name
string

Derived address

path
string

BIP32 derivation path

transfers
integer

Number of transfers for this address

decimals
integer

Decimal places

balance
string

Balance of this derived address

totalReceived
string

Total received by this derived address

totalSent
string

Total sent from this derived address

Request
Response
1
{
2
"page": 1,
3
"totalPages": 1,
4
"itemsOnPage": 1000,
5
"address": "xpub...",
6
"balance": "0",
7
"totalReceived": "0",
8
"totalSent": "0",
9
"unconfirmedBalance": "0",
10
"unconfirmedTxs": 0,
11
"txs": 0,
12
"tokens": []
13
}
1
{
2
"page": 1,
3
"totalPages": 1,
4
"itemsOnPage": 1000,
5
"address": "xpub...",
6
"balance": "0",
7
"totalReceived": "0",
8
"totalSent": "0",
9
"unconfirmedBalance": "0",
10
"unconfirmedTxs": 0,
11
"txs": 0,
12
"tokens": []
13
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free