Metadata-Version: 2.4
Name: tradytics
Version: 0.1.0
Summary: Python client for the Tradytics API: options flow, dark pool prints, dealer exposure and market data.
Author-email: Tradytics <hello@tradytics.com>
License: MIT
Project-URL: Homepage, https://tradytics.com/docs
Project-URL: Documentation, https://tradytics.com/docs
Project-URL: API keys, https://tradytics.com/developer/keys
Keywords: options flow,dark pool,gamma exposure,market data,stocks,trading,api
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Tradytics for Python

The official Python client for the [Tradytics API](https://tradytics.com/docs): live and historical options flow, dark pool prints ranked against a year, dealer gamma, delta, vanna and charm, the options market, research on every symbol, the scanner, Signals, Kalshi and Polymarket, and the AI Fund. One method per endpoint, no dependencies.

```bash
pip install tradytics
```

The API is part of Tradytics Pro. Make a key at [tradytics.com/developer/keys](https://tradytics.com/developer/keys) and export it:

```bash
export TRADYTICS_API_KEY="tdy_..."
```

## Quickstart

```python
from tradytics import Client

client = Client()  # reads TRADYTICS_API_KEY

flow = client.options.flow(symbol="NVDA", min_premium=1_000_000, opening=True)
for p in flow["data"]:
    print(p["time"], p["symbol"], p["type"], p["strike"], p["expiry"], p["premium"])

bars = client.symbols.bars("SPY", timeframe="5m", limit=500)
gamma = client.options.exposure("SPY", greek="gamma")
prints = client.darkpool.prints(symbol="AAPL", min_value=5_000_000)
```

Objects come back as `{"data": ..., "as_of": ...}`, lists as `{"data": [...], "count": n, "next_cursor": ...}`, the same JSON the API returns.

## Resources

| Attribute | Covers |
| --- | --- |
| `client.symbols` | Symbols, live quotes, bars from 1 second to 1 month, each symbol's news |
| `client.market` | Major assets, breadth, sectors, heatmap, themes, movers, crypto, news, earnings, insiders, Congress |
| `client.options` | Options flow and its history, the options market, each symbol's gamma, volatility, open interest and dealer exposure |
| `client.darkpool` | Dark pool prints, history, levels and ranked prints |
| `client.research` | Summary, analysts, earnings, financials, technicals, ownership, fund holdings |
| `client.scanner` | The full-market scanner: any field with `min_<field>` / `max_<field>` |
| `client.signals` | Signals: live orders matching tested flow patterns |
| `client.probabilities` | Kalshi and Polymarket finance questions, history and the settled archive |
| `client.fund` | The Tradytics AI Fund's book, trades and posts |
| `client.account` | Your own backtests, portfolio and dashboards |

Every method's docstring has its parameters; [the docs](https://tradytics.com/docs) have every field.

## Every page

```python
for p in client.paginate(client.options.flow_history, symbol="TSLA", min_premium=500_000):
    ...
```

## New prints as they happen

```python
for p in client.stream(client.options.flow, min_premium=250_000):
    print(p["symbol"], p["type"], p["strike"], p["premium"])
```

`client.stream` works with `client.options.flow` and `client.darkpool.prints`, and yields each print once.

## Errors and limits

Calls that fail raise `tradytics.TradyticsError` with `status`, `code` (e.g. `missing_scope`, `invalid_parameter`), `message` and `request_id`. Rate limits (300 calls a minute, 50,000 a day per key) and brief outages are retried for you, honoring `Retry-After`. `Client(api_key=..., timeout=30, max_retries=3)` changes the defaults.

Docs: [tradytics.com/docs](https://tradytics.com/docs). MCP server for Claude, ChatGPT and Cursor: [tradytics.com/docs/mcp](https://tradytics.com/docs/mcp).
