Skip to main content

SDK to access Xerberus GraphQL metrics API

Project description

Xerberus Metrics Python SDK

A lightweight Python SDK for accessing blockchain token metrics from the Xerberus GraphQL API.


Features

  • Query token metrics with filters like chain, date, and address
  • Sort and paginate metric data
  • Access available chains and whitelisted tokens
  • Auto-generated GraphQL queries
  • Ready for deployment and integration

Installation

pip install xerberus-metrics-sdk

Or clone locally for development:

git clone https://github.com/XerberusTeam/xerberus-metrics-sdk.git
cd xerberus-metrics-sdk
pip install -e .

SETUP

Create a .env file in the root:

XERBERUS_API_KEY=your-api-key-here
XERBERUS_API_EMAIL=your_email@here.com

USAGE

from xerberus.client import XerberusMetricsClient

client = XerberusMetricsClient()

result = client.metrics_get(
    date=["2025-03-18"],
    chain=["ethereum"],
    sort_by="wallet_count",
    sort_order="DESC",
    limit=5
)

for metric in result["metrics"]:
    print(metric["token"]["symbol"], metric["wallet_count"])

GraphQL Documentation

For documentation regarding the GraphQL go to: https://xerberus.gitbook.io/documentation

Available Metrics Fields

Token Field Reference

These are the fields you can expect in the token_get() response:

Field Type Description Sortable
asset_id Int Internal asset identifier
symbol String Token Symbol
chain String Blockchain name (e.g., ETHEREUM)
address String Token contract address

Metrics Fields Reference

These are the fields you can expect in the metrics_get() response:

Field Type Description Sortable
asset_id Int Internal asset identifier
chain String Blockchain name (e.g., ETHEREUM)
partition_date String Date of the metric snapshot (YYYY-MM-DD)
wallet_count Int Number of wallets holding the token
wallet_count_change_1D Int Wallet count change over 1 day
wallet_count_change_7D Int Wallet count change over 7 days
wallet_count_change_30D Int Wallet count change over 30 days
wallet_count_change_90D Int Wallet count change over 90 days
wallet_count_change_365D Int Wallet count change over 365 days
typical_price Float Average token price
pct_price_change_1D Float 1-day % price change
price_change_7D Float 7-day price change
price_change_30D Float 30-day price change
price_change_90D Float 90-day price change
price_change_180D Float 180-day price change
price_change_365D Float 365-day price change
life_cycle_v1 Float Token life cycle score
diversity Float Diversity metric (wallet spread)
dominance Float Dominance metric
assortativity Float Assortativity metric
risk_rating String Xerberus Risk Rating (AAA, BB, etc.)
risk_score Float Xerberus Risk Score
token.symbol String Token symbol (e.g., USDC, WETH)
token.address String Token contract address

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xerberus_metrics_sdk-0.1.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xerberus_metrics_sdk-0.1.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file xerberus_metrics_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: xerberus_metrics_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for xerberus_metrics_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d8ca0565644a6475fc3a46154f8c80d55e68065672ff25c9e8c0dded3bd1ce04
MD5 cf018561faa519590c88cb919dbb7b17
BLAKE2b-256 44206aa957d2935faed80ea0efa8f8225aaf2d09fcb4023efa51b131a5a6a84d

See more details on using hashes here.

File details

Details for the file xerberus_metrics_sdk-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for xerberus_metrics_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5be839a65e1fd46df622a97784e41e6012f7fcfdf5ccc7f485c00def9b1c679d
MD5 846be66eca118b03e2c999b8c2b4ab09
BLAKE2b-256 1fee8a277f0e16ba67ee0d2695be685165bbe967f875c9893c4a9d8a1f1bed5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page