Getting started
Raspberry API gives you stock-market insights built from what traders are saying on X (Twitter), in real time. This guide walks you through it in plain English — no technical background needed.
https://raspberrytrades.comFast by design. Cached responses return in milliseconds; a live lookup takes a second or two while we fetch fresh tweets and score them with AI.
Quickstart — your first call in 3 steps
From zero to live market sentiment in about a minute.
Make your first call
Paste your key and ask for any US ticker. Pick your language:
import requests
resp = requests.get(
"https://raspberrytrades.com/api/sentiment",
headers={"x-api-key": "ra_live_your_key_here"},
params={"ticker": "NVDA"},
)
data = resp.json()
print(data["sentiment"]["label"], data["sentiment"]["score"])Read the response
You get back clean JSON — the overall sentiment label & score, the bullish / bearish / neutral split, and the top tweets behind it. See the full shape in Example below.
Prefer no code? Use it on TradingView
Two free browser add-ons drop our data right inside TradingView for the stock you're viewing — no coding needed, they update as you switch symbols. One for each API: live X sentiment and the breakout radar.
Install Tampermonkey
A free browser extension that runs small add-ons. Get it for your browser at tampermonkey.net.
Open TradingView
Open any US stock on tradingview.com and a panel appears showing whether traders on X are bullish or bearish on it, right now — with the tweets behind it.
Developer details+
The add-on is a Tampermonkey userscript that calls /api/sentiment for the symbol shown in the TradingView tab, using your own API key (it prompts for it on first run and stores it locally in your browser — click the 🔑 in the widget to change it). Your calls count against your plan's quota.
Get an API key
An API key is like a password for your app. Create one in your dashboard and use it to access Raspberry API data. Keep your key private — never share it publicly or post it online.
Developer details+
Your key starts with ra_live_. Treat it as a secret and keep it on your server — never ship it in front-end code. One key works for every Raspberry API endpoint.
Connecting
Every request includes your API key so we know it's you. Add the key to your request and you're connected. If a request is missing a valid key, it simply won't return any data.
Developer details+
Send your key in the x-api-key header on every request (or ?api_key= in the URL for a quick browser test). Missing or invalid keys return 401.
x-api-key: ra_live_8f2a9c4d1e6b7a3f...What you can ask for
Here's what the API can tell you. The technical request details for each one are tucked away — open them only if you need them.
/api/sentimentSee whether traders on X are bullish or bearish on any US stock, right now.
Advanced parameters+
/api/sentiment| Parameter | Type | Description |
|---|---|---|
ticker | string | US stock symbol, e.g. NVDA (required) |
fresh | 0 | 1 | 1 = bypass the 5-min cache and fetch live now (optional) |
x-api-key | header | Your API key (required) |
/api/influencersFind stocks set up to break out — clean staircase, pullback, base and flag setups across ~1,000 US stocks, each graded A/B/C and validated against the real chart (extended, dead and index names filtered out). Filter by setup with ?setup=staircase.
Advanced parameters+
/api/influencers| Parameter | Type | Description |
|---|---|---|
setup | string | Filter by pattern: staircase | base | flag (optional) |
ticker | string | Check a single symbol, e.g. NVDA (optional) |
x-api-key | header | Your API key (required) |
/api/insidersSee who's buying or selling their own stock — recent insider trades straight from official SEC filings.
Advanced parameters+
/api/insiders| Parameter | Type | Description |
|---|---|---|
ticker | string | US stock symbol, e.g. NVDA (required) |
x-api-key | header | Your API key (required) |
Example
When you ask for a stock's sentiment, here's the kind of answer you get back:
Show the code & raw data (for developers)+
The same request in your language of choice:
import requests
resp = requests.get(
"https://raspberrytrades.com/api/sentiment",
headers={"x-api-key": "ra_live_your_key_here"},
params={"ticker": "NVDA"},
)
data = resp.json()
print(data["sentiment"]["label"], data["sentiment"]["score"])And the raw response it returns:
{
"ticker": "NVDA",
"updatedAt": "2026-06-16T14:32:08Z",
"source": "x/twitter241",
"sampleSize": 24,
"sentiment": {
"label": "bullish",
"score": 0.42,
"bullish": 14,
"bearish": 4,
"neutral": 6
},
"topTweets": [
{
"author": "ripster47",
"verified": true,
"text": "$NVDA breaking out of this base, watching 145 for the trigger",
"likes": 1280,
"sentiment": "bullish",
"url": "https://x.com/ripster47/status/..."
}
],
"cached": false,
"ageSeconds": 0
}