Works with Claude

From a plain-English question to a DataFrame.

Theta Data ships an MCP server, and Claude Code speaks MCP natively. Connect once, then ask for Greeks, OHLC bars, or a full chain — no request object to hand-write.

No credit card required · free tier included · options, stocks, indices & rates
zsh — claude

$ claude mcp add --transport sse ThetaData http://127.0.0.1:25503/mcp/sse

✓ Added ThetaData (sse) · 127.0.0.1:25503

 

> Get AAPL 200C 8/1/25 EOD greeks, Jul 28 to Aug 1

[ThetaData MCP] running option/history/greeks/eod …

5 rows · AAPL 200C 2025-08-01 · delta 0.482 → 0.553, iv 0.214 → 0.198

Two ways in

Pick the path that matches the question you're asking.

Claude has two genuinely different ways to reach Theta Data — use whichever fits the moment.

MCP, for a quick answer

Connect the server once and ask in plain English — "AAPL 0DTE call Greeks at 3:45pm ET" — when you want a number, not a script.

The Python library, for reusable code

When the output is a backtest, a notebook, or a script you'll run again, ask Claude to write it against ThetaClient instead.

Copy, paste, run

Everything you need, in the format you'll actually use.

Prompts to paste into Claude, plus the Python, SDK, notebook, and REST snippets it should produce — pre-verified against the current library.

Quick-start template

Using the current Theta Data Python library from PyPI, write complete, executable Python code to [describe the task]. Use [symbol(s)], [date/time range], [interval], and [required fields]. Return the result as a pandas DataFrame and [save / plot / transform it]. Use only officially supported methods, state your authentication assumptions, handle AuthenticationError and NoDataFoundError, validate the returned schema, avoid pseudo-code, and explain each section.

Anchor to a known-good call

Here is a known-good request using the Theta Data Python library: client.stock_history_eod(symbol="AAPL", start_date=date(2024,1,2), end_date=date(2024,1,5)) It returns a DataFrame with columns created, last_trade, open, high, low, close, volume (plus bid/ask fields). Using this exact pattern, write a call that pulls 5-minute OHLC bars for TSLA over the same date range.

Add error handling

Add explicit handling for AuthenticationError and NoDataFoundError (both from thetadata.errors) to the function below, without changing its return type or output columns: [paste your function]

Explain, then simplify

Explain what each section of this script does line by line, then rewrite it in the simplest possible form while keeping the same behavior and output columns: [paste your script]

Paste any of these into Claude.ai, Claude Code, or a Project.

Native integration

Connect the MCP server

Five minutes, once, and every future question skips the boilerplate.

  1. Install Claude Code

    The CLI that speaks MCP natively. (It also ships inside the Claude desktop app, if you'd rather start there.)

    npm install -g @anthropic-ai/claude-code
  2. Launch Theta Terminal v3

    Needs an active Theta Data subscription and Java 21+. Starting it also starts the MCP server, listening on 127.0.0.1:25503.

  3. Connect the server

    One command, run once:

    claude mcp add --transport sse ThetaData http://127.0.0.1:25503/mcp/sse
  4. Verify the connection

    Inside Claude Code, run /mcp and confirm ThetaData shows as connected.

  5. Ask naturally

    Be explicit: real ticker symbols, ISO dates (YYYY-MM-DD), call/put spelled out rather than C/P, and strikes as decimals. The more specific the ask, the fewer follow-up questions.

Tip: the MCP server only listens on your machine (127.0.0.1), so this works the same whether Claude Code is running locally or over SSH into a box you control.

Every strategy is only as good as its data.

Free tier available — no credit card to start pulling data.