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
, andsocial_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
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.
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
Integrate into your application
Use our code examples to integrate the sentiment data into your application:
View Code ExamplesRequest 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:
Endpoint | Description | Plan Availability |
---|---|---|
/api/v1/sentiment/coins/:coin | Current sentiment for a coin. btc , eth , or sol | All plans |
/api/v1/sentiment/coins | Current sentiment for all supported coins | Builder and above |
/api/v1/sentiment/coins/:coin/intraday | 15-minute snapshots for a specific day (default: today) | Builder and above |
/api/v1/sentiment/coins/:coin/history | Daily sentiment data over a date range (default: 7 days) | Builder and above |
Query Parameters
Use query parameters to customize your API requests:
Parameter | Description | Example |
---|---|---|
include | Include optional data in the response (currently only 'articles' is supported for current sentiment endpoint) | /api/v1/sentiment/coins/btc?include=articles |
article_limit | Limit the number of articles returned (current sentiment endpoint only) | /api/v1/sentiment/coins/btc?include=articles&article_limit=5 |
date | Get 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 |
days | Number of days to look back from today for historical data (maximum: 14) | /api/v1/sentiment/coins/btc/history?days=10 |
from | Start date for historical data in YYYY-MM-DD format (overrides days parameter if provided) | /api/v1/sentiment/coins/btc/history?from=2023-09-01 |
to | End 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.
Plan | Monthly Requests | Price | Overage Cost | Features |
---|---|---|---|---|
Free | 100 | $0/forever | Not available |
|
Hobby | 2,500 | $9/month | $0.012/request |
|
Builder | 10,000 | $49/month | $0.006/request |
|
Professional | 50,000 | $199/month | $0.0045/request |
|
Enterprise | 250,000+ | Contact sales | Volume-based |
|
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 remainingX-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 AccessEndpoints
Current Sentiment
Intraday Sentiment
Historical Sentiment
Current Sentiment (All Coins)
Data Model
Sentiment Snapshot
Field | Type | Description |
---|---|---|
ts | string | ISO 8601 timestamp with timezone when the snapshot was created |
interval | string | Data interval, either "15m" (15-minute snapshots) or "1d" (daily summaries) |
coin | string | Cryptocurrency symbol (BTC, ETH, SOL) |
sentiment | number | Overall sentiment score from -1 (very negative) to 1 (very positive), considering all sources |
delta_1h | number | Change vs 1 hour ago (4 snapshots) |
delta_4h | number | Change vs 4 hours ago (16 snapshots) |
delta_24h | number | Change vs 24 hours ago (96 snapshots) |
z_7d | number | Z-score of current sentiment over the last 7 days |
z_30d | number | Z-score over 30 days |
insight | string | AI-generated summary analyzing the overall sentiment and key factors |
price | number | Current price in USD |
price_pct_change24h | number | 24-hour price change percentage |
news_sentiment | number | Sentiment score from -1 to 1 based only on news articles |
news_articles_count | number | Number of news articles analyzed in this snapshot |
social_sentiment | number | Sentiment score from -1 to 1 based only on social media (Reddit and Twitter/X) |
reddit_posts_count | number | Number of Reddit posts analyzed in this snapshot |
x_posts_count | number | Number of Twitter/X posts analyzed in this snapshot |
articles | object | Object containing news article items and metadata about the analysis |
fear_greed_score | number | Sentiment converted to a Fear/Greed score from 0 to 100 |
fear_greed_label | string | Fear/Greed label (Extreme Fear, Fear, Caution, Neutral, Positive, Optimism, Extreme Greed) |
Articles Object
Field | Type | Description |
---|---|---|
items | array | Array of articles, each containing title, URL, text, sentiment and publication timestamp |
metadata | object | Object containing analysis metadata |
metadata.counts | object | Count of positive, neutral and negative articles |
metadata.timeframe | object | Start and end timestamps of analyzed articles |
metadata.timestamp | string | ISO 8601 timestamp when the analysis was performed |
Article Item
Field | Type | Description |
---|---|---|
title | string | Title of the article |
url | string | URL of the article |
text | string | Excerpt or summary of the article content |
sentiment | string | Sentiment classification (Positive, Neutral, Negative) |
published_at | string | Publication 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 Code | Description |
---|---|
200 OK | The request was successful |
400 Bad Request | Invalid parameters or missing required parameters |
401 Unauthorized | Invalid or missing API key |
404 Not Found | The requested resource was not found |
429 Too Many Requests | Rate limit exceeded - wait 5 minutes before retrying |
500 Internal Server Error | An 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/jsonUser-Agent
: TradingVibe-Webhook/1.0X-Webhook-Secret
: Your webhook secret (if configured)X-Webhook-ID
: Unique webhook identifierX-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);