-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Open
Labels
area: APIBackend API, sidecar, keysBackend API, sidecar, keysarea: marketsMarkets, commodities, crypto, financeMarkets, commodities, crypto, financeenhancementNew feature or requestNew feature or request
Description
Why Alpha Vantage
WorldMonitor currently uses two free market data sources with known reliability issues:
| Source | Problem |
|---|---|
| Yahoo Finance | IP-level 429s on Vercel requiring Railway relay workaround; 15–30 min delay on commodity futures (NYMEX/COMEX); unofficial scraper-based access — no SLA |
| Finnhub (free) | Burst-sensitive (429s above ~10 req/min); US stocks only; no indices, no commodities, no futures |
Alpha Vantage at $49.99/month solves both with a single licensed API key.
What Alpha Vantage covers at entry tier ($49.99/mo)
| Asset class | Coverage |
|---|---|
| US stocks | Real-time quotes |
| Indices | S&P 500, Dow, Nasdaq, VIX |
| Commodity futures | Gold (GC=F), WTI Crude (CL=F), Natural Gas (NG=F), Silver (SI=F), Copper (HG=F) |
| Forex | Real-time currency pairs |
| Crypto | Intraday real-time |
| ETFs | Real-time US ETFs |
| Extended hours | Pre/post market data |
| News + AI sentiment | Per-ticker sentiment scores |
| Economic indicators | Built-in series |
| Fundamentals | Earnings, income statements, ratios |
Rate limit: 75 req/min with REALTIME_BULK_QUOTES supporting up to 100 symbols per call → ~7,500 symbols/minute effective throughput. WM's polling-every-minute architecture maps directly to this.
Why this beats the current stack
- No IP rate limiting — dedicated API key, not shared Vercel IP pool
- No Railway relay needed for market data fetches
- Real-time commodity futures — fixes 30-min NYMEX/COMEX delay from Yahoo
- One API key, all asset classes — no more Finnhub + Yahoo + relay complexity
- Official licensed data — SLA-backed, not scraper-dependent
- Cost: $49.99/mo vs $0 current, but eliminates engineering overhead of the Yahoo/Finnhub reliability workarounds
What stays unchanged
- CoinGecko — crypto sector market cap breakdown (AV covers prices, not sector aggregates)
- FRED / EIA / BIS — macro/economic series (unrelated to market quotes)
Implementation outline
- Register at https://www.alphavantage.co/ and obtain
ALPHA_VANTAGE_API_KEY - Add key to Railway + Vercel env vars
- Replace Yahoo Finance fetcher in
server/worldmonitor/market/v1/_shared.tswith AVREALTIME_BULK_QUOTESendpoint - Update
scripts/seed-market-quotes.mjs— batch symbols into groups of 100, single AV call per batch - Update
scripts/seed-commodity-quotes.mjs— switch from YahooGC=F/CL=Fsymbols to AV physical commodity endpoints - Update
scripts/seed-etf-flows.mjs— AV ETF quotes - Keep Finnhub as optional fallback or deprecate entirely
- Remove Railway relay Yahoo proxy route once migration is validated
API Documentation
- Main docs: https://www.alphavantage.co/documentation/
- Real-time bulk quotes: https://www.alphavantage.co/documentation/#realtime-bulk-quotes
- Commodities: https://www.alphavantage.co/documentation/#commodities
- Forex: https://www.alphavantage.co/documentation/#fx-intraday
- Crypto: https://www.alphavantage.co/documentation/#crypto-intraday
- News + sentiment: https://www.alphavantage.co/documentation/#news-sentiment
- Technical indicators: https://www.alphavantage.co/documentation/#technical-indicators
- Fundamental data: https://www.alphavantage.co/documentation/#fundamentals
Pricing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: APIBackend API, sidecar, keysBackend API, sidecar, keysarea: marketsMarkets, commodities, crypto, financeMarkets, commodities, crypto, financeenhancementNew feature or requestNew feature or request