Overview of PokieTicker Architecture and API
mainPokieTicker is a full-stack application consisting of a React/D3.js frontend and a FastAPI/SQLite backend. It uses an XGBoost-based prediction system that combines news sentiment with technical indicators.
Backend API Endpoints
The backend exposes several key API routes used by the frontend:
/api/stocks/{sym}/ohlc: Retrieves OHLC price data for a specific symbol./api/news/{sym}?date=: Retrieves news for a specific symbol and date./api/news/{sym}/categories: Retrieves news categorized by impact type./api/predict/{sym}/forecast: Generates 7-day and 30-day forecasts./api/analysis/deep: Triggers deep AI analysis (Sonnet) on a specific story or range./api/pipeline/fetch&/api/pipeline/process: Triggers data ingestion and processing pipelines.
Data Pipeline Layers
The system processes data through three distinct layers:
- Layer 0 (Rule Filter): Filters raw Polygon API data to reject spam and listicles (~17% rejection rate).
- Layer 1 (Haiku Batch API): Uses Claude Haiku to score news sentiment and extract bullish/bearish reasons in batches.
- Layer 2 (Sonnet On-Demand): Uses Claude Sonnet for deep, detailed analysis when a user clicks a specific news item.