The Zerion API uses HTTP Basic Authentication. 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.
Example requests
# 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