v11

latestOpenAPI 3.1.0AGPL-3.0-onlyraw.githubusercontent.com2026-08-01307390.9 KB
Accounts

Get XPUB or descriptor account details.

Returns balances and transactions of an XPUB or output descriptor for Bitcoin-type coins. Transactions are sorted by block height with newest blocks first. URL-encode descriptors before placing them after /xpub/.

Blockbook expects XPUBs at level 3 of the derivation path, for example m/purpose'/coin_type'/account'. It derives the remaining change/address_index path. The BIP scheme is inferred from the XPUB prefix; unknown prefixes default to BIP44.

Supported descriptors are pkh(xpub), sh(wpkh(xpub)), wpkh(xpub), and tr(xpub). Descriptors can include origin paths and change selectors such as <0;1> or {0,1}; when change is omitted, Blockbook defaults to <0;1>.

Note: usedTokens always reports the total number of used addresses for the XPUB, regardless of the tokens query filter.

Load estimate: High for broad accounts; grows with derived addresses, gap, used address count, pageSize, transaction history, token rows, and protocol enrichment.

get/api/v2/xpub/{xpub}

Path parameters

xpubstring required

XPUB or supported descriptor.

Query parameters

pageinteger

1-based page index. Values outside safe bounds are sanitized to the closest possible page.

pageSizeinteger

Number of history items per page. The default and maximum for REST account endpoints is 1000.

frominteger

First block height included in account transaction filtering.

tointeger

Last block height included in account transaction filtering.

details'basic' | 'tokens' | 'tokenBalances' | 'txids' | 'txslight' | 'txs'

Controls how much account data is returned. basic returns balances and counts only. tokens adds known token rows. tokenBalances returns token rows with balances. txids adds paged transaction ids. txslight adds limited transaction details from the index. txs adds full transaction details.

tokens'nonzero' | 'used' | 'derived'

Controls which XPUB-derived address rows are included: nonzero returns only addresses with nonzero balance, used returns addresses with at least one transaction, and derived returns all derived addresses.

'inputs' | 'outputs'
OR
integer

Filter account history by input/output side, or by numeric token/internal filter id.

contractstring

Contract address used to filter token data.

protocolsstring[]

Optional protocol enrichments, comma-separated or repeated. Currently supported value: erc4626. Unknown values are rejected.

[
  "erc4626"
]
secondarystring
Example:usd

Secondary currency code used to populate fiat values.

gapinteger

XPUB/address derivation gap limit. Values are capped by the server.

Response

XPUB/descriptor account details.

pageinteger
totalPagesinteger
itemsOnPageinteger
addressstring required
balancestring

Integer amount in the lowest chain denomination, encoded as a string.

totalReceivedstring

Integer amount in the lowest chain denomination, encoded as a string.

totalSentstring

Integer amount in the lowest chain denomination, encoded as a string.

unconfirmedBalancestring

Integer amount in the lowest chain denomination, encoded as a string.

unconfirmedTxsinteger required
unconfirmedSendingstring

Integer amount in the lowest chain denomination, encoded as a string.

unconfirmedReceivingstring

Integer amount in the lowest chain denomination, encoded as a string.

txsinteger required
addrTxCountinteger
nonTokenTxsinteger
internalTxsinteger
txidsstring[]
noncestring
confirmedNoncestring
usedTokensinteger
secondaryValuenumber
tokensBaseValuenumber
tokensSecondaryValuenumber
totalBaseValuenumber
totalSecondaryValuenumber
addressAliasesAddressAliases

Example response

{
  "balance": "100000000",
  "totalReceived": "100000000",
  "totalSent": "100000000",
  "unconfirmedBalance": "100000000",
  "unconfirmedSending": "100000000",
  "unconfirmedReceiving": "100000000",
  "transactions": [
    {
      "vin": [
        {
          "value": "100000000"
        }
      ],
      "vout": [
        {
          "value": "100000000"
        }
      ],
      "value": "100000000",
      "valueIn": "100000000",
      "fees": "100000000",
      "tokenTransfers": [
        {
          "value": "100000000",
          "multiTokenValues": [
            {
              "id": "100000000",
              "value": "100000000"
            }
          ]
        }
      ],
      "ethereumSpecific": {
        "gasPrice": "100000000",
        "effectiveGasPrice": "100000000",
        "maxPriorityFeePerGas": "100000000",
        "maxFeePerGas": "100000000",
        "baseFeePerGas": "100000000",
        "l1GasPrice": "100000000",
        "internalTransfers": [
          {
            "value": "100000000"
          }
        ]
      }
    }
  ],
  "tokens": [
    {
      "balance": "100000000",
      "ids": [
        "100000000"
      ],
      "multiTokenValues": [
        {
          "id": "100000000",
          "value": "100000000"
        }
      ],
      "totalReceived": "100000000",
      "totalSent": "100000000"
    }
  ],
  "contractInfo": {
    "protocols": {
      "erc4626": {
        "totalAssets": "100000000",
        "convertToAssets1Share": "100000000",
        "convertToShares1Asset": "100000000",
        "previewDeposit1Asset": "100000000",
        "previewRedeem1Share": "100000000"
      }
    }
  },
  "erc20Contract": {
    "protocols": {
      "erc4626": {
        "totalAssets": "100000000",
        "convertToAssets1Share": "100000000",
        "convertToShares1Asset": "100000000",
        "previewDeposit1Asset": "100000000",
        "previewRedeem1Share": "100000000"
      }
    }
  },
  "stakingPools": [
    {
      "pendingBalance": "100000000",
      "pendingDepositedBalance": "100000000",
      "depositedBalance": "100000000",
      "withdrawTotalAmount": "100000000",
      "claimableAmount": "100000000",
      "restakedReward": "100000000",
      "autocompoundBalance": "100000000"
    }
  ]
}