Commodity Supply-Shock Watch
Fires when a commodity's news turns fearful: FUD-biased briefs above a configurable threshold across energy, metals, and agriculture.
// The Problem
What this recipe solves
Supply shocks, inventory surprises, and weather scares show up in the news before they settle into price. This script polls Guavy's per-commodity briefs and flags the fearful ones.
// 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 = 0.7 # configurable
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") == "FUD" and b.get("fud_fomo_score", 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, 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.