api/v2/address - Litecoin

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

Parameters

ParameterTypeLocationRequiredDescription
addressstringpathYesThe Litecoin address to query. Legacy, P2SH, and bech32 (ltc1) formats are all accepted
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/LMRmNEdhi5F43vtW5qPdv1q9s7xsMp4XK5?page=1&pageSize=1000&details=txids'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/address/LMRmNEdhi5F43vtW5qPdv1q9s7xsMp4XK5?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/LMRmNEdhi5F43vtW5qPdv1q9s7xsMp4XK5?page=1&pageSize=1000&details=txids')

print(response.json())

Response

json{
    "page": 1,
    "totalPages": 1,
    "itemsOnPage": 1000,
    "address": "LMRmNEdhi5F43vtW5qPdv1q9s7xsMp4XK5",
    "balance": "111286503113",
    "totalReceived": "350564914665",
    "totalSent": "239278411552",
    "unconfirmedBalance": "0",
    "unconfirmedTxs": 0,
    "txs": 152,
    "txids": [
        "51a31c4236a99bfd17cda606f079c9c4814851119e7593ab7c739bd5972b1969",
        "4c3d9548bb03a42551c10f2472e99cd86776ed00fd3bfb530c4466b93e7ddac7",
        "edf101ff2a75f99bedafd3ddb046a47b33aa1f0e714d1f4e884e5eb84cd661a3"
    ]
}

Response Parameters

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

At details=basic the mempool figures are not aggregated: unconfirmedBalance is omitted and unconfirmedTxs reports the raw mempool index size. Use txids or higher when pending amounts matter.

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 requestThe address is malformed or not a valid Litecoin address
403ForbiddenMissing or invalid ACCESS-TOKEN
404Not foundNo indexed data exists for the requested address
500Internal errorThe indexer failed to read address data