Weekly Sentiment Report
A weekly CSV or markdown report showing the 7-day sentiment trajectory for a user-supplied list of coins.
// The Problem
What this recipe solves
Tracking sentiment week-over-week across multiple coins requires manual exports and spreadsheet work. This script automates the pull and formats the output for sharing.
// The Script
Copy, run, ship
Drop this script into your project and run it locally or on a
cron. Set GUAVY_KEY in your
environment, swap the symbols, and go.
# weekly_sentiment.py
import os, requests, csv, sys
API = "https://guavy.com/api/v1"
H = {"Authorization": f"Bearer {os.environ['GUAVY_KEY']}"}
SYMBOLS = ["BTC", "ETH", "SOL", "AVAX", "LINK"]
writer = csv.writer(sys.stdout)
writer.writerow(["symbol", "date", "positive", "negative", "neutral"])
for s in SYMBOLS:
data = requests.get(
f"{API}/sentiment/get-sentiment-history/{s}",
headers=H,
params={"limit": 7}
).json()
for d in data["sentiment"]:
writer.writerow([s, d["date"], d["positive"], d["negative"], d["neutral"]])
// Guavy Tools in Play
1 tool, one script
This script calls 1 endpoint from the Guavy REST API. Every data point maps back to the endpoint it came from.
// Keep Exploring
Related recipes
Same API key, different job-to-be-done.
// Get started
Run this recipe in under 2 minutes
Grab a free API key, set it as an env var, and run the script. Free sandbox forever.