TradingVibe API Documentation

Access real-time crypto sentiment data via our REST API

Introduction

TradingVibe delivers real-time crypto sentiment analysis to help traders identify market trends before they're reflected in price movements. Updated every 15 minutes for major cryptocurrencies (BTC, ETH, SOL), our API combines news analysis, social media signals, and technical indicators to give you a competitive edge.

Our sentiment analysis is powered by advanced GPT reasoning models, which processes news headlines, Reddit posts, Twitter/X content, and pricing data to provide a human-like understanding of the real-time market. The API provides a comprehensive set of metrics to help you analyze current and historical market sentiment in a single snapshot:

  • Sentiment scores range from -1 (very negative) to 1 (very positive), with separate values for sentiment(the overall sentiment score), news_sentiment, and social_sentiment.
  • Traditonal Fear/Greed index score from 0 to 100, converted from the sentiment score (Extreme Fear, Fear, Caution, Neutral, Positive, Optimism, Extreme Greed).
  • Delta metrics (delta_1h, delta_4h, delta_24h) show sentiment changes over different timeframes, helping you identify momentum in short and medium-term trends.
  • Z-score metrics (z_7d, z_30d) measure how unusual the current sentiment is relative to 7-day and 30-day periods. A high positive z-score indicates unusually positive sentiment, while a negative score shows abnormally negative sentiment.
  • Content metrics show how many news articles, Reddit posts, and Twitter/X posts were analyzed in each snapshot.
  • Insight: a summary provided by our AI models analyzing the overall sentiment and key factors which influenced the current score.
  • Recent articles with individual sentiment scores from trusted crypto news sources included in the current analysis.

These metrics are particularly valuable for traders looking to identify sentiment shifts, anomalies, and potential trading signals before they become obvious in price action.

The API is RESTful and returns data in JSON format. All endpoints are available through HTTPS only.

No-code? Use the dashboard!

We also offer a sentiment dashboard where you can view current sentiment data and history for all coins. Perfect for traders who want to see the big picture without writing any code.

Quickstart Guide

Get Started in 3 Simple Steps

1

Get your API key

Login to your account at /login, then select a subscription plan to get your API key. Your key will be available in your dashboard.

2

Make your first API call

Fetch the current sentiment for Bitcoin:

curl -H 'Authorization: Bearer YOUR_API_KEY' https://tradingvibe.io/api/v1/sentiment/coins/btc
3

Integrate into your application

Use our code examples to integrate the sentiment data into your application:

View Code Examples

Request API Access

Get Your API Key

To get an API key for TradingVibe, follow these steps:

1. Create an Account

Login to your TradingVibe account at /login. If you don't have an account yet, you'll be able to create one.

2. Select a Plan

Choose a subscription plan to fits your needs from the options available in your dashboard. Your API key will be automatically generated after plan selection. The free plan is available with no credit card required.

3. Access Your API Key

Once you've selected a plan, you can access your API key from your dashboard at any time. For enterprise requirements or custom solutions, please contact us at support@tradingvibe.io.

Authentication

All API requests require authentication with an API key, which can be included in one of two ways:

Query Parameter

https://tradingvibe.io/api/v1/sentiment/coins/btc?apiKey=YOUR_API_KEY&include=articles

Bearer Token

curl -H "Authorization: Bearer YOUR_API_KEY" https://tradingvibe.io/api/v1/sentiment/coins/btc

API URL Structure

The TradingVibe API follows RESTful principles with a resource-oriented URL structure:

EndpointDescriptionPlan Availability
/api/v1/sentiment/coins/:coinCurrent sentiment for a coin. btc, eth, or solAll plans
/api/v1/sentiment/coinsCurrent sentiment for all supported coinsBuilder and above
/api/v1/sentiment/coins/:coin/intraday15-minute snapshots for a specific day (default: today)Builder and above
/api/v1/sentiment/coins/:coin/historyDaily sentiment data over a date range (default: 7 days)Builder and above

Query Parameters

Use query parameters to customize your API requests:

ParameterDescriptionExample
includeInclude optional data in the response (currently only 'articles' is supported for current sentiment endpoint)/api/v1/sentiment/coins/btc?include=articles
article_limitLimit the number of articles returned (current sentiment endpoint only)/api/v1/sentiment/coins/btc?include=articles&article_limit=5
dateGet intraday data for a specific date (YYYY-MM-DD format), or special values "today" or "yesterday"/api/v1/sentiment/coins/btc/intraday?date=2023-09-15
daysNumber of days to look back from today for historical data (maximum: 14)/api/v1/sentiment/coins/btc/history?days=10
fromStart date for historical data in YYYY-MM-DD format (overrides days parameter if provided)/api/v1/sentiment/coins/btc/history?from=2023-09-01
toEnd date for historical data in YYYY-MM-DD format (defaults to today)/api/v1/sentiment/coins/btc/history?to=2023-09-15

Versioning

All API endpoints are prefixed with the version number (v1). This ensures backward compatibility as we evolve the API. Future versions may be introduced alongside the current version.

Pricing & Rate Limits

TradingVibe offers a tier‑based pricing model with a standard rate limit of 60 requests per minute for all plans. Each plan includes a monthly allocation of API requests with flexible overage options. There are no hard limits on the number of requests you can make, but you will be charged based on the overage rate for your current plan.

For non-coders, we also offer a sentiment dashboard where you can view the sentiment data for all coins. Available on all paid plans.
PlanMonthly RequestsPriceOverage CostFeatures
Free100$0/foreverNot available
  • All endpoints (BTC, ETH, SOL)
  • Current sentiment only
Hobby2,500$9/month$0.012/request
  • All endpoints (BTC, ETH, SOL)
  • Current sentiment only
  • Webhooks + Dashboard view
Builder10,000$49/month$0.006/request
  • All endpoints + aggregated view
  • Historical data
  • Webhooks + Dashboard view
Professional50,000$199/month$0.0045/request
  • All endpoints + aggregated view
  • Historical data
  • Webhooks + Dashboard view
Enterprise250,000+Contact salesVolume-based
  • Custom integrations
  • White-label distribution rights
  • Fine-tuned AI models
  • Dedicated support

Usage & Billing

Request Counting

Each API call counts as one request against your monthly quota, regardless of endpoint.

Typical Usage Patterns

Here are examples of how different users might consume the API:

  • Free: Occasional checks of BTC, ETH, SOL sentiment (up to 100/month)
  • Hobby: Fetching individual coins once per hour (72 requests/day ≈ 2,160/month)
  • Builder: Polling all coins endpoint every 15 minutes for a dashboard (96 requests/day ≈ 2,880/month)
  • Professional: Multiple app instances polling data every 5 minutes (864 requests/day ≈ 25,920/month)

Billing Cycle

Monthly request quotas reset based on the day of the month you sign up. Any overages are accumulated and billed with the following month's charges.

Rate Limit Details

Rate Limit Headers

All API responses include these headers to help track your usage:

  • X-RateLimit-Limit: Maximum requests per minute (60)
  • X-RateLimit-Remaining: Requests remaining
  • X-RateLimit-Reset: Seconds until reset

Rate Limit Response

When rate limited, the API responds with a 429 status code and a Retry-After header indicating when to retry. After exceeding the rate limit, you'll need to wait 5 minutes before making additional requests.

Get Started

Ready to access real-time crypto sentiment data? Create an account and choose one of our flexible plans.

Login to Get Access

Endpoints

GET

Current Sentiment

GET

Intraday Sentiment

GET

Historical Sentiment

GET

Current Sentiment (All Coins)

Data Model

Sentiment Snapshot

FieldTypeDescription
tsstringISO 8601 timestamp with timezone when the snapshot was created
intervalstringData interval, either "15m" (15-minute snapshots) or "1d" (daily summaries)
coinstringCryptocurrency symbol (BTC, ETH, SOL)
sentimentnumberOverall sentiment score from -1 (very negative) to 1 (very positive), considering all sources
delta_1hnumberChange vs 1 hour ago (4 snapshots)
delta_4hnumberChange vs 4 hours ago (16 snapshots)
delta_24hnumberChange vs 24 hours ago (96 snapshots)
z_7dnumberZ-score of current sentiment over the last 7 days
z_30dnumberZ-score over 30 days
insightstringAI-generated summary analyzing the overall sentiment and key factors
pricenumberCurrent price in USD
price_pct_change24hnumber24-hour price change percentage
news_sentimentnumberSentiment score from -1 to 1 based only on news articles
news_articles_countnumberNumber of news articles analyzed in this snapshot
social_sentimentnumberSentiment score from -1 to 1 based only on social media (Reddit and Twitter/X)
reddit_posts_countnumberNumber of Reddit posts analyzed in this snapshot
x_posts_countnumberNumber of Twitter/X posts analyzed in this snapshot
articlesobjectObject containing news article items and metadata about the analysis
fear_greed_scorenumberSentiment converted to a Fear/Greed score from 0 to 100
fear_greed_labelstringFear/Greed label (Extreme Fear, Fear, Caution, Neutral, Positive, Optimism, Extreme Greed)

Articles Object

FieldTypeDescription
itemsarrayArray of articles, each containing title, URL, text, sentiment and publication timestamp
metadataobjectObject containing analysis metadata
metadata.countsobjectCount of positive, neutral and negative articles
metadata.timeframeobjectStart and end timestamps of analyzed articles
metadata.timestampstringISO 8601 timestamp when the analysis was performed

Article Item

FieldTypeDescription
titlestringTitle of the article
urlstringURL of the article
textstringExcerpt or summary of the article content
sentimentstringSentiment classification (Positive, Neutral, Negative)
published_atstringPublication timestamp of the article

Error Handling

The API uses standard HTTP status codes to indicate success or failure. Here are the most common status codes you might encounter:

Status CodeDescription
200 OKThe request was successful
400 Bad RequestInvalid parameters or missing required parameters
401 UnauthorizedInvalid or missing API key
404 Not FoundThe requested resource was not found
429 Too Many RequestsRate limit exceeded - wait 5 minutes before retrying
500 Internal Server ErrorAn error occurred on the server

Error responses have the following JSON format:

{
  "error": "Error message describing what went wrong",
  "suggestion": "Suggestion for how to fix the error"
}

Common Error Examples

Using history parameters on intraday endpoint

{
  "error": "Invalid parameter: 'from' and 'to' are not supported by the intraday endpoint. Use 'date' parameter instead, or switch to the /history endpoint for date ranges.",
  "suggestion": "Try using: /api/v1/sentiment/coins/btc/history?from=2023-09-01&to=2023-09-07"
}

Using date parameter on history endpoint

{
  "error": "Invalid parameter: 'date' is not supported by the history endpoint. Use 'days', 'from', or 'to' parameters instead, or switch to the /intraday endpoint for single-day data.",
  "suggestion": "Try using: /api/v1/sentiment/coins/btc/intraday?date=2023-09-15"
}

Exceeding maximum history range

{
  "error": "Invalid date range: Historical data is limited to 14 days maximum.",
  "suggestion": "Try using a shorter date range or use: /api/v1/sentiment/coins/btc/history?days=14"
}

Missing API key

{
  "error": "API key is required. Please provide your API key in the \"apiKey\" query parameter or as a Bearer token in the Authorization header.",
  "suggestion": "Add ?apiKey=YOUR_API_KEY to your request URL or include \"Authorization: Bearer YOUR_API_KEY\" in your headers."
}

Invalid API key

{
  "error": "Invalid API key. Please check that your API key is correct and try again.",
  "suggestion": "Verify your API key is correct, or generate a new one from your dashboard at https://tradingvibe.io/dashboard."
}

Expired API key

{
  "error": "This API key expired on 12/15/2023.",
  "suggestion": "Generate a new API key from your dashboard at https://tradingvibe.io/dashboard or contact support to extend your current key."
}

Code Examples

Here are examples of how to use the TradingVibe API in various programming languages:

Fetch Current Sentiment

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://tradingvibe.io/api/v1/sentiment/coins/btc

Fetch Historical Sentiment

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://tradingvibe.io/api/v1/sentiment/coins/eth/history?days=7

Fetch Intraday Sentiment

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://tradingvibe.io/api/v1/sentiment/coins/eth/intraday?date=today

Webhooks

Webhooks allow you to receive real-time HTTP notifications when cryptocurrency sentiment changes meet your specified criteria. Instead of polling the API, webhooks deliver data automatically to your endpoint when conditions are triggered.

Webhooks are available on Hobby plans and above. They can be configured through your account dashboard and offer two trigger types:

Sentiment-Based Triggers

Triggered when sentiment crosses specified thresholds:

  • Greater than: Notify when sentiment exceeds a value
  • Less than: Notify when sentiment drops below a value

Interval-Based Triggers

Triggered at regular time intervals:

  • Every 15 minutes: Real-time updates
  • Hourly: Regular monitoring
  • Every 4 hours: Less frequent updates
  • Daily: Summary notifications

Webhook Payload

When triggered, webhooks send a POST request to your specified URL with a JSON payload containing sentiment data and trigger information:

{
  "event_type": "sentiment_snapshots",
  "trigger_type": "sentiment",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "coin": "BTC",
    "interval": "15m",
    "sentiment": 0.75,
    "price": 45000,
    "price_change_24h": 2.3,
    "news_sentiment": 0.8,
    "social_sentiment": 0.7,
    "news_articles_count": 12,
    "reddit_posts_count": 24,
    "x_posts_count": 18,
    "delta_1h": 0.12,
    "delta_4h": -0.05,
    "delta_24h": 0.23,
    "z_7d": 1.2,
    "z_30d": 0.8,
    "insight": "Bitcoin sentiment remains strongly positive...",
    "threshold_met": true,
    "threshold_value": 0.5,
    "trigger_condition": "greater_than",
    "fear_greed_score": 75,
    "fear_greed_label": "Extreme Greed"
  }
}

Security

Webhooks include optional secret verification for authenticity:

Webhook Secrets

Each webhook can include an optional secret sent in the X-Webhook-Secret header. Secrets can be auto-generated (64-character cryptographically secure) or custom.

// Example webhook secret verification
app.post('/webhook', (req, res) => {
  const receivedSecret = req.headers['x-webhook-secret'];
  const expectedSecret = process.env.WEBHOOK_SECRET;
  
  if (receivedSecret !== expectedSecret) {
    return res.status(401).json({ error: 'Invalid webhook secret' });
  }
  
  // Process verified webhook payload
  const { data } = req.body;
  console.log('Sentiment update:', data.sentiment);
  
  res.status(200).json({ received: true });
});

Request Headers

Webhook requests include these headers:

  • Content-Type: application/json
  • User-Agent: TradingVibe-Webhook/1.0
  • X-Webhook-Secret: Your webhook secret (if configured)
  • X-Webhook-ID: Unique webhook identifier
  • X-Webhook-Delivery: Unique delivery attempt ID

Testing and Reliability

Webhooks can be tested directly from the dashboard using the test button, which sends a sample payload to verify endpoint configuration.

Delivery Guarantees

  • • Automatic retries for failed deliveries (up to 3 attempts)
  • • Exponential backoff starting at 5 minutes
  • • 30-second timeout per request
  • • Expects HTTP 200-299 response for success

Testing & Integration

  • • One-click test button in dashboard
  • • Sample payload verification
  • • Standard HTTP POST requests
  • • JSON payload format

Billing

Webhook deliveries count against your API request quota. This includes successful deliveries, failed delivery attempts, and manual tests from the dashboard.

Implementation Examples

Basic webhook receiver implementations:

const express = require('express');
const app = express();

app.use(express.json());

app.post('/tradingvibe-webhook', (req, res) => {
  // Verify webhook secret
  const receivedSecret = req.headers['x-webhook-secret'];
  const expectedSecret = process.env.TRADINGVIBE_WEBHOOK_SECRET;
  
  if (receivedSecret !== expectedSecret) {
    return res.status(401).json({ error: 'Unauthorized' });
  }
  
  const { event_type, trigger_type, data } = req.body;
  
  // Process webhook data
  console.log(`Received ${event_type} for ${data.coin}`);
  console.log(`Sentiment: ${data.sentiment}, Price: $${data.price}`);
  console.log(`Fear/Greed: ${data.fear_greed_score}/100 (${data.fear_greed_label})`);
  
  if (trigger_type === 'sentiment' && data.threshold_met) {
    console.log('Threshold condition met!');
    // Handle sentiment threshold trigger
  }
  
  res.status(200).json({ received: true });
});

app.listen(3000);