Getting started
Quickstart
From zero to your first token report in a few minutes.
- 1
Get an API key
Open the API page in the XCA app and create a key. The full key is shown once, so copy it right away. API access comes with plans that include it.
Create a key - 2
Keep it in an environment variable
Store the key outside your code, for example in
XCA_API_KEY. Every example in these docs reads it from there.export XCA_API_KEY="xca_live_…" - 3
Request a token report
Reports for tokens that were already scanned come back instantly. Pick your language below.
curl -s "https://app.xca.fun/api/v1/tokens/solana/DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" \ -H "Authorization: Bearer $XCA_API_KEY" - 4
Scan tokens that are new to XCA
If the report status is
NONE, start a scan withPOST /scansand poll the report until the status isDONE. It usually takes under a minute.curl -s -X POST "https://app.xca.fun/api/v1/scans" \ -H "Authorization: Bearer $XCA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"chain":"solana","address":"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}'
Prefer copying from the examples: they already handle errors and read the key from XCA_API_KEY.