Skip to main content

Get XCH Balance

This endpoint allows you to fetch the XCH balance for a given address.

Endpoint

GET https://api.spacescan.io/address/xch-balance/{address}

Parameters

ParameterTypeRequiredDefaultDescription
addressstringYes-The XCH address to fetch balance for
include_dustbooleanNofalseInclude dust coins in balance
Free API

Use api.spacescan.io for free tier access. See our API Plans for rate limits and features.

Pro API

Use pro-api.spacescan.io with your API key in the x-api-key header. See our API Plans for details.

curl -X GET "https://pro-api.spacescan.io/address/xch-balance/{address}" \
-H "x-api-key: YOUR_API_KEY"

Live API Test

Request Examples

curl -X GET "https://api.spacescan.io/address/xch-balance/xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8"

Response

Failed to load API response. Please try again later.

Response Schema

FieldTypeDescription
statusstringSuccess or failure status
xchnumberBalance in XCH
mojonumberBalance in mojo

Notes

  • The balance includes all unspent coins for the address
  • Set include_dust=true to include dust coins in the balance