SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor

How to Use Claude for Stock and Options Analysis

Learn how to use Claude with delayed market data: a free no-key API, three connection methods, and copy-ready prompts for grounded stock and options answers.

Claude dey very good for reading financial data and explaining wetin e mean. But e no too good for knowing today numbers, because language model training data dey stop months before you ask your question. The solution simple: give Claude current market data from an API, then make e do wetin e really good at: analysis, comparison, and plain-English explanation.

This guide show you how to do am with free market data API, three different ways to connect Claude to am, and working prompts wey you fit copy. Full disclosure: Strasmore own the API, and na our team build am. E no need account, so you fit try everything for this guide within the next five minutes.

Why Claude need a data source

Ask Claude “wetin be Microsoft dividend yield now” when no tools attach, you go see one of two failure modes. E fit refuse, or e fit answer with training data wey don old for months. Both happen because the model no get access to current prices. E no fit look up anything by itself.

Attach a data source, and the situation go change completely. Claude dey read JSON well, e fit keep dozens of rows for context without losing track, and e go gladly compare, rank, and summarize wetin the data actually show. The answer quality now depend on the quality of the data wey you give am.

Free market data API wey no need key

Strasmore demo API dey serve catalog of fixed queries for US stocks and options data as plain JSON. No signup, no API key, and no rate-limit wahala. Full endpoint reference dey for the API documentation post; short version be this:

# What queries exist? (start here)
curl "https://ai.strasmore.com/api/demo/catalog"

# The highest large-cap dividend yields right now
curl "https://ai.strasmore.com/api/demo?q=dividend_yield_leaders"

# Implied-volatility leaders in the options market
curl "https://ai.strasmore.com/api/demo?q=iv_leaders"

# The latest market headlines with tickers
curl "https://ai.strasmore.com/api/demo?q=latest_market_news"

Each response dey include the rows, column names, and exact SQL wey produce the numbers. That last part matter for AI work: you fit show Claude the SQL together with the data, and e go explain the query as well as the result.

The data no be live. Equity prices dey delayed, options greeks and implied volatility na end-of-day values, and result for each query dey refresh at most every ten minutes. So if you poll faster, na the same rows you go get. For learning, screening, and analysis workflows, na exactly wetin you need. E no be trading feed, and this guide na about analysis, not trade execution.

Way 1: paste JSON go one chat

Dis na version wey no need setup. Run one curl, copy the JSON, then paste am for Claude chat with clear instruction. E go work for claude.ai web app, desktop app, or any chat interface.

Prompt shape wey dey work well:

Here is JSON from a market data API. The `sql` field shows exactly
how the numbers were computed.

[paste the JSON here]

1. Summarize what this data shows in plain English.
2. Which three rows stand out, and what makes them unusual?
3. What would you want to check next before drawing conclusions?

The third question na the important one. E push Claude to name the limits of the data instead of making claims wey pass wetin data fit support. E suggestions ("check the payout history", "compare against the sector") often dey make better next query pass anything wey you for type without context.

Way 2: make Claude Code fetch the data by itself

If you dey run Claude Code, you fit skip the copy-paste completely, because Claude Code fit run curl by itself. Ask am question and tell am where the data dey:

Fetch https://ai.strasmore.com/api/demo/catalog, pick the query that
best answers this question, fetch it, and analyze the result:
which large-cap stocks pay the highest dividend yields right now,
and how do their P/E ratios compare?

Claude Code go read the catalog, choose dividend_yield_leaders, fetch am, then work with the real rows. Because the agent loop dey run for your machine, e fit also work together with everything else for there: e fit save results to files, draw chart with a Python script, or compare today's screen with the one e save last week. One cost wey you need monitor: every JSON payload wey the agent fetch dey remain inside the conversation and dem go send am again for the next turn. Na why long Claude Code session dey cost plenty be this.

Linux server wey dey always on na the natural place for this workflow. Daily loop wey go "fetch the screens, compare with yesterday, write me a summary" need machine wey no dey sleep, and we get complete guide for how to run Claude Code on VPS with tmux so sessions fit continue after SSH disconnects. If you choose this method, first read our guide for how to run AI agents safely on VPS; agent wey get shell access need proper guardrails.

Way 3: Claude API with fetch tool

For software wey you dey build, give Claude the API as tool. With Anthropic's Python SDK, the whole wiring na one tool definition and one fetch function:

import json, urllib.request
import anthropic

def fetch_demo(query_key: str) -> str:
    url = f"https://ai.strasmore.com/api/demo?q={query_key}"
    with urllib.request.urlopen(url, timeout=30) as r:
        return r.read().decode()

client = anthropic.Anthropic()
tools = [{
    "name": "fetch_market_data",
    "description": "Fetch a fixed market-data query. Keys are listed at "
                   "https://ai.strasmore.com/api/demo/catalog e.g. "
                   "dividend_yield_leaders, iv_leaders, latest_market_news.",
    "input_schema": {
        "type": "object",
        "properties": {"query_key": {"type": "string"}},
        "required": ["query_key"],
    },
}]

# Claude decides when to call the tool; your loop executes fetch_demo()
# and returns the JSON as the tool result. See Anthropic's tool-use docs.

Claude go call the tool when question need data. You go execute the fetch, return the JSON, and Claude go answer from real rows instead of memory. The client go collect your key from the environment. So if this code go end up for server or behind cloud provider, first work out how to authenticate the client there before you hardcode anything. This na also the only route wey dey bill you per token instead of using chat subscription. Before you scale am, check whether Claude API get free tier and how much you go pay after any starter credit. The same pattern work with Model Context Protocol if you prefer reusable server instead of inline tool; our MCP servers on VPS guide explain how to host dem.

Prompts wey fit get better analysis

Some patterns dey improve output steady, no matter how you connect:

  • Tell Claude make e cite rows. "For every claim, name the ticker and the number wey e come from." This one stop vague summaries.
  • Ask wetin the data no fit show. Delayed prices, end-of-day greeks, and fixed screen all get limits; Claude go explain dem clearly when you ask, and this go keep the analysis honest.
  • Make e compare, no be predict. "Which of these yields look sustainable based on the payout ratios wey dem show" go give grounded answer. "Which stock go rise" go give well-written guess, because the data no support prediction.
  • Keep the SQL for context. The sql field tell Claude exactly how dem build the screen, so e fit explain why one name no dey there (market-cap floor, yield ceiling) instead make e invent reason.

When fixed queries no longer enough

The demo screens fixed on purpose, but you no need pay before you ask your own questions. The same demo still dey run your own read-only SQL without key: send am to https://ai.strasmore.com/api/demo/sql?sql= and e go execute am, within the limits wey the response state as 500 rows, 20 seconds, and one year of history. Free account, without card, gives you 100 queries every day. You fit write dem in SQL or plain English on the Strasmore terminal, wey dey show the generated SQL before e run am.

You no need paid plan for programmatic key too: free key increases the row limit, while paid plans add history, tick-level trades, and CSV export. The warehouse get 22 years of US equities and 12 years of options history, but the amount wey you fit read depend on your plan. As of October 2026, Free reads one year (back to 1 January 2025), Developer ($79/mo) reads three years (back to 1 January 2023), while Pro ($249/mo) and Enterprise read the complete history. The keyed API takes SQL; plain-English questions na terminal feature, not API feature. The workflow remain the same. Your tool fetches data from authenticated endpoint instead of the open one, and na you go define the questions. Claude dey genuinely good at writing ClickHouse SQL against documented schema. This turns “pull the dividend history of every REIT above $10B and rank by five-year growth” into one-prompt job on Pro or Enterprise, because three-year window no fit contain five years of growth.

FAQ

Claude fit analyze stocks without any data source?

No, not with current numbers. Its training data end before today, so anything e talk about current prices come from stale memory. Give am market data API, and the analysis go dey based on rows wey e just fetch.

Strasmore demo API really free?

Yes. No key, no signup, no card. E serve catalog of fixed queries for delayed US equities and end-of-day options data. E also get keyless SQL endpoint capped at 500 rows and one year of history, and dem deliberately open am for AI agents.

I need VPS for this?

No. Paste-in workflow need only browser. VPS become useful when you want agent loop to run on schedule, survive disconnects, and keep local files of past results.

This na financial advice?

No. Everything here na analysis tooling. Claude summarize and compare data; wetin you do with am na your decision, and delayed educational data no be basis for trade execution.

Connect one screen to one chat, and you go see the difference immediately: Claude stop to sound confident about numbers wey e no fit know, and start to dey useful with numbers wey e fit.