API v1

Quickstart

Make your first requests against API v1.

This guide assumes:

  • You have a Platform API key (x-api-key)
  • Your key has assets:read

Set these locally:

export API_BASE_URL="https://api.tokens.xyz"
export API_KEY="..."

Most integrations should call https://api.tokens.xyz/v1/... directly.

If you want to hide your API key from browsers, put requests behind your own backend/proxy. In that setup, your backend still calls https://api.tokens.xyz/v1/... upstream.

1) Search for an asset

curl -sS "$API_BASE_URL/v1/assets/search?q=solana&limit=5" \
  -H "x-api-key: $API_KEY"

You’ll get:

  • results[] containing canonical assetId values and (when available) market stats + a primary variant.

2) Fetch canonical asset details (+ includes)

Pick an assetId from the search response:

ASSET_ID="solana"

curl -sS "$API_BASE_URL/v1/assets/$ASSET_ID?include=profile,risk,ohlcv,markets" \
  -H "x-api-key: $API_KEY"

This is the fastest way to build a token detail page because it can return multiple “include” blocks in one request.

3) Resolve a Solana mint to canonical

MINT="So11111111111111111111111111111111111111112"

curl -sS "$API_BASE_URL/v1/assets/resolve?mint=$MINT" \
  -H "x-api-key: $API_KEY"

You’ll get:

  • assetId
  • a minimal asset object
  • variant details for that mint

Next steps

On this page