api/v2/xpub - Dogecoin

This endpoint returns wallet-level balance and transaction data for an extended public key or output descriptor. Blockbook derives the addresses from the key and returns the combined result, so each address does not have to be tracked separately.

Dogecoin derives at BIP44 coin type 3, so its account paths read m/44'/3'/0'/....

Parameters

ParameterTypeLocationRequiredDescription
xpubstringpathYesExtended public key or supported output descriptor. URL-encode descriptors
detailsstringqueryNoDetail level: basic, tokens, tokenBalances, txids, txslight, or txs
tokensstringqueryNoWhich derived addresses to include: nonzero, used, or derived. Default nonzero
pageintegerqueryNo1-based page index for transaction history
pageSizeintegerqueryNoHistory items per page. Default and maximum is 1000
gapintegerqueryNoDerivation gap limit, capped by the server

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/xpub/<XPUB>?details=tokens&tokens=used'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/xpub/<XPUB>?details=tokens&tokens=used'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/xpub/<XPUB>?details=tokens&tokens=used')

print(response.json())

Response

json{
    "address": "<XPUB>",
    "balance": "1105234012375840",
    "totalReceived": "1631025972011211333",
    "totalSent": "1629920737998835493",
    "unconfirmedBalance": "0",
    "unconfirmedTxs": 0,
    "txs": 26270,
    "usedTokens": 2,
    "tokens": [
        {
            "type": "XPUBAddress",
            "standard": "XPUBAddress",
            "name": "DRv9o4XUK1DhNiuKPadPwkQNkPgtcniBFF",
            "path": "m/44'/3'/0'/0/0",
            "transfers": 26270,
            "decimals": 8
        }
    ]
}

Response Parameters

FieldTypeDescription
addressstringThe queried extended public key or descriptor
balancestringCombined confirmed balance of the wallet in koinu
totalReceivedstringCombined total received in koinu
totalSentstringCombined total sent in koinu
txsintegerNumber of transactions across the derived addresses
usedTokensintegerTotal number of used derived addresses
tokensarrayDerived address rows, each with its own path and transfer count
tokens[].namestringThe derived address
tokens[].pathstringBIP32 derivation path of that address

The response above is illustrative: it shows the shape returned for a wallet with history, using real figures from the address it derives. It was not captured from a live Dogecoin xpub query.

The endpoint accepts any well-formed extended public key, but returns a zeroed account for one that has never been used on Dogecoin. Substitute an xpub from a Dogecoin wallet to see real values. usedTokens always reports the total number of used addresses regardless of the tokens filter.

Use Cases

  • Wallet Balances: Read a whole wallet in one call instead of per address
  • History Aggregation: Collect transactions across every derived address
  • Address Discovery: List which derived addresses have been used
  • Accounting: Reconcile wallet-level totals

Error Handling

HTTP StatusMessageDescription
400Bad requestA path or query parameter is malformed
403ForbiddenMissing or invalid ACCESS-TOKEN
404Not foundNo indexed data exists for the request
500Internal errorThe indexer failed to process the request