Get xpub

Returns balances and transactions of an xpub or output descriptor, applicable only for Bitcoin-type coins.

This method will use 10 Compute Units.


Reference: Here

GET /api/v2/xpub/<xpub|descriptor>[?page=<page>&pageSize=<size>&from=<block height>&to=<block height>&details=<basic|tokens|tokenBalances|txids|txs>&tokens=<nonzero|used|derived>&secondary=eur]

Parameters

Required parameters

xpub OR descriptor- string, required.

Optional parameters

  • page: specifies page of returned transactions, starting from 1. If out of range, Blockbook returns the closest possible page.

  • pageSize: number of transactions returned by call (default and maximum 1000)

  • from, to: filter of the returned transactions from block height to block height (default no filter)

  • details: specifies level of details returned by request (default txids)

    • basic: return only xpub balances, without any derived addresses and transactions

    • tokens: basic + tokens (addresses) derived from the xpub, subject to tokens parameter

    • tokenBalances: basic + tokens (addresses) derived from the xpub with balances, subject to tokens parameter

    • txids: tokenBalances + list of txids, subject to from, to filter and paging

    • txs: tokenBalances + list of transaction with details, subject to from, to filter and paging

  • tokens: specifies what tokens (xpub addresses) are returned by the request (default nonzero)

    • nonzero: return only addresses with nonzero balance

    • used: return addresses with at least one transaction

    • derived: return all derived addresses

  • secondary: specifies secondary (fiat) currency in which the token and total balances are returned in addition to crypto values

Returns

Example response

Last updated

Was this helpful?