---
index: "https://tradytics.com/docs/llms.txt"
title: "Libraries | Tradytics API"
description: "Official clients for Python and JavaScript: one method per endpoint, retries on rate limits, paging and streaming built in. No dependencies. Both read your..."
url: "https://tradytics.com/docs/libraries"
image: "https://tradytics.com/api/v2/og/home.png"
---

# Libraries

[Every docs page as Markdown: /docs/llms.txt](https://tradytics.com/docs/llms.txt)

Official clients for Python and JavaScript: one method per endpoint, retries on rate limits, paging and streaming built in. No dependencies.

```bash
pip install tradytics
```

```bash
npm install tradytics
```

- Both read your key from TRADYTICS_API_KEY, or take it as Client(api_key=...) and new Tradytics({ apiKey }).

```python
from tradytics import Client

client = Client()

flow = client.options.flow(symbol="NVDA", min_premium=1_000_000, opening=True)
bars = client.stocks.bars(symbol="SPY", timeframe="5m", limit=500)
gamma = client.options.exposure(symbol="SPY", greek="gamma")
income = client.fundamentals.income_statement(symbol="AAPL", period="quarter")
```

```js
import Tradytics from 'tradytics'

const client = new Tradytics()

const flow = await client.options.flow({ symbol: 'NVDA', min_premium: 1_000_000, opening: true })
const bars = await client.stocks.bars({ symbol: 'SPY', timeframe: '5m', limit: 500 })
```

- Answers are the API's JSON as it comes: data and meta for objects, plus next_cursor and next_url for lists. Every endpoint page shows its call in both.
- options: Flow, contracts and chains, dealer positioning, volatility
- darkpool: Prints, levels, daily totals
- stocks: Quotes, bars, snapshot, technicals, short interest, corporate actions
- fundamentals: Profiles, statements, ratios, segments, earnings, estimates, analysts, transcripts
- filings: SEC filings, sections, semantic passage search
- disclosures: Insiders, institutions, activists, Congress
- kpis: Company operating numbers
- market: Status, indices, breadth, sectors
- calendar: Earnings and economic calendars
- news: News
- screener: The stock screener
- signals: Signals and their record
- insights: Written market reads
- probabilities: Kalshi and Polymarket
- fund: The AI Fund
- symbols: Symbol search
- account: Your portfolio, backtests, dashboards and watchlists

```python
for p in client.paginate(client.options.flow, symbol="TSLA", min_premium=500_000, from_="2026-10-01"):
    print(p["time"], p["premium_usd"])
```

```js
for await (const p of client.paginate(client.options.flow, { symbol: 'TSLA', min_premium: 500_000, from: '2026-10-01' })) console.log(p.time, p.premium_usd)
```

- stream polls options flow or dark pool prints with since and yields each new print once, oldest first.

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

```js
for await (const p of client.stream(client.options.flow, { min_premium: 250_000 })) console.log(p.symbol, p.premium_usd)
```

- A failed call raises TradyticsError with status, code, message and the request id. 429 and 5xx answers are retried up to three times, waiting as Retry-After says; the daily quota is not retried.
- The Tradytics skill gives Claude Code, Codex, Cursor and other agents every endpoint, its parameters and fields, so they call the API without reading these pages.

```bash
npx skills add tradytics/skills
```

- [dark pool prints](https://tradytics.com/learn/what-are-dark-pool-prints)
- [Tradytics skill](https://skills.sh/tradytics/skills/tradytics)
- [Overview](https://tradytics.com/docs)
- [Quickstart](https://tradytics.com/docs/quickstart)
- [MCP server](https://tradytics.com/docs/mcp)
- [MCP tools](https://tradytics.com/docs/mcp-tools)
- [API keys](https://tradytics.com/docs/authentication)
- [Pay per call](https://tradytics.com/docs/pay-per-call)
- [Rate limits](https://tradytics.com/docs/rate-limits)
- [Errors](https://tradytics.com/docs/errors)
- [Pagination](https://tradytics.com/docs/pagination)
- [Time and history](https://tradytics.com/docs/time)
- [Data conventions](https://tradytics.com/docs/conventions)
- [Support](https://tradytics.com/docs/support)
- [API docs](https://tradytics.com/docs)
- [Quickstart](https://tradytics.com/docs/quickstart)
- [MCP server](https://tradytics.com/docs/mcp)
- [Read the data without JavaScript](https://tradytics.com/docs/libraries?snapshot=1)
