New Buy Listing
Posts to Slack any time a brand-new aggressive buy appears in get-recent-buys (days_in_trade = 0).
// The Problem
What this recipe solves
Fresh buy signals are the highest-urgency output from Guavy's simulator. This script surfaces them the moment they appear, zero-day trades only.
// 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.
# new_buys.py (run hourly via cron)
import os, requests
API = "https://guavy.com/api/v1"
H = {"Authorization": f"Bearer {os.environ['GUAVY_KEY']}"}
buys = requests.get(
f"{API}/trades/get-recent-buys",
headers=H,
params={"strategy": "aggressive", "limit": 20}
).json()["trades"]
fresh = [b for b in buys if b["days_in_trade"] == 0]
for b in fresh:
print(f"NEW BUY · {b['symbol']} @ {b['start_price']} ({b['start_date']})")
# notify_slack(...)
// 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.