Skip to content

Dow Sentiment Flip

Lists any Dow 30 name whose sentiment polarity flipped (positive ↔ negative dominant) since the prior reading.

Alert Stocks 1 tool 90 Tokens / Run Python · Node.js

What this recipe solves

Mood on a large cap turns well before the next earnings print, but nobody watches thirty tickers by hand. This script checks the whole index in one pass and only speaks up on a flip.

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.

Python
# dow_flip.py
import os, requests

API  = "https://guavy.com/api/v2/stocks"
H    = {"Authorization": f"Bearer {os.environ['GUAVY_KEY']}"}
DOW  = "AAPL AMGN AMZN AXP BA CAT CRM CSCO CVX DIS DOW GS HD HON IBM JNJ JPM KO MCD MMM MRK MSFT NKE NVDA PG SHW TRV UNH V WMT".split()

def dominant(row):
    return max(("positive", "negative", "neutral"), key=lambda k: row.get(k, 0))

for sym in DOW:
    rows = requests.get(
        f"{API}/sentiment/get-sentiment-history/{sym}",
        headers=H, params={"limit": 2}
    ).json()["sentiment"]
    rows.sort(key=lambda r: r["timestamp"], reverse=True)
    if len(rows) < 2:
        continue
    now, prev = rows[0], rows[1]
    if dominant(now) != dominant(prev):
        print(f"{sym} flipped {dominant(prev)} → {dominant(now)} "
              f"(pos:{now['positive']} / neg:{now['negative']} / neu:{now['neutral']})")

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.

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.

Disclaimer: Guavy is a data and market intelligence provider, not an investment advisor. The information, signals, and market analysis provided by the Guavy API and related services are for informational purposes only and are not intended as financial advice, investment recommendations, or an endorsement of any particular trading strategy. Trading in volatile markets, including cryptocurrency, carries significant risk and may not be suitable for all investors. Past performance is not indicative of future results. Users should consult with a qualified financial professional before making any investment decisions. Guavy makes no guarantee of trading profits or financial returns.

Market sentiment intelligence for apps, funds & agents

Location

729 55 Ave SW
Calgary AB T2V 0G4
Canada

© 2026 Guavy Inc