REST API
Every endpoint over plain HTTP. Curl it from the shell or call it from any stack. Typed JSON, CSV, or NDJSON responses.
Historical, streaming, and bulk market data through whatever fits how you build: a REST API, four native SDKs, or an MCP server for your AI.
The latest NBBO quote for AAPL, four ways. Pick the one that fits your stack. Same data, same fields, from a free or paid subscription.
# Start the server once: thetadatadx-server --api-key "$THETADATA_API_KEY" &
curl 'http://127.0.0.1:25503/v3/stock/snapshot/quote?symbol=AAPL'from thetadatadx import Client
client = Client(api_key="your_api_key")
[q] = client.market_data.stock_snapshot_quote(["AAPL"])
print(q.bid, q.ask)import { Client } from 'thetadatadx-ts';
const client = await Client.connectWith({ apiKey: 'your_api_key' });
const [q] = await client.marketData.stockSnapshotQuote(['AAPL']);
console.log(q.bid, q.ask);let client = thetadatadx::Client::builder().api_key("your_api_key").connect().await?;
let rows = client.market_data().stock_snapshot_quote(&["AAPL"]).await?;
println!("{} {}", rows[0].bid, rows[0].ask);| Goal | Start here |
|---|---|
| A research notebook | Python SDK: install, authenticate, pull history into pandas or polars. |
| A live signal or dashboard | Streaming: typed quote, trade, and open-interest events over WebSocket. |
| An AI assistant or agent | MCP for AI: give any LLM client a tool per endpoint, no code. |
| A backend or existing tool | REST API or the self-host server: plain HTTP on the v3 routes. |
Install
The SDK ships as per-language packages at 0.1.0: thetadatadx-rs (crates.io), thetadatadx-py (PyPI), and thetadatadx-ts (npm). Install directly below.
pip install thetadatadx-py # Python 3.12+
npm install thetadatadx-ts # Node.js 20+
cargo add thetadatadx-rs # Rust async clientC++ links the same C ABI: build thetadatadx-ffi, then include thetadatadx-cpp/include/thetadatadx.hpp. Full steps in the Quickstart.