Skip to content

market-feedUnified financial market data

One TypeScript client for Yahoo Finance, Alpha Vantage, Polygon.io, Finnhub, Twelve Data, and Tiingo β€” with caching, fallback, streaming, and React hooks built in.

Quickstart ​

bash
npm install market-feed
ts
import { MarketFeed } from "market-feed";

const feed = new MarketFeed(); // zero-config β€” Yahoo Finance, no API key needed

const quote = await feed.quote("AAPL");
console.log(`${quote.symbol}: $${quote.price.toFixed(2)}`);
// AAPL: $189.84

That's it. No API keys, no boilerplate.

Subpath modules ​

ImportDescription
market-feedCore client + all six providers
market-feed/calendarOffline exchange calendar for 8 markets + crypto
market-feed/streamMarket-hours-aware HTTP polling async generator
market-feed/wsWebSocket streaming from Polygon / Finnhub
market-feed/consensusParallel multi-provider weighted price consensus
market-feed/indicatorsSMA, EMA, RSI, MACD, Bollinger Bands, ATR, VWAP, Stochastic
market-feed/portfolioLive P&L and unrealised gains tracking
market-feed/backtestPure-function backtesting engine
market-feed/alertsPrice / volume alert async generator
market-feed/fundamentalsIncome statements, balance sheets, cash flows
market-feed/screenerFilter symbols by price, volume, market cap, and more
market-feed/optionsOptions chains with Greeks from Polygon.io
market-feed/macroFRED macroeconomic indicators (CPI, GDP, Fed Funds…)
market-feed/reactuseQuote, useStream, useAlerts, useWebSocket, useOrderBook hooks (React β‰₯ 18 + React Native)
market-feed/browserCORS proxy utilities for browser-side use
market-feed/trpctRPC router + fetch-compatible HTTP handler
market-feed/cachePersistent cache drivers: Redis, Upstash, SQLite

Released under the MIT License.