The Zerion API uses HTTP Basic Authentication. You can get your API key from the Dashboard.
Try it from the docs
Every API reference page has an interactive playground. Click Try it, paste your API key in the Username field, leave Password empty, and hit Send to make a live request.
Using the API from your code
When calling the API from code, append a colon to your API key (your_api_key:), Base64-encode it, and pass it in the Authorization header:
Authorization: Basic BASE64_ENCODED_KEY
Go to the Dashboard Get Started section for ready-to-use code snippets with your API key pre-filled.
# Transform your API key for Basic Auth
API_KEY_TRANSFORMED=$(echo -n "YOUR_API_KEY:" | base64)
# Make the request
curl -X GET "https://api.zerion.io/v1/wallets/0x42b9df65b219b3dd36ff330a4dd8f327a6ada990/portfolio" \
-H "Authorization: Basic $API_KEY_TRANSFORMED" \
-H "accept: application/json"
Security best practices
Never expose your API key in client-side code or public repositories.
- Store your API key in environment variables
- Make API requests from server-side code
- Rotate your key immediately if it’s ever compromised
- Use separate keys for development and production