# thetadatadx-mcp-darwin-arm64

> thetadatadx-mcp prebuilt server binary for darwin-arm64

Latest version **13.0.0** (published 2026-07-06) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install thetadatadx-mcp-darwin-arm64
pnpm add thetadatadx-mcp-darwin-arm64
yarn add thetadatadx-mcp-darwin-arm64
bun add thetadatadx-mcp-darwin-arm64
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 13.0.0 |
| Published | 2026-07-06 |
| First published | 2026-06-29 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 18 |
| Dependencies | 0 |
| Unpacked size | 13.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Maintainers | userfrm |

## Links

- npm: https://www.npmjs.com/package/thetadatadx-mcp-darwin-arm64
- Repository: https://github.com/userFRM/ThetaDataDx
- Homepage: https://github.com/userFRM/ThetaDataDx#readme
- Issues: https://github.com/userFRM/ThetaDataDx/issues
- npm.io page: https://npm.io/package/thetadatadx-mcp-darwin-arm64

## Recent versions

- 13.0.0 (latest) — 2026-07-06
- 13.0.0-rc.18 (next) — 2026-07-06
- 13.0.0-rc.17 — 2026-07-06
- 13.0.0-rc.15 — 2026-07-04
- 13.0.0-rc.14 — 2026-07-03
- 13.0.0-rc.13 — 2026-07-02
- 13.0.0-rc.12 — 2026-07-01
- 13.0.0-rc.11 — 2026-07-01
- 13.0.0-rc.10 — 2026-06-30
- 13.0.0-rc.9 — 2026-06-29

## README

> [!IMPORTANT]
> **The SDK now ships under per-language package names, starting fresh at `0.1.0`:** `thetadatadx-rs` (crates.io), `thetadatadx-py` (PyPI), `thetadatadx-ts` (npm), and the in-repo `thetadatadx-cpp`. The API and import surface are unchanged — only the package names and the version differ. Install the packages below.

<p align="center">
  <img src="assets/logo.svg" alt="ThetaDataDx" width="100%" />
</p>

# ThetaDataDx

High-performance market-data SDKs for [ThetaData](https://thetadata.us), in **Python, TypeScript, C++, and Rust**. One Rust engine under all four. Pull US stock, option, index, and rate data three ways: point-in-time **history**, real-time **streaming**, and whole-universe **flat files**, all from a single authenticated client. Connects straight to ThetaData, with nothing to install and run locally.

[![Rust CI](https://github.com/userFRM/ThetaDataDx/actions/workflows/ci.yml/badge.svg)](https://github.com/userFRM/ThetaDataDx/actions/workflows/ci.yml)
[![Python SDK](https://github.com/userFRM/ThetaDataDx/actions/workflows/python.yml/badge.svg)](https://github.com/userFRM/ThetaDataDx/actions/workflows/python.yml)
[![TypeScript SDK](https://github.com/userFRM/ThetaDataDx/actions/workflows/typescript.yml/badge.svg)](https://github.com/userFRM/ThetaDataDx/actions/workflows/typescript.yml)
[![Deploy Docs](https://github.com/userFRM/ThetaDataDx/actions/workflows/docs.yml/badge.svg)](https://github.com/userFRM/ThetaDataDx/actions/workflows/docs.yml)

[![Crates.io](https://img.shields.io/crates/v/thetadatadx-rs.svg?logo=rust)](https://crates.io/crates/thetadatadx-rs)
[![PyPI](https://img.shields.io/pypi/v/thetadatadx-py?logo=python&logoColor=white)](https://pypi.org/project/thetadatadx-py)
[![npm](https://img.shields.io/npm/v/thetadatadx-ts?logo=npm)](https://www.npmjs.com/package/thetadatadx-ts)
[![docs.rs](https://img.shields.io/docsrs/thetadatadx-rs?logo=docsdotrs)](https://docs.rs/thetadatadx-rs)

[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
[![Rust](https://img.shields.io/badge/rust-1.94%2B-orange.svg?logo=rust)](https://www.rust-lang.org)
[![Python](https://img.shields.io/badge/python-3.12%2B-blue.svg?logo=python&logoColor=white)](https://www.python.org)
[![Node](https://img.shields.io/badge/node-20%2B-339933.svg?logo=node.js&logoColor=white)](https://nodejs.org)
[![C++](https://img.shields.io/badge/C%2B%2B-17-00599C.svg?logo=cplusplus&logoColor=white)](https://isocpp.org)
[![Discord](https://img.shields.io/badge/Discord-community-5865F2.svg?logo=discord&logoColor=white)](https://discord.thetadata.us/)

> [!IMPORTANT]
> A valid [ThetaData](https://thetadata.us) subscription is required. The SDK
> authenticates against ThetaData's Nexus API using your account credentials.

## Features

- **Complete coverage**: stocks, options, indices, and rates across 73 typed endpoints.
- **Three access modes, one client**: point-in-time history, real-time streaming, and bulk flat-file downloads.
- **DataFrames built in**: every result chains straight to Polars, pandas, or Arrow over a zero-copy boundary.
- **Greeks on demand**: first- through third-order Greeks and implied volatility, served straight from the option endpoints.
- **The same surface in every language**: identical methods and identical typed errors, Python through Rust.
- **No terminal to run**: a direct connection to ThetaData; nothing to install and babysit locally.

## Clients

Three client shapes over the same engine and the same auth. Pick per workload — they are not layers, they are separate entry points:

| Client | Connects to | Use it for |
|---|---|---|
| **`MarketDataClient`** | market-data (HTTP) only | history, snapshots, flat files. Never opens the real-time feed; a streaming call raises an error by design. |
| **`StreamingClient`** | the real-time feed only | live trades, quotes, OHLCVC. Never touches market-data. |
| **`Client`** (unified) | market-data on construct; the feed is lazy | both from one object. The feed is opened only when you call `start_streaming`, so a market-data-only workflow never touches it. |

```python
from thetadatadx import MarketDataClient, StreamingClient, Client, Credentials, Config

md     = MarketDataClient(Credentials.from_file("creds.txt"), Config.production())  # market-data only
stream = StreamingClient(Credentials.from_file("creds.txt"), Config.production())   # real-time feed only
client = Client(api_key="td1_...")                                                 # both; feed stays closed until you stream
```

> [!TIP]
> `MarketDataClient` and `StreamingClient` use independent channels and independent sessions, so you can run them in **separate processes or containers** with no shared state and nothing stealing the other's session. A market-data worker next to a streaming worker (or a `Config.stage()` market-data instance next to a `Config.dev()` streaming instance) is a first-class pattern, not a workaround.

> [!IMPORTANT]
> The real-time feed is a **single live session per account**. Run one `StreamingClient` (or one unified `Client` that streams) per account and fan out to your consumers in-process. Opening a second streaming session on the same account takes over the connection and drops the first. Market-data is unaffected: it is per-request, so it runs alongside streaming and across as many `MarketDataClient` instances as you like.

> [!NOTE]
> Market-data concurrency is **account-wide** and enforced server-side (base allowance set by your highest subscription tier; accounts can be boosted above it). Each client's request pool defaults to your tier's allowance — set `max_concurrent_requests` to use a boosted one — and multiple `MarketDataClient` instances share the one server-side budget, with extra requests queuing and running in order. The real-time feed requires a Standard subscription or above. A FREE account gets delayed market-data and no streaming, and so does a Value account, which is paid.

## Install

> [!IMPORTANT]
> Install the per-language packages at `0.1.0` below — `thetadatadx-rs` (crates.io), `thetadatadx-py` (PyPI), `thetadatadx-ts` (npm).
>
> ```bash
> pip install thetadatadx-py            # Python
> npm install thetadatadx-ts            # TypeScript / Node.js
> cargo add thetadatadx-rs              # Rust
> ```

Point an AI client (Claude Desktop, Cursor, and others) at the MCP server, no install and no Rust toolchain:

```json
{ "command": "npx", "args": ["-y", "thetadatadx-mcp-server"], "env": { "THETADATA_API_KEY": "your_key" } }
```

C++ ships as a header plus a small implementation file over a prebuilt library (a CMake target wires it up). See the [C++ guide](thetadatadx-cpp/).

## Quick start

> [!TIP]
> Pass your API key directly to the client and you are one line from a live connection. Generate a key from your [ThetaData user portal](https://www.thetadata.net/), then hand it to the client: `Client(api_key="td1_...")` in Python, `Client.connectWith({ apiKey: "td1_..." })` in TypeScript, `Client::builder().api_key("td1_...").connect()` in Rust and C++. The key can come from `THETADATA_API_KEY` (the env source) or a `.env` file instead of an inline literal. Email and password is also supported: pass `email` and `password` inline, load a `creds.txt` file (email on line 1, password on line 2), or read the `THETADATA_EMAIL` / `THETADATA_PASSWORD` environment variables. For full control over hosts and timeouts, build a typed `Credentials` + `Config` (see each SDK's "full control" example).

### Python

```python
from thetadatadx import Client

# Pass your API key directly. Use market_data_type="STAGE" to target staging.
client = Client(api_key="td1_...")

# First-order Greeks for every strike on SPY's 2026-06-18 expiry, as of 2024-03-15
greeks = client.market_data.option_history_greeks_first_order("SPY", "20260618", date="20240315")

df = greeks.to_polars()
print(df.select(["strike", "right", "delta", "theta", "vega"]).head())
```

Other ways to construct the client:

```python
from thetadatadx import Client, Credentials, Config

# API key from the THETADATA_API_KEY environment variable, or from a .env file
client = Client.from_env()
client = Client.from_dotenv(".env")

# Email and password, inline
client = Client(email="you@example.com", password="your_password")

# Full control: build a typed Credentials + Config (custom hosts, timeouts)
client = Client(Credentials.from_file("creds.txt"), Config.production())
```

Stream live quotes and trades through the same client. The callback matches on
typed event classes:

```python
import time
from thetadatadx import Contract, MarketValue, Quote, Trade

def on_event(event):
    match event:
        case Trade(price=px, size=sz, exchange=ex, ms_of_day=ms, sequence=seq, condition=cond, contract=c):
            print(
                f"{c.symbol} {c.expiration} {c.strike:g} {c.right} trade price={px:.2f} size={sz} "
                f"exchange={ex} ms_of_day={ms} sequence={seq} condition={cond}"
            )
        case Quote(bid=b, ask=a, bid_size=bs, ask_size=asz, bid_exchange=bx, ask_exchange=ax, ms_of_day=ms, contract=c):
            print(
                f"{c.symbol} {c.expiration} {c.strike:g} {c.right} quote bid={b:.2f} ask={a:.2f} "
                f"bid_size={bs} ask_size={asz} bid_exchange={bx} "
                f"ask_exchange={ax} ms_of_day={ms}"
            )
        case MarketValue(market_bid=mb, market_ask=ma, market_price=mp, ms_of_day=ms, contract=c):
            print(
                f"{c.symbol} {c.expiration} {c.strike:g} {c.right} market_value "
                f"bid={mb:.2f} ask={ma:.2f} price={mp:.2f} ms_of_day={ms}"
            )

spy_call = Contract.option("SPY", expiration="20261218", strike="550", right="C")

with client.streaming(on_event) as session:
    session.subscribe_many([spy_call.quote(), spy_call.trade(), spy_call.market_value()])
    time.sleep(60)   # park the main thread while events flow into on_event
```

### TypeScript

```typescript
import { Contract, Client } from 'thetadatadx-ts';

async function main() {
  // Pass your API key directly. Add marketDataType: "STAGE" to target staging.
  const client = await Client.connectWith({ apiKey: 'td1_...' });

  await client.stream.startStreaming((event) => {
    if (event.kind === 'trade' && event.trade) {
      const { contract, price, size, exchange, msOfDay, sequence, condition } = event.trade;
      console.log(
        `${contract.symbol} ${contract.expiration} ${contract.strike} ${contract.right} trade price=${price} size=${size} ` +
        `exchange=${exchange} ms_of_day=${msOfDay} sequence=${sequence} condition=${condition}`,
      );
    } else if (event.kind === 'quote' && event.quote) {
      const { contract, bid, ask, bidSize, askSize, bidExchange, askExchange, msOfDay } = event.quote;
      console.log(
        `${contract.symbol} ${contract.expiration} ${contract.strike} ${contract.right} quote bid=${bid} ask=${ask} ` +
        `bid_size=${bidSize} ask_size=${askSize} bid_exchange=${bidExchange} ` +
        `ask_exchange=${askExchange} ms_of_day=${msOfDay}`,
      );
    }
  });

  const leg = { expiration: '20261218', strike: '550', right: 'C' };
  client.stream.subscribeMany([
    Contract.option('SPY', leg).quote(),
    Contract.option('SPY', leg).trade(),
  ]);
}

await main();
```

Other ways to construct the client:

```typescript
import { Client } from 'thetadatadx-ts';

// API key from the THETADATA_API_KEY environment variable, or from a .env file
const fromEnv = await Client.connectWith({ apiKeyFromEnv: true });
const fromDotenv = await Client.connectWith({ apiKeyFromDotenv: '.env' });

// Email and password, inline
const withLogin = await Client.connectWith({ email: 'you@example.com', password: 'your_password' });

// Full control: load a typed credentials file (custom hosts, timeouts via Config)
const fullControl = await Client.connectFromFile('creds.txt');
```

### C++

```cpp
#include <thetadatadx.hpp>
#include <cstdio>

int main() {
    // Pass your API key directly. Add .stage() before .connect() for staging.
    auto client = thetadatadx::Client::builder()
        .api_key("td1_...")
        .connect();

    auto greeks = client.market_data().option_history_greeks_first_order("SPY", "20260618", thetadatadx::EndpointRequestOptions{}.with_date("20240315"));
    for (const auto& t : greeks) {
        std::printf("K=%.2f %c delta=%+.4f theta=%+.4f vega=%+.4f\n",
                    t.strike, static_cast<char>(t.right), t.delta, t.theta, t.vega);
    }
}
```

### Rust

```toml
[dependencies]
thetadatadx-rs = "0.6.0"
```

```rust
use thetadatadx::Client;

async fn run() -> Result<(), thetadatadx::Error> {
    // Pass your API key directly. Add .stage() before .connect() for staging.
    let client = Client::builder().api_key("td1_...").connect().await?;

    let greeks = client
        .market_data()
        .option_history_greeks_eod("SPY", "20260618", "20240101", "20240331")
        .await?;

    for t in greeks.iter().take(5) {
        println!("{} K={:.2} {} delta={:+.4}", t.date, t.strike, t.right, t.delta);
    }
    Ok(())
}
```

Call the async function from your application's runtime.

## DataFrames

Every market-data result is a typed list that converts directly to a dataframe:
no row-by-row iteration:

```python
greeks.to_polars()   # polars.DataFrame
greeks.to_pandas()   # pandas.DataFrame   (pip install "thetadatadx-py[pandas]")
greeks.to_arrow()    # pyarrow.Table      (zero-copy)
```

The same `.to_polars()` / `.to_pandas()` / `.to_arrow()` terminals are available
on flat-file results. For multi-day backfills, stream the response in chunks
instead of buffering it. See [Request sizing](https://userfrm.github.io/ThetaDataDx/articles/request-sizing).

## Streaming

One connection, one authentication. Market-data queries work immediately; the
streaming transport connects on the first subscription. Subscribe specific
contracts with the fluent `Contract` API, or take a whole-market feed: every
option trade across the universe, no per-contract setup. The full-trade feed
sends a quote and an OHLC bar before each trade, so add an `Ohlcvc` case to the
callback to handle the bars:

```python
from thetadatadx import Ohlcvc, SecType

def on_full_trade(event):
    match event:
        case Ohlcvc(open=o, high=h, low=lo, close=cl, volume=v, contract=c):
            print(
                f"{c.symbol} {c.expiration} {c.strike:g} {c.right} bar "
                f"o={o:.2f} h={h:.2f} l={lo:.2f} c={cl:.2f} volume={v}"
            )
        case _:
            on_event(event)   # reuse the quote/trade handling above

with client.streaming(on_full_trade) as session:
    session.subscribe(SecType.OPTION.full_trades())
    time.sleep(60)   # the callback runs on the streaming thread; keep it fast
```

> [!TIP]
> The callback above is one of two delivery modes. It pushes one typed event at
> a time for the lowest latency, ideal when you react to each trade or quote.
> For bulk and analytics, `client.stream.batches(...)` delivers the same
> subscriptions as Apache Arrow `RecordBatch` values under a fixed schema, ready
> to pull into pandas, Polars, or DuckDB. Open the reader first, since it starts
> the session, then subscribe. Every binding has both; the
> [streaming guide](https://userfrm.github.io/ThetaDataDx/streaming/) covers them.

> [!TIP]
> On an involuntary disconnect the client recovers on its own: exponential
> backoff with jitter, automatic host failover, then a paced re-subscribe of
> every active contract. Read liveness directly off the stream with
> `connection_status()` and the last-event timestamp; no separate health poll
> needed.

## Endpoint coverage

73 typed endpoints across stocks, options, indices, the market calendar, and
interest rates, plus real-time streaming.

| Category | Endpoints | Examples |
|---|---|---|
| Stock | 13 | EOD, OHLC, trades, quotes, snapshots, at-time |
| Option | 47 | Every stock surface plus every Greeks tier in both the Black-Scholes and binomial families, open interest, contract lists |
| Index | 9 | EOD, OHLC, price, snapshots |
| Calendar | 3 | Market open/close, holidays, early closes |
| Interest rate | 1 | EOD rate history |

The full per-language method list lives in the
[API Reference](https://userfrm.github.io/ThetaDataDx/reference/).

## Errors

Every binding raises the same typed hierarchy, so the same cases are catchable
in any language: `AuthenticationError`, `RateLimitError`, `NotFoundError`,
`DeadlineExceededError`, `InvalidParameterError`, and the rest, all under a
common `ThetaDataError` base.

## Repository layout

| Path | Package | Purpose |
|---|---|---|
| [`thetadatadx-rs`](thetadatadx-rs/) | `thetadatadx-rs` (crates.io) | The Rust SDK: tick types, decoders, and the network client in one crate |
| [`thetadatadx-py`](thetadatadx-py/) | `thetadatadx-py` (PyPI) | Python package with DataFrame adapters |
| [`thetadatadx-ts`](thetadatadx-ts/) | `thetadatadx-ts` (npm) | TypeScript / Node.js package, prebuilt binaries |
| [`thetadatadx-cpp`](thetadatadx-cpp/) | header + prebuilt library | C++ wrapper over the C ABI |
| [`thetadatadx-ffi`](thetadatadx-ffi/) | release artifacts | C ABI for embedders |
| [`tools/server`](tools/server/) | `thetadatadx-server` | Local HTTP / WebSocket server |
| [`tools/mcp`](tools/mcp/) | `thetadatadx-mcp-server` (npm) | MCP server exposing every market-data endpoint to AI clients |
| [`docs-site`](docs-site/) | — | Documentation site (GitHub Pages) |

## Documentation

- [Documentation site](https://userfrm.github.io/ThetaDataDx/): getting started, API reference, streaming, server, and MCP
- [Changelog](CHANGELOG.md)

## Roadmap

See [ROADMAP.md](ROADMAP.md) for where the project is headed. Up next: a [native Go SDK](https://github.com/userFRM/ThetaDataDx/issues/1019) and a [self-updating server](https://github.com/userFRM/ThetaDataDx/issues/957). The MCP server now runs straight from npm — `npx -y thetadatadx-mcp-server`.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and the
pull-request process. Community discussion happens on the
[ThetaData Discord](https://discord.thetadata.us/).

## License

Licensed under the Apache License, Version 2.0. See [LICENSE](./LICENSE).

---
_Source: https://npm.io/package/thetadatadx-mcp-darwin-arm64 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
