---
title: "Get XPUB or descriptor account details."
method: GET
path: "/api/v2/xpub/{xpub}"
tags: ["Accounts"]
---

# Get XPUB or descriptor account details.

`GET /api/v2/xpub/{xpub}`

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.

## Path parameters

- `xpub` string, required

## Query parameters

- `page` integer
- `pageSize` integer
- `from` integer
- `to` integer
- `details` 'basic' | 'tokens' | 'tokenBalances' | 'txids' | 'txslight' | 'txs'
- `tokens` 'nonzero' | 'used' | 'derived'
- `filter` union
  - 'inputs' | 'outputs'
  - integer
- `contract` string
- `protocols` string[]
- `secondary` string
- `gap` integer

## Response `200`

XPUB/descriptor account details.

- Address
  - `page` integer
  - `totalPages` integer
  - `itemsOnPage` integer
  - `address` string, required
  - `balance` string — Integer amount in the lowest chain denomination, encoded as a string.
  - `totalReceived` string — Integer amount in the lowest chain denomination, encoded as a string.
  - `totalSent` string — Integer amount in the lowest chain denomination, encoded as a string.
  - `unconfirmedBalance` string — Integer amount in the lowest chain denomination, encoded as a string.
  - `unconfirmedTxs` integer, required
  - `unconfirmedSending` string — Integer amount in the lowest chain denomination, encoded as a string.
  - `unconfirmedReceiving` string — Integer amount in the lowest chain denomination, encoded as a string.
  - `txs` integer, required
  - `addrTxCount` integer
  - `nonTokenTxs` integer
  - `internalTxs` integer
  - `transactions` Tx[]
    - `txid` string, required
    - `version` integer
    - `lockTime` integer
    - `vin` Vin[], required
      - `txid` string
      - `vout` integer
      - `sequence` integer
      - `n` integer, required
      - `addresses` string[]
      - `isAddress` boolean, required
      - `isOwn` boolean
      - `value` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `hex` string
      - `asm` string
      - `coinbase` string
    - `vout` Vout[], required
      - `value` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `n` integer, required
      - `spent` boolean
      - `spentTxId` string
      - `spentIndex` integer
      - `spentHeight` integer
      - `hex` string
      - `asm` string
      - `addresses` string[], nullable, required
      - `isAddress` boolean, required
      - `isOwn` boolean
      - `type` string
    - `blockHash` string
    - `blockHeight` integer, required — -1 for unconfirmed transactions.
    - `confirmations` integer, required
    - `confirmationETABlocks` integer
    - `confirmationETASeconds` integer
    - `blockTime` integer, required
    - `size` integer
    - `vsize` integer
    - `value` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `valueIn` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `fees` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `hex` string
    - `rbf` boolean
    - `coinSpecificData` unknown
    - `chainExtraData` TxChainExtraData
      - `payloadType` string, required — Discriminator for normalized chain-specific payloads, for example tron.
      - `payload` unknown
    - `tokenTransfers` TokenTransfer[]
      - `type` '' | 'XPUBAddress' | 'ERC20' | 'ERC721' | 'ERC1155' | 'BEP20' | 'BEP721' | 'BEP1155' | 'TRC20' | 'TRC721' | 'TRC1155', required — Token standard name. Empty string means no token standard is known.
      - `standard` '' | 'XPUBAddress' | 'ERC20' | 'ERC721' | 'ERC1155' | 'BEP20' | 'BEP721' | 'BEP1155' | 'TRC20' | 'TRC721' | 'TRC1155', required — Token standard name. Empty string means no token standard is known.
      - `from` string, required
      - `to` string, required
      - `contract` string, required
      - `name` string
      - `symbol` string
      - `decimals` integer, required
      - `value` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `multiTokenValues` MultiTokenValue[]
        - `id` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `value` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `ethereumSpecific` EthereumSpecific
      - `type` integer
      - `createdContract` string
      - `status` integer, required — 1 success, 0 failed, -1 pending.
      - `error` string
      - `nonce` integer, required
      - `gasLimit` integer
      - `gasUsed` integer
      - `gasPrice` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `effectiveGasPrice` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `maxPriorityFeePerGas` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `maxFeePerGas` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `baseFeePerGas` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `l1Fee` integer
      - `l1FeeScalar` string
      - `l1GasPrice` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `l1GasUsed` integer
      - `data` string
      - `parsedData` EthereumParsedInputData
        - `methodId` string, required — First 4 bytes of the input data.
        - `name` string, required — Parsed function name when recognized.
        - `function` string — Full function signature when recognized.
        - `params` EthereumParsedInputParam[]
          - `type` string, required
          - `values` string[]
      - `internalTransfers` EthereumInternalTransfer[]
        - `type` integer, required
        - `from` string, required
        - `to` string, required
        - `value` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `addressAliases` AddressAliases
  - `txids` string[]
  - `nonce` string
  - `confirmedNonce` string
  - `usedTokens` integer
  - `tokens` Token[]
    - `type` '' | 'XPUBAddress' | 'ERC20' | 'ERC721' | 'ERC1155' | 'BEP20' | 'BEP721' | 'BEP1155' | 'TRC20' | 'TRC721' | 'TRC1155', required — Token standard name. Empty string means no token standard is known.
    - `standard` '' | 'XPUBAddress' | 'ERC20' | 'ERC721' | 'ERC1155' | 'BEP20' | 'BEP721' | 'BEP1155' | 'TRC20' | 'TRC721' | 'TRC1155', required — Token standard name. Empty string means no token standard is known.
    - `name` string, required
    - `path` string
    - `contract` string
    - `transfers` integer, required
    - `symbol` string
    - `decimals` integer, required
    - `balance` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `baseValue` number
    - `secondaryValue` number
    - `ids` AmountString[]
    - `multiTokenValues` MultiTokenValue[]
      - `id` string — Integer amount in the lowest chain denomination, encoded as a string.
      - `value` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `totalReceived` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `totalSent` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `protocols` string[] — Indexed protocol identifiers such as erc4626.
  - `secondaryValue` number
  - `tokensBaseValue` number
  - `tokensSecondaryValue` number
  - `totalBaseValue` number
  - `totalSecondaryValue` number
  - `contractInfo` ContractInfoResult
    - `type` '' | 'XPUBAddress' | 'ERC20' | 'ERC721' | 'ERC1155' | 'BEP20' | 'BEP721' | 'BEP1155' | 'TRC20' | 'TRC721' | 'TRC1155', required — Token standard name. Empty string means no token standard is known.
    - `standard` '' | 'XPUBAddress' | 'ERC20' | 'ERC721' | 'ERC1155' | 'BEP20' | 'BEP721' | 'BEP1155' | 'TRC20' | 'TRC721' | 'TRC1155', required — Token standard name. Empty string means no token standard is known.
    - `contract` string, required
    - `name` string, required
    - `symbol` string, required
    - `decimals` integer, required
    - `createdInBlock` integer
    - `destructedInBlock` integer
    - `rates` ContractInfoRates
      - `baseRate` number
      - `currency` string
      - `secondaryRate` number
    - `protocols` ContractInfoProtocols
      - `erc4626` Erc4626Token
        - `asset` Erc4626TokenMetadata
          - `contract` string, required
          - `name` string
          - `symbol` string
          - `decimals` integer, required
        - `share` Erc4626TokenMetadata
          - `contract` string, required
          - `name` string
          - `symbol` string
          - `decimals` integer, required
        - `totalAssets` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `convertToAssets1Share` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `convertToShares1Asset` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `previewDeposit1Asset` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `previewRedeem1Share` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `error` string
    - `blockHeight` integer, required
  - `erc20Contract` ContractInfoResult
    - `type` '' | 'XPUBAddress' | 'ERC20' | 'ERC721' | 'ERC1155' | 'BEP20' | 'BEP721' | 'BEP1155' | 'TRC20' | 'TRC721' | 'TRC1155', required — Token standard name. Empty string means no token standard is known.
    - `standard` '' | 'XPUBAddress' | 'ERC20' | 'ERC721' | 'ERC1155' | 'BEP20' | 'BEP721' | 'BEP1155' | 'TRC20' | 'TRC721' | 'TRC1155', required — Token standard name. Empty string means no token standard is known.
    - `contract` string, required
    - `name` string, required
    - `symbol` string, required
    - `decimals` integer, required
    - `createdInBlock` integer
    - `destructedInBlock` integer
    - `rates` ContractInfoRates
      - `baseRate` number
      - `currency` string
      - `secondaryRate` number
    - `protocols` ContractInfoProtocols
      - `erc4626` Erc4626Token
        - `asset` Erc4626TokenMetadata
          - `contract` string, required
          - `name` string
          - `symbol` string
          - `decimals` integer, required
        - `share` Erc4626TokenMetadata
          - `contract` string, required
          - `name` string
          - `symbol` string
          - `decimals` integer, required
        - `totalAssets` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `convertToAssets1Share` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `convertToShares1Asset` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `previewDeposit1Asset` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `previewRedeem1Share` string — Integer amount in the lowest chain denomination, encoded as a string.
        - `error` string
    - `blockHeight` integer, required
  - `addressAliases` AddressAliases
  - `stakingPools` StakingPool[]
    - `contract` string, required
    - `name` string, required
    - `pendingBalance` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `pendingDepositedBalance` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `depositedBalance` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `withdrawTotalAmount` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `claimableAmount` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `restakedReward` string — Integer amount in the lowest chain denomination, encoded as a string.
    - `autocompoundBalance` string — Integer amount in the lowest chain denomination, encoded as a string.
  - `chainExtraData` AccountChainExtraData
    - `payloadType` string, required
    - `payload` unknown

## Other responses

- `default` — Public API error. Public validation errors are HTTP 400; internal errors are HTTP 500.

## Changes

- **2026-07-22** `aef157c19369` — 1 info
  - added the optional property `transactions/items/ethereumSpecific/effectiveGasPrice` to the response with the `200` status
- **2026-06-21** `b72e9a46af25` — 2 info
  - the response property `tokens/items/decimals` became required for the status `200`
  - the response property `transactions/items/tokenTransfers/items/decimals` became required for the status `200`
- **2026-06-15** `a62ee268399c` — 1 info
  - added the optional property `confirmedNonce` to the response with the `200` status
- **2026-05-26** `0ff90309c70d` — 1 breaking
  - response property `transactions/items/vout/items/addresses` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
- **2026-05-25** `4fca91df0bb0` — 2 breaking, 1 warning, 1 info
  - the response property `tokens/items/decimals` became optional for the status `200`
  - the response property `transactions/items/tokenTransfers/items/decimals` became optional for the status `200`
  - removed the optional property `confirmedNonce` from the response with the `200` status
  - response property `transactions/items/vout/items/addresses` list-of-types was narrowed by removing types `null` from media type `application/json` of response `200`

[Change history](https://skmtc.dev/trezor/apis/blockbook-api/changes/api/v2/xpub/:xpub/get.md)

---

[API](https://skmtc.dev/trezor/apis/blockbook-api.md) · [All operations](https://skmtc.dev/trezor/apis/blockbook-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trezor/blockbook-api/revisions/01c375da86bc/schema)
