Address Information
Get XCH/CAT/NFT Balance for an Address
This endpoint allows you to fetch the XCH, CAT, and NFT balances for a given address.
Endpoint
GET https://api.spacescan.io/address/balance/{address}
Parameters
Parameter | Type | Description |
---|---|---|
address | string | The XCH address or .xch name service name |
Live API Test
🚀 Test API in Browser
Request Example
- cURL
- Python
- JavaScript
curl -X GET "https://api.spacescan.io/address/balance/xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8"
import requests
address = "xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8"
url = f"https://api.spacescan.io/address/balance/{address}"
response = requests.get(url)
data = response.json()
print(data)
const address = "xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8";
const url = https://api.spacescan.io/address/balance/${address}
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response
Failed to load API response. Please try again later.
Response Schema
Field | Type | Description |
---|---|---|
status | string | The status of the API request |
xch_balance | object | XCH balance information |
cat_balance | array | Array of CAT token balances |
nft_balance | object | NFT balance information |
Notes
- You can query multiple addresses (up to 10) by separating them with commas.
- The API supports both XCH addresses and .xch name service names.
- The
network
parameter is optional. Possible values aremainnet
ortestnet10
. - The
Version
parameter is optional and defaults to 1.
Get XCH Balance for an Address
This endpoint retrieves only the XCH balance for a given address.
Endpoint
GET https://api.spacescan.io/address/xch-balance/{address}
Live API Test
🚀 Test API in Browser
Response
Failed to load API response. Please try again later.
Get CAT Balance for an Address
This endpoint retrieves only the CAT token balances for a given address.
Endpoint
GET https://api.spacescan.io/address/cat-balance/{address}
Live API Test
🚀 Test API in Browser
Response
Failed to load API response. Please try again later.
Get NFT Balance for an Address
This endpoint retrieves only the NFT balance for a given address.
Endpoint
GET https://api.spacescan.io/address/nft-balance/{address}
Live API Test
🚀 Test API in Browser
Response
Failed to load API response. Please try again later.
Get Transactions for an Address
This endpoint retrieves a list of transactions for a given address (up to 1000 transactions).
Endpoint
GET https://api.spacescan.io/address/transactions/{address}
Live API Test
🚀 Test API in Browser
Response
Failed to load API response. Please try again later.
Get XCH Address for .xch Name
This endpoint retrieves the XCH address associated with a given .xch name service name.
Endpoint
GET https://api.spacescan.io/address/name-lookup/{name}
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The .xch name service name (e.g., spacescan.xch) |
Live API Test
🚀 Test API in Browser
Response
Failed to load API response. Please try again later.
Notes
- This endpoint uses the name service from https://www.namesdao.org/
- The
network
parameter is optional. Possible values aremainnet
ortestnet10
. - The
Version
parameter is optional and defaults to 1.
For any additional information or support, please contact our API support team or refer to our comprehensive API documentation.