📖 Documentation Menu

API

Sentiment Analysis API

Quantify market and social sentiment for any token or topic. Returns positive/negative/neutral scores, confidence levels, and trend direction.

Endpoint

GET https://api.drip.surf/sentiment

Parameters

Provide at least one of the following:

ParameterTypeDescription
tickerstringToken ticker symbol (e.g. SOL, DRIP)
querystringFree-form text query (e.g. Solana DeFi)

Response

200 OK
{
  "status": "success",
  "data": {
    "subject": "SOL",
    "sentiment": {
      "positive": 0.58,
      "negative": 0.15,
      "neutral": 0.27
    },
    "confidence": 0.91,
    "trend": "improving",
    "sampleSize": 12400,
    "timeframe": "24h",
    "topPositiveSignals": [
      "DeFi TVL growth",
      "Developer activity increase",
      "Institutional adoption"
    ],
    "topNegativeSignals": [
      "Network congestion concerns",
      "Competing L1 narratives"
    ]
  },
  "meta": {
    "sources": ["twitter", "reddit", "news"],
    "confidence": 0.91,
    "costUsd": 0.03,
    "durationMs": 1940
  }
}

Examples

curl

By ticker
curl "https://api.drip.surf/sentiment?ticker=SOL" \
  -H "X-Payment-Proof: <tx-signature>"
By query
curl "https://api.drip.surf/sentiment?query=Solana%20DeFi" \
  -H "X-Payment-Proof: <tx-signature>"

SDK

TypeScript
import { Drip } from "@drip/sdk";

const drip = new Drip({ wallet: "<your-wallet>" });

const sentiment = await drip.sentiment({ ticker: "SOL" });
console.log(sentiment.sentiment.positive); // 0.58
console.log(sentiment.trend);              // "improving"

// Free-form query
const query = await drip.sentiment({ query: "Solana DeFi" });
💡Sentiment scores range from 0 to 1 and always sum to 1. The trend field indicates direction over the past 24 hours: improving, declining, or stable.