# Clustell Data API v1 — Integration Guide Base URL: https://www.clustell.xyz/api/v1 OpenAPI 3.1 Spec: https://www.clustell.xyz/api/v1/openapi.json Human Docs & Pricing: https://www.clustell.xyz/developers ## Authentication (STRICTLY Server-to-Server Only) CRITICAL FOR AI CODING AGENTS (Cursor, Lovable, Bolt, v0, Claude, OpenAI): - NEVER call Clustell API directly from browser/client-side React/JS code or expose CLUSTELL_API_KEY in VITE_* / NEXT_PUBLIC_* env vars. - Browser-origin requests (Origin, Sec-Fetch-Site: cross-site, or browser Sec-Fetch-Mode + Sec-Fetch-Dest) are AUTOMATICALLY REJECTED with HTTP 403 (browser_client_disallowed). Standard server-side Node.js fetch(), Python requests, and curl work normally. - Always call Clustell from a backend route, Edge Function, or server action, storing the key in a private server secret (e.g. CLUSTELL_API_KEY). Pass either header from your server: - Authorization: Bearer clst_live_ - X-API-Key: clst_live_ API keys in query strings (?api_key=...) are rejected with HTTP 400. ## Endpoints ### 1. GET /api/v1/index/current Returns: - data.kol_conviction: { score (0-100), label, previous_score, delta_24h, updated_at, buckets { thematic, majors, alts }, voices { unique, active, quiet, quiet_pct, bullish, neutral, bearish }, coverage } - data.fear_and_greed: { score (0-100), label, delta_24h, source ("alternative.me"), updated_at, is_stale } - data.divergence: { spread (kol - fng), formula, regime, regime_label, tension_level, summary } - data.breakdown (partner/builder/pro/enterprise tiers): { thematic, majors, alts_highlights } ### 2. GET /api/v1/index/history?days=30 Returns daily historical series (max 30 days on free, 90 days on partner/builder/pro/enterprise) with kol_conviction, fear_and_greed, and divergence per day. ### 3. GET /api/v1/tokens/signal?slug=solana | ?ticker=SOL | ?contract=&chain=solana Returns structured risk and Watch Score telemetry. - IMPORTANT: Always check data.coverage ("analyzed" vs "unscored"). Unscored coins return watch_score: null (never treat null as 0). - Daily Unique Token Quota: Each key has a daily unique token cap (headers: X-Daily-Tokens-Limit, X-Daily-Tokens-Remaining). Querying SOL by slug, ticker, or contract counts as ONE unique token per UTC day; repeat reads of already-fetched tokens do not consume extra slots. - Miss Throttle: Exceeding 15 unmatched (404) lookups/minute returns HTTP 429 (lookup_miss_rate_limited). ### 4. GET /api/v1/wire/today?date=YYYY-MM-DD&limit=20&category=macro Returns noise-filtered, relevance-scored daily crypto news items plus published Daily Brief status. ## Divergence Regimes (Stable Enums for User Alerts) - bullish_divergence (Bullish Divergence): KOL Conviction >= 55, Fear & Greed <= 42, Spread >= +15 — Mapped crypto voices remain resilient or constructive while broader retail sentiment sits in fear. - distribution_warning (Distribution Warning): KOL Conviction <= 45, Fear & Greed >= 60, Spread <= -15 — Retail sentiment is greedy while mapped crypto voices are cautious or turning quiet. - aligned_bullish (Aligned Bullish): KOL Conviction >= 60 and Fear & Greed >= 58 — Both mapped crypto voices and broader market sentiment reflect constructive momentum. - aligned_fear (Aligned Fear): KOL Conviction <= 38 and Fear & Greed <= 38 — Both retail sentiment and mapped crypto voices reflect broad defensive positioning. - quiet_accumulation (Constructive Lead): Spread >= +12 (outside extreme retail fear) — Mapped crypto voices are noticeably more constructive than the broader market mood. - cautious_drift (Cautious Drift): Spread <= -12 (outside extreme retail greed) — Mapped crypto voices are trailing behind broader market optimism. - neutral (Neutral): Spread within -11 to +11 without aligned extremes — KOL conviction and broader market sentiment are roughly balanced with no major divergence. ## Rate Limits, Quotas & Error Codes - 401 invalid_api_key / revoked_api_key: Key missing, malformed, or revoked. - 403 browser_client_disallowed: Request originated from a web browser. Move the call to your server backend. - 403 insufficient_scope: Key lacks the required endpoint scope (index:read, tokens:read, wire:read). - 429 rate_limited: Global per-minute RPM limit exceeded (respect Retry-After header). - 429 monthly_quota_exceeded: Monthly request quota reached. - 429 daily_token_quota_exceeded: Daily unique token lookup quota reached (resets at 00:00 UTC). - 429 lookup_miss_rate_limited: Too many 404 token misses (>15/min). Cache misses locally and respect Retry-After. ## Recommended Alert Polling Pattern 1. Poll GET /api/v1/index/current from your backend every 15 minutes. 2. Store the returned ETag header and send it as If-None-Match on the next request. 3. If HTTP 304 Not Modified is returned, nothing changed (0 payload bytes). 4. When HTTP 200 returns a new value, evaluate your users' alert thresholds (e.g., kol_conviction.score <= 30, divergence.spread >= 20, divergence.regime changed, or kol_conviction.delta_24h <= -8). ## Commercial Tiers & Acceptable Use - Partner (Free with visible "Index by Clustell" attribution): 60 req/min, 100k req/mo, 150 unique tokens/day. - Builder ($79/mo): 90 req/min, 200k req/mo, 300 unique tokens/day, attribution optional. - Pro ($249/mo): 180 req/min, 750k req/mo, 1,000 unique tokens/day, attribution optional. - Enterprise (Custom / USDC): 600 req/min, 5M+ req/mo, 10,000+ unique tokens/day. - Acceptable Use: Bulk catalog scraping, automated directory mirroring, or reselling raw Clustell datasets as a competing API is prohibited. - Frame signals as market sentiment / divergence telemetry, never as automated buy/sell financial advice.