Skip to main content

Scenario

Alpha Vantage’s NEWS_SENTIMENT function returns sentiment scores for tickers and topics across financial news. This job pulls sentiment data for your company’s ticker and competitors, maps the sentiment landscape, then asks Mave to recommend brand positioning adjustments — should you lean into market optimism, differentiate against pessimism, or stay neutral? Flow: Alpha Vantage GET ?function=NEWS_SENTIMENT&tickers={ticker} → Mavera POST /mave/chat → Positioning recommendations

Code

Example Output

Error Handling

25 req/day. Each ticker = 1 call. 3 tickers = 3 calls. Add 15s delay between calls to stay under 5/min. Cache results for same-day re-runs.
Some tickers return empty feeds. Check r.json().get("Note") for rate-limit messages — Alpha Vantage returns 200 with a note instead of 429.
Scores range -1 to +1. Thresholds: above 0.35 = bullish, below -0.35 = bearish, between = neutral. Adjust thresholds for your industry.