gold-price-alertslisted
Install: claude install-skill nusantara-ventures/goldprice-skills
# 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
```bash
curl -H "Authorization: Bearer ga_live_..." \
"https://api.goldprice.dev/v1/spot/XAU-USD-SPOT"
```
Response (values are **strings**; `symbol` is the base only):
```json
{"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
1. **Respect `is_stale`.** Never fire (or clear) an alert on a row where `is_stale` is `true` — you'd alert on a frozen price. For provenance, add `?include=sources` to see each source's own `is_stale`, `fetched_at`, and `source_timestamp`.
2. **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
```python
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"]