api/v2/balancehistory - Dogecoin

This endpoint returns aggregated balance-change history for an address, extended public key, or descriptor over a time range, optionally with fiat rates for each interval.

Parameters

ParameterTypeLocationRequiredDescription
addressstringpathYesAddress, extended public key, or descriptor
fromintegerqueryNoUnix timestamp lower bound
tointegerqueryNoUnix timestamp upper bound
fiatcurrencystringqueryNoFiat currency code to include in rates
groupByintegerqueryNoAggregation interval in seconds. Default 3600
gapintegerqueryNoDerivation gap limit for xpub inputs

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/balancehistory/DRv9o4XUK1DhNiuKPadPwkQNkPgtcniBFF?from=1789600000&to=1789710000&fiatcurrency=usd'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/balancehistory/DRv9o4XUK1DhNiuKPadPwkQNkPgtcniBFF?from=1789600000&to=1789710000&fiatcurrency=usd'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/balancehistory/DRv9o4XUK1DhNiuKPadPwkQNkPgtcniBFF?from=1789600000&to=1789710000&fiatcurrency=usd')

print(response.json())

Response

json[
    {
        "time": 1789599600,
        "txs": 18,
        "received": "3550876310328800",
        "sent": "3569084648638027",
        "sentToSelf": "3550791208486688",
        "rates": {
            "usd": 0.079924904
        }
    },
    {
        "time": 1789603200,
        "txs": 15,
        "received": "4089740795865158",
        "sent": "4107600440042183",
        "sentToSelf": "4089289168264050",
        "rates": {
            "usd": 0.083795
        }
    }
]

Response Parameters

FieldTypeDescription
timeintegerStart of the interval as a Unix timestamp
txsintegerNumber of transactions in the interval
receivedstringTotal received in the interval, in koinu
sentstringTotal sent in the interval, in koinu
sentToSelfstringAmount sent from the account back to itself, in koinu
ratesobjectFiat rates for the interval, keyed by currency code

The array is truncated above. With groupBy left at its 3600-second default, the documented range returns 30 hourly points.

Note how close sentToSelf is to received on this account: most of what it appears to receive is its own change returning. Subtract sentToSelf before treating received as incoming value, or an exchange hot wallet will look many times busier than it is.

Use Cases

  • Portfolio Charts: Plot balance movement over time
  • Fiat Valuation: Value historical movements at the rate of the day
  • Tax Reporting: Summarize inflow and outflow across a period
  • Activity Summaries: Show how active an account was per interval

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