Signal Change Alert
Pushes a notification whenever the current trade action for a watched coin transitions (Buy → Hold, Hold → Sell, etc.).
// The Problem
What this recipe solves
Signal transitions are the moments that matter most, but they happen silently between checks. This script tracks state and fires an alert the instant a transition occurs.
// 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.
# signal_watcher.py (run every 15 min via cron)
import os, json, requests
API = "https://guavy.com/api/v1"
H = {"Authorization": f"Bearer {os.environ['GUAVY_KEY']}"}
WATCHLIST = ["BTC", "ETH", "SOL", "AVAX", "LINK"]
STATE = "signal_state.json"
last = json.load(open(STATE)) if os.path.exists(STATE) else {}
for s in WATCHLIST:
cur = requests.get(
f"{API}/trades/get-current-action/{s}/aggressive",
headers=H
).json()["action"]
if last.get(s) and last[s] != cur:
print(f"{s}: {last[s]} → {cur}")
# notify_slack(...)
last[s] = cur
json.dump(last, open(STATE, "w"))
// 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.