Claude uses live stock screener API to filter markets without hallucinating
Kevin Meneses González built an agentic setup where Claude calls a real stock screener API (EODHD) as a tool, letting it reason over live market data instead of reciting stale training-data tickers.
Score breakdown
Giving an LLM a structured, live data API as a callable tool — rather than relying on its training knowledge — is the pattern that makes financial (and other data-sensitive) agents actually reliable.
- 01Author Kevin Meneses González built an agentic stock-screening system using Claude and the EODHD Screener API.
- 02The core problem addressed: LLMs recite tickers from stale training data and often fabricate valuations like P/E ratios.
- 03The EODHD Screener API accepts [field, operator, value] filter conditions and returns structured JSON.
Kevin Meneses González argues that most "AI picks stocks" demos are misleading because LLMs have no live access to market data — they recite tickers from training data, quote P/E ratios that may be months out of date, and sometimes fabricate figures entirely. His experiment replaces that pattern with a proper tool-use architecture: Claude is given a callable stock screener backed by the EODHD Screener API, which accepts structured `[field, operator, value]` filter conditions and returns clean, typed JSON with fields like `market_capitalization`, `earnings_share`, `sector`, `exchange`, and `dividend_yield`.
The article notes that screener results shift as earnings update and market caps move, so any given run is a snapshot rather than a fixed list.
The implementation is three components: a `run_screener` Python function that hits the EODHD endpoint, a tool definition passed to Claude via the `anthropic` SDK that describes available fields and operators, and an agentic loop that lets Claude call the tool, inspect results, and optionally call it again. When given a natural-language goal — finding profitable mid-cap stocks outside mega-cap territory — Claude autonomously constructed filters including a market-cap floor, a market-cap ceiling, and a positive `earnings_share` requirement, then performed a second-pass narrowing before producing its shortlist. The article notes that screener results shift as earnings update and market caps move, so any given run is a snapshot rather than a fixed list.
Key facts
- 01Author Kevin Meneses González built an agentic stock-screening system using Claude and the EODHD Screener API.
- 02The core problem addressed: LLMs recite tickers from stale training data and often fabricate valuations like P/E ratios.
- 03The EODHD Screener API accepts [field, operator, value] filter conditions and returns structured JSON.
- 04Filterable fields include market_capitalization, earnings_share, sector, exchange, and dividend_yield.
- 05The architecture has three parts: a Python screener function, a Claude tool definition, and an agentic call loop.
- 06When given a goal, Claude independently constructed multi-condition filters (market-cap floor, ceiling, positive EPS) without explicit instruction.
- 07Screener results are a live snapshot and change as earnings update and market caps shift.
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 7, 2026 · 12:45 UTC. How this works →