Skip to main content

Get XCH Price

This endpoint allows you to fetch the XCH price for a specific period and currency.

Endpoint

GET https://api.spacescan.io/stats/price

Parameters

ParameterTypeRequiredDefaultDescription
periodnumberNocurrent timeUnix timestamp for historical price
currencystringNoUSDCurrency code (e.g., USD, EUR, GBP)
networkstringNomainnetNetwork to query
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/stats/price" \
-H "x-api-key: YOUR_API_KEY"

Live API Test

Request Examples

curl -X GET "https://api.spacescan.io/stats/price?currency=USD&period=1677649200"

Response

Failed to load API response. Please try again later.

Response Schema

FieldTypeDescription
statusstringSuccess or failure status
pricenumberXCH price in requested currency

Notes

  • If no period is specified, returns the current price
  • Historical prices may not be available for all timestamps
  • Supported currencies include USD, EUR, GBP, and others