How jfarid27/hyperfin-terminal works
Hyperfin is an interactive financial-markets CLI. Users enter a domain menu, request market or economic data, and view results in the terminal; the README also documents running command scripts and configuring API keys. The graph preserves the documented asset, news, options, and prediction-market branches. Detailed call wiring is sampled only for the application entry and stock and Yahoo Finance services, so other menu-to-service connections are shown at subsystem level rather than as inferred internal pipelines.
Main entry points: cli/index.ts Main menu · MassiveService/index.ts Massive service · StocksMenu/index.ts Stocks menu · alphavantage.ts Stock actions
Components 33
CLI runtime
- Program entry
index.ts - Main menu
src/cli/index.ts
Market menus
- Stocks menu
src/cli/StocksMenu/index.ts - Stock actions
src/cli/StocksMenu/actions/alphavantage.ts - Options menu
src/cli/OptionsMenu/index.ts - Bonds menu
src/cli/BondsMenu/index.ts - Crypto menu
src/cli/CryptoMenu/index.ts - Government menu
src/cli/GovernmentMenu/index.ts - News menu
src/cli/NewsMenu/index.ts - Prediction menus
src/cli/PredictionMarketMenu/index.ts
Data services
- Stock providers
src/services/AlphaVantageService/index.ts - Massive service
src/services/MassiveService/index.ts - Yahoo options
src/services/OptionsService/YahooFinanceOptionsService.ts - Yahoo bonds
src/services/BondsService/YahooFinanceBondsService.ts - Crypto services
src/services/CryptoService/index.ts - Government service
src/services/GovernmentService/index.ts - Reddit service
src/services/RedditService/index.ts - Kalshi service
src/services/KalshiService/index.ts - Polymarket service
src/services/PolymarketService/index.ts
Shared services
- Terminal state
src/cli/services/TerminalUserState.ts - Fetch service
src/cli/services/FetchService.ts - Configuration
src/cli/services/ConfigService.ts
Automation
- Script execution
src/cli/utils/scripts.ts
Other components
- CLI user
- Yahoo Finance
- Alpha Vantage
- Massive API
- FRED API
- CoinGecko API
- Kalshi API
- Polymarket API
- Terminal output
Connections 36
- CLI user → Program entry: starts
- Program entry → Main menu: starts
- Main menu → Terminal state: initializes
- Main menu → Stocks menu: dispatches
- Main menu → Options menu: dispatches
- Main menu → Bonds menu: dispatches
- Main menu → Crypto menu: dispatches
- Main menu → Government menu: dispatches
- Main menu → News menu: dispatches
- Main menu → Prediction menus: dispatches
- Main menu → Script execution: dispatches
- Stocks menu → Stock actions: handles
- Stock actions → Stock providers: queries
- Stock actions → Massive service: queries
- Stock providers → Fetch service: fetches via
- Massive service → Fetch service: fetches via
- Stock providers → Configuration: reads key
- Massive service → Configuration: reads key
- Fetch service → Alpha Vantage: requests
- Massive service → Massive API: requests
- Yahoo options → Yahoo Finance: requests
- Yahoo bonds → Yahoo Finance: requests
- Government service → FRED API: requests
- Crypto services → CoinGecko API: requests
- Reddit service → Reddit: requests
- Kalshi service → Kalshi API: requests
- Polymarket service → Polymarket API: requests
- Stocks menu → Terminal output: displays
- Options menu → Terminal output: displays
- Bonds menu → Terminal output: displays
- Crypto menu → Terminal output: displays
- Government menu → Terminal output: displays
- News menu → Terminal output: displays
- Prediction menus → Terminal output: displays
- CLI user → Main menu: enters commands
- Script execution → Main menu: executes commands