Get CAT Total Supply
This endpoint allows you to fetch the total supply of a Chia Asset Token (CAT). Track the maximum available tokens for any CAT in the Chia ecosystem. This information is crucial for understanding token economics, market capitalization calculations, and overall token distribution metrics.
Endpoint
- Mainnet
- Testnet
GET https://api.spacescan.io/token/total-supply/{asset_id}
GET https://api-testnet11.spacescan.io/token/total-supply/{asset_id}
Parameters
Parameter | Type | Description |
---|---|---|
asset_id | string | The unique identifier (TAIL hash) of the CAT |
Use api.spacescan.io
for free tier access. See our API Plans for rate limits and features.
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/token/total-supply/{asset_id}" \
-H "x-api-key: YOUR_API_KEY"
Live API Test
- Mainnet
- Testnet
Request Example
- cURL
- Python
- JavaScript
- Mainnet
- Testnet
import requests
asset_id = "b8edcc6a7cf3738a3806fdbadb1bbcfc2540ec37f6732ab3a6a4bbcd2dbec105"
url = f"https://api.spacescan.io/token/total-supply/{asset_id}"
response = requests.get(url)
data = response.json()
print(data)
import requests
asset_id = "b8edcc6a7cf3738a3806fdbadb1bbcfc2540ec37f6732ab3a6a4bbcd2dbec105"
url = f"https://api-testnet11.spacescan.io/token/total-supply/{asset_id}"
response = requests.get(url)
data = response.json()
print(data)
- Mainnet
- Testnet
const assetId = "b8edcc6a7cf3738a3806fdbadb1bbcfc2540ec37f6732ab3a6a4bbcd2dbec105";
const url = https://api.spacescan.io/token/total-supply/${assetId}
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const assetId = "b8edcc6a7cf3738a3806fdbadb1bbcfc2540ec37f6732ab3a6a4bbcd2dbec105";
const url = https://api-testnet11.spacescan.io/token/total-supply/${assetId}
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response
- Mainnet
- Testnet
Failed to load API response. Please try again later.
Failed to load API response. Please try again later.
Response Schema
Field | Type | Description |
---|---|---|
total_supply | number | The total supply of the CAT token |
Error Responses
HTTP Status Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid |
404 | Not Found -- The specified CAT could not be found |
429 | Too Many Requests -- You're requesting too many times! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later |