api/v2/address - Dogecoin

This endpoint returns balance and transaction data for a single Dogecoin address. The details query parameter controls how much data is returned, from a balance-only summary to full transaction objects.

Parameters

ParameterTypeLocationRequiredDescription
addressstringpathYesThe Dogecoin address to query
pageintegerqueryNo1-based page index for transaction history. Default 1
pageSizeintegerqueryNoHistory items per page. Default and maximum is 1000
fromintegerqueryNoFirst block height to include when filtering history
tointegerqueryNoLast block height to include when filtering history
detailsstringqueryNoDetail level: basic, txids, txslight, or txs. Default txids
secondarystringqueryNoSecondary fiat currency code for converted values

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/address/DRv9o4XUK1DhNiuKPadPwkQNkPgtcniBFF?page=1&pageSize=1000&details=txids'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/address/DRv9o4XUK1DhNiuKPadPwkQNkPgtcniBFF?page=1&pageSize=1000&details=txids'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/address/DRv9o4XUK1DhNiuKPadPwkQNkPgtcniBFF?page=1&pageSize=1000&details=txids')

print(response.json())

Response

json{
    "page": 1,
    "totalPages": 27,
    "itemsOnPage": 1000,
    "address": "DRv9o4XUK1DhNiuKPadPwkQNkPgtcniBFF",
    "balance": "1105234012375840",
    "totalReceived": "1631025972011211333",
    "totalSent": "1629920737998835493",
    "unconfirmedBalance": "0",
    "unconfirmedTxs": 0,
    "txs": 26270,
    "txids": [
        "4c5519699240ed1f23e1ec46ea4bc85f019982f6ef48afdb7698054230a4b76e",
        "8d99a37f27d702b35bcc74dfea0d1a006a67c20571e1de660a30defc16316c8f",
        "c24352909b6f21aff2d499add3858a6d3521a56a30fdba1e085a92ecb85c9205"
    ]
}

Response Parameters

FieldTypeDescription
addressstringThe queried address
balancestringConfirmed balance in koinu
totalReceivedstringTotal received in koinu
totalSentstringTotal sent in koinu
unconfirmedBalancestringUnconfirmed balance in koinu
unconfirmedTxsintegerNumber of unconfirmed transactions
txsintegerNumber of confirmed transactions
txidsarrayTransaction ids, present when details is txids
transactionsarrayFull transaction objects, present when details is txs

Amounts are in koinu, the Dogecoin base unit, at 1e-8 DOGE. Values are large in absolute terms: the balance above is roughly 11.05 million DOGE. Use an integer or decimal type wide enough to hold them; a 32-bit integer will overflow.

Use Cases

  • Balance Display: Show the confirmed and unconfirmed balance of an address
  • History Pages: Page through an address's transaction ids or full transactions
  • Payment Detection: Detect incoming payments by watching an address balance
  • Accounting: Read total received and sent for bookkeeping

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