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. Signup no dey, and API key no dey required. E still fit rate-limit you: throttled request go return as HTTP 429 for the status line instead of JSON body, and a Retry-After header fit tell you how many seconds you suppose wait. Full endpoint reference dey for 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. This last part important for AI work: you fit show Claude the SQL together with the data, and e go explain the query and the result to you.

The data no be live. Equity prices dey delayed, options greeks and implied volatility na end-of-day values, and each query result 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, no be 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 a fetch tool

For software wey you dey build, give Claude the API as a tool. With Anthropic 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 and return the JSON, then e go answer from real rows instead of memory. The client go pick your key from the environment, so if this code later land for server or behind cloud provider, first work out how to authenticate the client there before you hardcode anything. This route go bill you per token from the first call, against prepaid credits for Claude Console. Chat plan usage credits no dey pay for am: dem cover Claude, Claude Code, and Cowork, mostly for usage wey pass your plan included limits, although for Pro, standard Team, and standard seat-based Enterprise seats, Fable models dey run on usage credits from the start (during Fable 5.2 launch week, through 16 November 2026, Pro and standard Team seats get some Fable usage included). Max, Ultra, and Team plans get separate monthly API credits, wey you claim by linking a Console organization to your plan, and dem work the other way round: dem cover Claude API and Claude Agent SDK, and Anthropic talk say dem also "cover claude -p and Claude Agent SDK when you run dem yourself with an API key" from that organization, but dem no cover interactive Claude Code or extra usage for Claude, Claude Code, or Cowork. So before you scale am up, check whether Claude API get free tier and how much you go pay after any starter credit. The same pattern dey work with Model Context Protocol if you prefer reusable server instead of inline tool; our MCP servers on a 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 dey fixed on purpose, but you no need pay before you ask your own questions. The same demo fit 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 stated in the response: 500 rows, 20 seconds, and one year of history. Free account, without card, give you 100 queries per day. You fit write dem in SQL or plain English for Strasmore terminal. The terminal show the generated SQL before e run am.

You no need paid plan for programmatic key too. Free key increase 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 plan determine how much of am you fit read. As of November 2026, Free reads one year, back to 1 January 2025. Developer ($79/mo) reads three years, back to 1 January 2023. Pro ($249/mo) reads the full history. Enterprise na custom plan with its own instance, and sales team go price am. Keyed API dey take SQL. Plain-English questions na terminal feature, no be API feature. The workflow remain the same. Your tool fetch data from authenticated endpoint instead of open endpoint, and na you go define the questions. Claude dey genuinely good at writing ClickHouse SQL against documented schema. This turn request like "pull the dividend history of every REIT above $10B and rank by five-year growth" into one-prompt job on Pro, 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.

Dis article help you?