Commodity supply-shock watch
Flags fearful news across energy, metals, and agriculture: items Guavy scored as FUD, at or above a FUD/FOMO intensity you choose.
// The Problem
What this recipe solves
Supply scares, inventory surprises, and weather worries are easy to miss across seven commodities. This script checks each one's latest scored news and flags the items that read as FUD.
// 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.
# commodity_fud.py (run hourly via cron)
import os, requests
API = "https://guavy.com/api/v2/commodities"
H = {"Authorization": f"Bearer {os.environ['GUAVY_KEY']}"}
SYMBOLS = ["Oil", "Gold", "Silver", "Copper", "NaturalGas", "Wheat", "Corn"]
THRESHOLD = 7 # FUD/FOMO intensity, 0 to 10
for sym in SYMBOLS:
briefs = requests.get(
f"{API}/newsroom/get-recent-briefs/{sym}",
headers=H, params={"limit": 10}
).json()["briefs"]
for b in briefs:
if (b.get("fud_fomo_bias") or "").lower() == "fud" and (b.get("fud_fomo_score") or 0) >= THRESHOLD:
print(f"[{sym}] FUD {b['fud_fomo_score']}: {b['title']}")
// 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, a different job.
// Get started
Run this recipe on the free plan
Grab a free API key, set it as an env var, and run the script. Free sandbox forever.