Skip to main content

bb_getxpub RPC Method

Get balances and transactions of an xpub or output descriptor.

Updated on
Oct 4, 2023

bb_getxpub RPC Method

Please note that this RPC method requires the Blockbook RPC add-on enabled on your QuickNode endpoint.

Parameters

address
string
REQUIRED
Typically a Bitcoin address; xpub will not work.
object
array
The options object with the following fields:
page
integer
The page you would like to retrieve.
size
integer
The number of transactions you would like on each page
fromHeight
integer
Filter of the returned transactions from block height
toHeight
integer
Filter of the returned transactions to block height
details
string
Must be one of: basic|txids|txs
secondary
string
The secondary (fiat) currency in which the token and total balances are returned in addition to crypto values. Must be one of: usd|eur

Returns

page
The page number returned in this response.
totalPages
The number of pages available for your original query
itemsOnPage
The maximum number of transactions returned in this response
address
The address you provided in the original query.
balance
The current balance of the address using confirmed unspent transaction outputs only, denominated in satoshis.Balance is updated after 1 confirmation.
totalReceived
The total value received for the address using confirmed transactions only, denominated in satoshis.
totalSent
The total value sent for the address using confirmed transactions only, denominated in satoshis.
unconfirmedBalance
The current balance of the address using unconfirmed unspent transaction outputs only, denominated in satoshis.
unconfirmedTxs
The current number of unconfirmed transactions for this address.
txs
The total number of transactions for this address.
txids
(only appears when details is set to txids) An array of transaction ids for the provided address.
txid
The transaction id
transactions
(only appears when details is set to txs) An array of transactions for the provided address.
txid
The transaction id
version
The transaction version (1 or 2)
lockTime
The earliest time a transaction could have been mined into a block.
vin
An array of transaction objects used as inputs for the current transaction
txid
The transaction id
vout
The output index
sequence
The transaction sequence
n
The nonce of this transaction
addresses
An array of addresses in this transaction
isAddress
Boolean value of whether there is an address or not
isOwn
Boolean value of whether the transaction is from the original address provided
value
The value of this transaction in satoshis
vout
An array of output transaction objects for the current transaction
value
The value of this transaction in satoshis
n
The nonce of this transaction
hex
The raw hexadecimal representation of the transaction
spent
Boolean value of whether the transaction has been spent
addresses
An array of addresses in this transaction
isAddress
Boolean value of whether there is an address or not
blockHash
The hash of the block at which the transaction was included
height
The block height at which the transaction output was created
confirmations
The number of confirmations since this transaction was included in a block
blockTime
The unix timestamp of when the block was confirmed
size
The size of the transaction in bytes
vsize
The virtual size of the transaction in bytes (read more)
value
The total value of the transaction in satoshis
valueIn
The value transmitted in the transaction less fees denominated in satoshis
fees
The fees for the transaction denominated in satoshis
hex
The raw hexadecimal representation of the transaction
Request
1
curl https://docs-demo.btc.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method": "bb_getxpub", "params": ["pkh(xpub6CHDY3wJJsbnhbC6wFFkNHucUjwJCU2gH2BAY5bsgoq5hGk8xn6WH1imNm9b6faoPBmTuhFS8hu8njbpmHdA3NAnxDnEdNvxzSwvvbgm8uw)", {"page": 1, "size": 1000, "fromHeight": 0, "details": "txids"}]}'
5
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free