Santiment Social Signals API: A Trader's Guide to Crowd Intelligence
Learn how to tap the Santiment Social Signals API to read crypto crowd sentiment, detect hype spikes, and build data-driven trading signals with real Python code examples.
Learn how to tap the Santiment Social Signals API to read crypto crowd sentiment, detect hype spikes, and build data-driven trading signals with real Python code examples.
Social sentiment has become one of the most exploitable edges in crypto trading — not because markets are perfectly rational, but because they are driven by human emotion. When a token starts trending on Twitter at 2 AM or floods Telegram groups with bullish messages, price action tends to follow within hours. The question is whether you are positioned before or after the crowd reacts.
The Santiment Social Signals API gives you programmatic access to this crowd intelligence. Rather than manually monitoring Reddit threads or scrolling through Crypto Twitter, you can pull structured sentiment data, social volume spikes, and weighted sentiment scores directly into your trading scripts. Traders on Binance, Bybit, and OKX have been extracting edge from this data for years — and with a few dozen lines of Python, you can too.
Santiment crawls social data from a wide range of sources: Twitter/X, Reddit, Telegram groups, Discord servers, BitcoinTalk forums, and various crypto-specific communities. Raw mentions are processed into structured metrics that expose different dimensions of crowd behavior — each metric tells a different part of the story.
The real skill is knowing which metric fits which situation. For detecting breakout candidates before they move, social_volume_abnormality is the most reliable leading indicator. For timing exits at euphoria peaks, weighted_sentiment extremes give better signals than raw volume. For identifying macro sector rotations, tracking social_dominance across the top 20 assets reveals where crowd attention is migrating before capital follows.
An API key from the Santiment developer dashboard is the only prerequisite. The free tier provides limited historical access and a modest request allowance — sufficient for prototyping and testing individual endpoints, but not for continuous signal generation in production. Paid plans unlock full historical depth (some metrics going back to 2016), higher rate limits, and premium metrics like MVRV ratio and on-chain transaction volume that pair well with social signals for higher-conviction setups.
All Santiment API requests go through a single GraphQL endpoint. If you are used to REST APIs, GraphQL feels different at first — you define exactly which fields you want in your query, and the response contains exactly those fields. There is no over-fetching and no multiple round trips needed. For time-series data like social metrics, this is actually cleaner than REST equivalents.
import requests
import os
API_KEY = os.environ.get('SANTIMENT_API_KEY', 'your_api_key_here')
GRAPHQL_URL = 'https://api.santiment.net/graphql'
HEADERS = {
'Authorization': f'Apikey {API_KEY}',
'Content-Type': 'application/json'
}
def query_santiment(graphql_query: str) -> dict:
"""Send a GraphQL query to Santiment and return parsed data."""
response = requests.post(
GRAPHQL_URL,
json={'query': graphql_query},
headers=HEADERS,
timeout=30
)
response.raise_for_status()
result = response.json()
if 'errors' in result:
raise ValueError(f"Santiment API error: {result['errors'][0]['message']}")
return result['data']
Always load your API key from an environment variable — never hardcode it in scripts that might get committed to git. Santiment enforces per-minute and per-day rate limits that vary by plan tier. Check your dashboard usage page before running large batch queries to avoid hitting the ceiling mid-scan.
The primary query structure uses getMetric with a metric name, asset slug, date range, and interval. Interval options include 1h, 4h, 1d, and 7d — choosing correctly matters for your use case. For intraday signals, 1h or 4h data gives you timely readings without excessive noise. For swing trading or position sizing decisions, daily data is cleaner and less susceptible to brief spikes that do not sustain. Below are two reusable functions covering the two most important social metrics.
from datetime import datetime, timedelta
def get_social_volume(slug: str, days: int = 14, interval: str = '1d') -> list:
end_date = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
start_date = (datetime.utcnow() - timedelta(days=days)).strftime('%Y-%m-%dT%H:%M:%SZ')
query = '''
{
getMetric(metric: "social_volume_total") {
timeseriesData(
slug: "''' + slug + '''"
from: "''' + start_date + '''"
to: "''' + end_date + '''"
interval: "''' + interval + '''"
) {
datetime
value
}
}
}
'''
return query_santiment(query)['getMetric']['timeseriesData']
def get_weighted_sentiment(slug: str, days: int = 7, interval: str = '4h') -> list:
end_date = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
start_date = (datetime.utcnow() - timedelta(days=days)).strftime('%Y-%m-%dT%H:%M:%SZ')
query = '''
{
getMetric(metric: "weighted_sentiment") {
timeseriesData(
slug: "''' + slug + '''"
from: "''' + start_date + '''"
to: "''' + end_date + '''"
interval: "''' + interval + '''"
) {
datetime
value
}
}
}
'''
return query_santiment(query)['getMetric']['timeseriesData']
# Compare BTC and ETH social volume over 2 weeks
btc = get_social_volume('bitcoin', days=14)
eth = get_social_volume('ethereum', days=14)
print('Last 3 days BTC social volume:')
for point in btc[-3:]:
print(f" {point['datetime'][:10]}: {point['value']:.0f} mentions")
# Check for extreme sentiment readings on SOL at 4h resolution
sentiment = get_weighted_sentiment('solana', days=7)
for point in sentiment:
val = point['value']
if val is not None and abs(val) > 0.5:
direction = 'EUPHORIA' if val > 0 else 'FEAR'
print(f"{point['datetime'][:16]} — {direction}: {val:.3f}")
Asset slugs in Santiment are lowercase and hyphenated for multi-word names: 'bitcoin', 'ethereum', 'shiba-inu', 'wrapped-bitcoin'. If you are unsure of a slug, query the getAllProjects endpoint to get the full list of supported assets with their tickers and identifiers before building your watchlist logic.
Raw volume numbers are context-free. A token receiving 10,000 daily mentions might be completely normal for a large-cap asset but a dramatic anomaly for a mid-cap project. Normalization solves this. The spike detector below pulls 30 days of daily social volume, computes rolling statistics, and flags tokens where the current reading sits more than 2 standard deviations above the historical mean — a reliable signal that unusual crowd attention is forming around that asset.
import statistics
def detect_social_spike(slug: str, z_threshold: float = 2.0) -> dict:
"""Flag assets with abnormally high social volume vs. their 30-day baseline."""
data = get_social_volume(slug, days=30, interval='1d')
values = [p['value'] for p in data if p['value'] is not None]
if len(values) < 10:
return {'slug': slug, 'spike': False, 'reason': 'insufficient data'}
mean = statistics.mean(values)
stdev = statistics.stdev(values)
if stdev == 0:
return {'slug': slug, 'spike': False, 'reason': 'no variance in data'}
current = values[-1]
z_score = (current - mean) / stdev
return {
'slug': slug,
'spike': z_score >= z_threshold,
'z_score': round(z_score, 2),
'current_volume': int(current),
'baseline_mean': round(mean),
'baseline_stdev': round(stdev)
}
# Scan a watchlist
watchlist = ['bitcoin', 'ethereum', 'solana', 'avalanche', 'chainlink', 'polkadot']
print('Social Volume Spike Scanner')
print('-' * 45)
for slug in watchlist:
result = detect_social_spike(slug, z_threshold=2.0)
if result.get('spike'):
print(f"SPIKE {slug:15s} z={result['z_score']:+.2f} vol={result['current_volume']:}")
else:
z = result.get('z_score', 0.0)
print(f"normal {slug:15s} z={z:+.2f}")
Counter-intuitively, the most profitable use of this signal is often contrarian. When an asset reaches 3 or more standard deviations above baseline with strongly positive weighted_sentiment, you are typically looking at a peak FOMO event — historically a better exit signal than an entry. Conversely, a social spike paired with extreme negative sentiment can mark a local capitulation bottom. The direction of sentiment at the time of the spike determines which interpretation is correct.
Social signals are one variable in a multivariate problem. The most robust trading setups stack social data with at least one confirming signal from price action or on-chain activity. A practical framework: detect a social volume spike, check price position relative to key levels, verify real trading volume, then execute if all conditions align.
On Binance, the public REST API lets you check 24-hour trading volume and order book depth before acting on a social signal. A social spike with thin order books and declining spot volume is a warning — the crowd is talking but not trading real size. When social spikes coincide with genuine volume expansion on Binance's spot or futures book, the setup gains significantly higher conviction.
Platforms like Bybit and OKX are well-suited to executing on these multi-signal setups. Bybit's perpetual contract API lets you size positions precisely based on signal strength, with leverage you can dial in programmatically. OKX has thorough API documentation and competitive maker fees — important when entering and exiting on tight signal windows. For accumulating spot positions on large-cap assets, Coinbase and Binance offer the deepest liquidity.
VoiceOfChain adds another layer by monitoring on-chain flows alongside social signals — tracking whale wallet movements, large exchange deposits, and smart money accumulation patterns in real time. When a social volume spike detected through the Santiment API coincides with unusual whale activity surfaced in VoiceOfChain's feed, that convergence of crowd sentiment and smart money positioning is one of the stronger setups available to algorithmic traders. Neither signal alone is reliable enough; together they are significantly more precise.
Treat social signals as hypothesis generators, not direct trade triggers. When the spike detector fires, that is your cue to look harder — check price structure, check on-chain flows, check broader market context. Then decide. Social data without price confirmation has historically high false-positive rates, particularly during sideways markets where narrative can decouple from price action for extended periods.
The Santiment Social Signals API is not a crystal ball — no single data source is. But social volume anomalies and sentiment extremes are real, measurable phenomena that precede price moves consistently enough to be systematically exploited. The spike detector pattern above is a working starting point; backtest it against assets you actually trade on Binance, OKX, or Bybit to calibrate z-score thresholds to each asset's specific volatility profile.
The real unlock comes from stacking signals. Layer social data from Santiment on top of on-chain flows from a platform like VoiceOfChain, confirm with price structure, and act with conviction when multiple independent signals align. Social sentiment alone is noise. Social sentiment combined with on-chain confirmation and price action is genuine edge.