Santiment API Integration
Santiment is a crypto analytics platform emphasizing social metrics, on-chain data, and development activity. Key feature — Social Volume and MVRV calculations for hundreds of assets including altcoins with limited coverage elsewhere.
GraphQL API
Santiment uses GraphQL instead of REST, allowing querying exactly needed data:
import httpx
class SantimentClient:
def __init__(self, api_key: str):
self.session = httpx.AsyncClient(
headers={"Authorization": f"Apikey {api_key}"},
timeout=30.0
)
async def query(self, gql: str, variables: dict = None) -> dict:
resp = await self.session.post(
"https://api.santiment.net/graphql",
json={"query": gql, "variables": variables or {}}
)
resp.raise_for_status()
return resp.json()
async def get_social_volume(self, slug: str, from_date: str, to_date: str) -> list:
query = """
query ($slug: String!, $from: DateTime!, $to: DateTime!) {
getMetric(metric: "social_volume_total") {
timeseriesData(slug: $slug, from: $from, to: $to, interval: "1d") {
datetime
value
}
}
}
"""
result = await self.query(query, {"slug": slug, "from": from_date, "to": to_date})
return result["data"]["getMetric"]["timeseriesData"]
Key Santiment Metrics
Social Volume — count of unique posts/messages mentioning asset on social networks. Sharp volume growth often precedes price moves.
Social Dominance — share of specific asset discussions in crypto discourse. Peak dominance often coincides with local tops.
Development Activity — GitHub commits excluding forks. High activity indicates active project.
Network Growth — new addresses per day. Growing network = growing user base.
MVRV by cohort — MVRV broken down by holding duration. Santiment covers 900+ assets, valuable for altcoin strategies.
Combine with other on-chain providers for comprehensive analysis.







