Get CAT Price
This endpoint allows you to fetch real-time price information for Chia Asset Tokens (CATs) in various currencies. Track current market prices, exchange rates, and fiat valuations for any CAT in the Chia ecosystem. This data is essential for portfolio tracking, trading decisions, and financial applications built on the Chia blockchain.
Endpoint
- Mainnet
- Testnet
GET https://api.spacescan.io/cat/catprice/{asset_id}?currency={currency_code}
GET https://api-testnet11.spacescan.io/cat/catprice/{asset_id}?currency={currency_code}
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
asset_id | string | The unique identifier (TAIL hash) of the CAT | Yes |
currency | string | Currency code (e.g., USD, EUR, INR, etc.) | No |
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/cat/catprice/{asset_id}?currency=INR" \
-H "x-api-key: YOUR_API_KEY"
Live API Test
- Mainnet
- Testnet
Request Example
- cURL
- Python
- JavaScript
- Mainnet
- Testnet
import requests
asset_id = "db1a9020d48d9d4ad22631b66ab4b9ebd3637ef7758ad38881348c5d24c38f20"
currency = "INR"
url = f"https://api.spacescan.io/cat/catprice/{asset_id}?currency={currency}"
response = requests.get(url)
data = response.json()
print(data)
import requests
asset_id = "db1a9020d48d9d4ad22631b66ab4b9ebd3637ef7758ad38881348c5d24c38f20"
currency = "INR"
url = f"https://api-testnet11.spacescan.io/cat/catprice/{asset_id}?currency={currency}"
response = requests.get(url)
data = response.json()
print(data)
- Mainnet
- Testnet
const assetId = "db1a9020d48d9d4ad22631b66ab4b9ebd3637ef7758ad38881348c5d24c38f20";
const currency = "INR";
const url = https://api.spacescan.io/cat/catprice/${assetId}?currency=${currency}
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const assetId = "db1a9020d48d9d4ad22631b66ab4b9ebd3637ef7758ad38881348c5d24c38f20";
const currency = "INR";
const url = https://api-testnet11.spacescan.io/cat/catprice/${assetId}?currency=${currency}
;
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 |
---|---|---|
status | string | The status of the API request |
amount_price | number | Current price in the requested currency |
xch_price | string | Current price in XCH |
Error Responses
HTTP Status Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid or unsupported currency. |
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. |