Introduction
This section covers how to authenticate, make your first API call and use Xerberus GraphQL endpoint.
1. API Endpoint
All GraphQL queries should be sent as POST
requests to:
https://xerberus-metrics-api-515850710964.us-central1.run.app/graphql
2. Authentication
Access to the API is secured using an API Key.
How to Use the API Key
Send your API key using the x-api-key
and x-user-email
HTTP header in each request:
x-api-key: YOUR_SECRET_KEY
x-user-email: EMAIL_ASSOCIATED_WITH_KEY
Example with curl
:
curl
: curl -X POST https://xerberus-metrics-api-515850710964.us-central1.run.app/graphql \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_SECRET_KEY" \
-d '{"query":"{ chains }"}'
3. Example Query
Here is a minimal example to fetch supported chains:
query GetChains {
chains
}
Expected response:
{
"data": {
"chains": ["ETHEREUM", "POLYGON", "CARDANO", "BASE_PROTOCOL"]
}
}
4. SDK Available
We provide a Python SDK for easier integration. You can use it to programmatically query metrics, tokens, chains, and more.
Check out the SDK docs or visit the GitHub repo:
Last updated