Gold price alerts
Build a gold price alert / monitor / watcher that polls goldprice.dev and fires when a threshold is crossed — staying inside the Free tier's rate limit and quota. Use this whenever the user builds a gold price alert, monitor, watcher, cron job, or "notify me when gold hits X" bot — even if they don't mention rate limits or goldprice.dev. Especially reach for it when they worry about polling frequency, running out of quota, or alerting on a stale/frozen price.From its SKILL.md
npx -y skills add nusantara-ventures/goldprice-skills --skill gold-price-alertsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.9 KB, 698 tokens by cl100k_base, as published. Nobody here has run it
goldprice.dev — price alerts (Free-tier friendly)
Poll the spot price, compare to a threshold, notify. Runs on the Free tier (free key, no card): 30 req/min, 1,000 req/mo.
Poll the spot price
curl -H "Authorization: Bearer ga_live_..." \
"https://api.goldprice.dev/v1/spot/XAU-USD-SPOT"
Response (values are strings; symbol is the base only):
{"symbol":"XAU","quote_currency":"USD","unit":"troy_ounce","contract_type":"spot","price":"4165.16","bid":"4167.03","ask":"4163.28","is_stale":false,"computed_at":"2026-07-07T13:12:19Z"}
Compare float(price) to your threshold; notify on crossing. bid/ask carry the spread if you need it.
Two rules that keep alerts correct
- Respect
is_stale. Never fire (or clear) an alert on a row whereis_staleistrue— you'd alert on a frozen price. For provenance, add?include=sourcesto see each source's ownis_stale,fetched_at, andsource_timestamp. - Budget your polls against the quota. 1,000/mo ≈ one poll every ~43 min if run continuously. Poll only during the hours you care about, cache the last value, and dedupe repeat notifications. Physical ($10) raises this to 20k/mo, Pro ($30) to 100k/mo when you need tight cadence.
Sketch
import time, httpx
THRESHOLD, last = 3400.0, None
while True:
r = httpx.get("https://api.goldprice.dev/v1/spot/XAU-USD-SPOT",
headers={"Authorization": "Bearer ga_live_..."}).json()
if not r["is_stale"]:
price = float(r["price"])
if last is not None and (last < THRESHOLD <= price or last > THRESHOLD >= price):
notify(f"gold crossed {THRESHOLD}: {price}")
last = price
time.sleep(300) # 5 min: inside the 30/min rate limit. But continuous
# 5-min polling is ~8.6k/mo — over Free's 1k/mo. On Free,
# run only during your alert window; ~hourly fits 1k/mo.
Divergence alerts (no key)
Alert when sources disagree — a data-quality signal:
curl "https://api.goldprice.dev/v1/prices/divergence?threshold=50"
Anonymous returns a count; authenticated returns per-symbol detail (tier-filtered). threshold is in basis points.
When to upgrade
Higher poll cadence → Physical/Pro quota. Silver/copper alerts (XAG/HG) → Pro. Sub-second reaction → Realtime Pro ($80) WebSocket stream instead of polling (see the realtime docs at https://goldprice.dev/docs/stream).
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.