Cambrian Detect major sentiment shifts in crypto tokens API

By Cambrian Network deep42

GET /api/v1/deep42/social-data/sentiment-shifts

Sentiment Shifts

Overview

Identifies cryptocurrency tokens experiencing significant sentiment changes in social media discussions and market commentary that could signal potential market movements and trading opportunities. This endpoint analyzes sentiment data over different time periods to detect meaningful shifts in market perception.

Business Value

  • Early Signal Detection: Identify tokens with changing market sentiment before major price movements occur
  • Risk Assessment: Monitor bearish sentiment shifts to detect potential market downturns for specific tokens
  • Trading Opportunities: Discover tokens with bullish sentiment momentum for potential investment consideration
  • Market Timing: Use sentiment shift magnitude and confidence levels to optimize entry and exit timing
  • Portfolio Management: Track sentiment changes across your holdings to make informed position adjustments

Endpoint Details

URL:

https://deep42.cambrian.network/api/v1/deep42/social-data/sentiment-shifts

Method: GET Authentication: Required via X-API-KEY header

Query Parameters

Parameter Type Required Default Description
comparison_period string false 3d Period to compare against. Options: 24h, 3d, 7d
limit integer false 20 Number of tokens to return (maximum 50)

Response Field Descriptions

Response Field Type Description
tokenSymbol string Token symbol (e.g., BTC, ETH)
sentimentShift number Magnitude of sentiment change between periods. Range: absolute value 0-20. >2 = notable shift, >5 = major shift. Positive = bullish shift, negative = bearish shift
currentSentiment number Current period sentiment score. Range 0-10. 0 = very bearish, 5 = neutral, 10 = very bullish
previousSentiment number Previous period sentiment score. Range 0-10. 0 = very bearish, 5 = neutral, 10 = very bullish
shiftDirection string Direction of shift: 'bullish' or 'bearish'
bullishRatio number Percentage of bullish sentiment. Range 0-100. >60 = bullish majority, <40 = bearish majority
volumeChange number Change in discussion volume as a multiplier. 1.0 = no change, 2.0 = doubled. >1.5 = significant increase
qualityScore number Quality of sentiment data based on author credibility and content depth. Range 0-10. >7 = high quality
volatility number Standard deviation of sentiment scores. Range 0-5. <1 = strong consensus, >2 = highly divided opinions
confidenceLevel string Confidence in shift detection. Values: 'high', 'medium', 'low'. Based on data volume and consistency
signalStrength string Overall signal strength indicator. Values: 'strong', 'moderate', 'weak'. Combines shift magnitude, volume, and confidence

Examples

1. Default Sentiment Shifts (3-day comparison)

This example demonstrates fetching tokens with sentiment shifts using the default 3-day comparison period.

curl -X GET "https://deep42.cambrian.network/api/v1/deep42/social-data/sentiment-shifts" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response:

[]

This response indicates that no significant sentiment shifts were detected during the analysis period, meaning the current market sentiment is relatively stable compared to the previous period.

2. 24-hour Sentiment Shifts with Limited Results

This example shows how to detect sentiment shifts over the past 24 hours with a reduced result limit.

curl -X GET "https://deep42.cambrian.network/api/v1/deep42/social-data/sentiment-shifts?comparison_period=24h&limit=10" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response:

[]

An empty array indicates no significant sentiment shifts were detected in the 24-hour period, suggesting stable market sentiment across monitored tokens.

x402 Payment Option

This endpoint supports pay-per-use access via the x402 payment protocol (v2) — pay $0.05 USDC per request using blockchain micropayments. No API key required.

Quick Start (TypeScript)

npm install @x402/fetch @x402/evm viem
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));

const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const response = await fetchWithPayment(
  "https://deep42.cambrian.network/api/v1/deep42/social-data/sentiment-shifts"
);
const data = await response.json();

Quick Start (Python)

pip install "x402[httpx]"
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

async def main():
    client = x402Client()
    account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
    register_exact_evm_client(client, EthAccountSigner(account))

    async with x402HttpxClient(client) as http:
        response = await http.get("https://deep42.cambrian.network/api/v1/deep42/social-data/sentiment-shifts")
        print(response.json())

asyncio.run(main())

Payment Flow

  1. Send a normal request to the endpoint (no API key needed)
  2. Server returns 402 Payment Required with payment details
  3. The x402 SDK automatically signs a payment authorization with your wallet
  4. The SDK resubmits the request with the signed payment
  5. Server verifies payment and returns the API response

The x402 SDK handles steps 2–5 automatically.

Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request