tradytics 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,16 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tradytics
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
7
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
8
+ persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
11
+ Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
14
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,209 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <a href="https://tradytics.com/docs"><img src="https://tradytics.com/api/v2/og/sdk.png" alt="Tradytics: one API for options flow, dark pools and the market" width="100%"></a>
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ # Tradytics for JavaScript
6
+
7
+ The official JavaScript and TypeScript client for the [Tradytics API](https://tradytics.com/docs): options flow from the full OPRA tape, dark pool prints ranked against a year, dealer gamma, delta, vanna and charm, and the whole market around them. <!-- sdk:count -->78<!-- /sdk:count --> endpoints, one typed method each, no dependencies.
8
+
9
+ [![npm](https://img.shields.io/npm/v/tradytics?color=168eff&label=npm)](https://www.npmjs.com/package/tradytics)
10
+ [![types](https://img.shields.io/badge/types-included-16171a)](https://www.npmjs.com/package/tradytics)
11
+ [![PyPI](https://img.shields.io/pypi/v/tradytics?color=168eff&label=pypi)](https://pypi.org/project/tradytics/)
12
+ [![Endpoints](https://img.shields.io/badge/endpoints-78-16171a)](https://tradytics.com/docs)
13
+ [![Docs](https://img.shields.io/badge/docs-tradytics.com-16171a)](https://tradytics.com/docs)
14
+ [![License](https://img.shields.io/badge/license-MIT-16171a)](https://opensource.org/license/mit)
15
+
16
+ ```bash
17
+ npm install tradytics
18
+ ```
19
+
20
+ ## What you get
21
+
22
+ - **Options flow**: every print of $25K+ from the full OPRA tape (every US options exchange), live and back to March 2025, with side, sweep or block, and whether it opened a position.
23
+ - **Dark pool**: block and off-exchange prints as they happen, each ranked against a year of its kind, and the levels where size traded.
24
+ - **Dealer exposure**: gamma, delta, vanna and charm by strike for about 2,500 symbols, every five minutes, with the change since yesterday, a week and two weeks.
25
+ - **The market**: quotes and bars from 1 second to 1 month, breadth, sectors, movers, the options market, research, the full-market scanner, Signals, Kalshi and Polymarket odds and the AI Fund.
26
+ - **Runs anywhere `fetch` does**: Node 18+, Bun, Deno and edge runtimes. ESM, typed parameters, retries on rate limits, paging and live streaming built in.
27
+
28
+ ## Quickstart
29
+
30
+ The API is part of Tradytics Pro. Make a key at [tradytics.com/developer/keys](https://tradytics.com/developer/keys), then:
31
+
32
+ ```bash
33
+ export TRADYTICS_API_KEY="tdy_..."
34
+ ```
35
+
36
+ ```js
37
+ import Tradytics from 'tradytics'
38
+
39
+ const client = new Tradytics() // reads TRADYTICS_API_KEY
40
+
41
+ const flow = await client.options.flow({ symbol: 'NVDA', min_premium: 1_000_000, opening: true })
42
+ for (const p of flow.data) console.log(p.time, p.symbol, p.type, p.strike, p.expiry, p.premium)
43
+ ```
44
+
45
+ Objects come back as `{ data, as_of }` and lists as `{ data, count, next_cursor }`, the same JSON as the [REST API](https://tradytics.com/docs). Keep the key on a server: anyone holding it uses your quota.
46
+
47
+ ## Examples
48
+
49
+ ```js
50
+ // Biggest dark pool prints today, and the year's largest for one stock
51
+ await client.darkpool.prints({ min_value: 10_000_000 })
52
+ await client.darkpool.ranked('AAPL', { kind: 'trade', sort: 'big' })
53
+
54
+ // Dealer gamma by strike, and the SPX call wall, put wall and gamma flip
55
+ await client.options.exposure('SPY', { greek: 'gamma' })
56
+ await client.options.index_gamma({ symbol: 'SPX' })
57
+
58
+ // Five-minute bars, a year of daily bars
59
+ await client.symbols.bars('TSLA', { timeframe: '5m', limit: 500 })
60
+ await client.symbols.bars('SPY', { timeframe: '1d', limit: 252 })
61
+
62
+ // Scan the market on any field
63
+ await client.scanner.scan({ min_rvol: 2, max_rsi: 30, sort: 'oprem', limit: 25 })
64
+
65
+ // Live signals, and the market's options read today
66
+ await client.signals.list({ status: 'open' })
67
+ await client.options.read()
68
+ ```
69
+
70
+ ## Every page
71
+
72
+ ```js
73
+ for await (const p of client.paginate(client.options.flow_history, { symbol: 'TSLA', min_premium: 500_000 })) {
74
+ console.log(p.time, p.premium)
75
+ }
76
+ ```
77
+
78
+ ## New prints as they happen
79
+
80
+ ```js
81
+ for await (const p of client.stream(client.options.flow, { min_premium: 250_000 })) {
82
+ console.log(p.symbol, p.type, p.strike, p.premium)
83
+ }
84
+ ```
85
+
86
+ `stream` works with `client.options.flow` and `client.darkpool.prints`, polls every two seconds and yields each print once, oldest first.
87
+
88
+ ## Errors, retries and limits
89
+
90
+ ```js
91
+ import Tradytics, { TradyticsError } from 'tradytics'
92
+
93
+ try {
94
+ await client.options.flow({ symbol: 'NVDA', limit: 5000 })
95
+ } catch (e) {
96
+ if (e instanceof TradyticsError) console.log(e.status, e.code, e.message, e.requestId) // 400 invalid_parameter ...
97
+ }
98
+ ```
99
+
100
+ Each key gets 300 calls a minute and 50,000 a day. A `429` or `5xx` answer is retried up to three times, waiting as `Retry-After` says; the daily quota isn't retried. `new Tradytics({ apiKey, timeout: 30_000, maxRetries: 3 })` changes the defaults, and `client.get('/any/path', params)` calls any endpoint by path.
101
+
102
+ ## Reference
103
+
104
+ <details>
105
+ <summary>Every method, by resource</summary>
106
+
107
+ <!-- sdk:reference -->
108
+ | Method | Request | Name |
109
+ | --- | --- | --- |
110
+ | **symbols** | | |
111
+ | `symbols.list(params)` | `GET /symbols` | List symbols |
112
+ | `symbols.get(symbol)` | `GET /symbols/{symbol}` | Symbol |
113
+ | `symbols.quotes(params)` | `GET /quotes` | Quotes |
114
+ | `symbols.bars(symbol, params)` | `GET /symbols/{symbol}/bars` | Bars |
115
+ | `symbols.news(symbol)` | `GET /symbols/{symbol}/news` | Symbol news |
116
+ | **market** | | |
117
+ | `market.assets()` | `GET /market/assets` | Major assets |
118
+ | `market.breadth()` | `GET /market/breadth` | Market breadth |
119
+ | `market.sectors()` | `GET /market/sectors` | Sectors |
120
+ | `market.heatmap()` | `GET /market/heatmap` | Heatmap |
121
+ | `market.themes()` | `GET /market/themes` | Themes |
122
+ | `market.movers()` | `GET /market/movers` | Movers |
123
+ | `market.crypto()` | `GET /market/crypto` | Crypto |
124
+ | `market.crypto_sectors()` | `GET /market/crypto/sectors` | Crypto sectors |
125
+ | `market.digest()` | `GET /market/digest` | Market digest |
126
+ | `market.news()` | `GET /news` | Market news |
127
+ | `market.earnings_calendar()` | `GET /calendar/earnings` | Earnings calendar |
128
+ | `market.insiders()` | `GET /insiders` | Insider trades |
129
+ | `market.congress()` | `GET /congress` | Congress trades |
130
+ | **options** | | |
131
+ | `options.flow(params)` | `GET /options/flow` | Options flow |
132
+ | `options.flow_history(params)` | `GET /options/flow/history` | Options flow history |
133
+ | `options.sentiment(params)` | `GET /market/options/sentiment` | Options sentiment |
134
+ | `options.pressure()` | `GET /market/options/pressure` | Buying pressure |
135
+ | `options.index_gamma(params)` | `GET /market/options/gamma` | Index dealer gamma |
136
+ | `options.put_call()` | `GET /market/options/put-call` | Put/call premium |
137
+ | `options.leaders()` | `GET /market/options/leaders` | Flow leaders |
138
+ | `options.sectors()` | `GET /market/options/sectors` | Flow by sector |
139
+ | `options.top_prints()` | `GET /market/options/top-prints` | Top prints |
140
+ | `options.contracts()` | `GET /market/options/contracts` | Most traded contracts |
141
+ | `options.iv()` | `GET /market/options/iv` | Implied volatility movers |
142
+ | `options.zero_dte(params)` | `GET /market/options/zero-dte` | 0DTE flow |
143
+ | `options.zero_dte_gamma(params)` | `GET /market/options/zero-dte/gamma` | 0DTE dealer gamma |
144
+ | `options.read()` | `GET /market/options/read` | Options market read |
145
+ | `options.bets()` | `GET /market/options/bets` | Big bets |
146
+ | `options.unusual()` | `GET /market/options/unusual` | Unusual opening bets |
147
+ | `options.chains()` | `GET /market/options/chains` | Contract lists |
148
+ | `options.evidence()` | `GET /market/options/evidence` | Tested market facts |
149
+ | `options.overview(symbol)` | `GET /symbols/{symbol}/options` | Options overview |
150
+ | `options.net_flow(symbol)` | `GET /symbols/{symbol}/options/flow` | Net flow today |
151
+ | `options.gamma(symbol)` | `GET /symbols/{symbol}/options/gamma` | Dealer gamma |
152
+ | `options.volatility(symbol)` | `GET /symbols/{symbol}/options/volatility` | Volatility |
153
+ | `options.open_interest(symbol, params)` | `GET /symbols/{symbol}/options/open-interest` | Open interest |
154
+ | `options.expiries(symbol)` | `GET /symbols/{symbol}/options/expiries` | Premiums heatmap |
155
+ | `options.orders(symbol)` | `GET /symbols/{symbol}/options/orders` | Largest and unusual orders |
156
+ | `options.history(symbol)` | `GET /symbols/{symbol}/options/history` | Daily flow history |
157
+ | `options.exposure(symbol, params)` | `GET /symbols/{symbol}/options/exposure` | Dealer exposure |
158
+ | `options.exposure_history(symbol, params)` | `GET /symbols/{symbol}/options/exposure/history` | Dealer exposure history |
159
+ | **darkpool** | | |
160
+ | `darkpool.prints(params)` | `GET /darkpool/prints` | Dark pool prints |
161
+ | `darkpool.history(params)` | `GET /darkpool/history` | Dark pool history |
162
+ | `darkpool.levels(symbol)` | `GET /symbols/{symbol}/darkpool` | Dark pool levels |
163
+ | `darkpool.ranked(symbol, params)` | `GET /symbols/{symbol}/darkpool/ranked` | Ranked dark pool prints |
164
+ | **research** | | |
165
+ | `research.summary(symbol)` | `GET /symbols/{symbol}/summary` | Summary |
166
+ | `research.analysts(symbol)` | `GET /symbols/{symbol}/analysts` | Analysts |
167
+ | `research.earnings(symbol)` | `GET /symbols/{symbol}/earnings` | Earnings |
168
+ | `research.financials(symbol)` | `GET /symbols/{symbol}/financials` | Financials |
169
+ | `research.technicals(symbol)` | `GET /symbols/{symbol}/technicals` | Technicals |
170
+ | `research.ownership(symbol)` | `GET /symbols/{symbol}/ownership` | Ownership |
171
+ | `research.holdings(symbol)` | `GET /symbols/{symbol}/holdings` | Fund holdings |
172
+ | **scanner** | | |
173
+ | `scanner.scan(params)` | `GET /scanner` | Scan the market |
174
+ | `scanner.fields()` | `GET /scanner/fields` | Scanner fields and labels |
175
+ | `scanner.symbol(symbol)` | `GET /symbols/{symbol}/scan` | Symbol scan |
176
+ | **signals** | | |
177
+ | `signals.list(params)` | `GET /signals` | List signals |
178
+ | `signals.get(id)` | `GET /signals/{id}` | Signal |
179
+ | **probabilities** | | |
180
+ | `probabilities.list(params)` | `GET /probabilities` | List questions |
181
+ | `probabilities.get(id)` | `GET /probabilities/{id}` | Question |
182
+ | `probabilities.history(market, params)` | `GET /probabilities/markets/{market}/history` | Outcome history |
183
+ | `probabilities.outlook()` | `GET /probabilities/outlook` | S&P 500 outlook |
184
+ | `probabilities.track()` | `GET /probabilities/track` | Index closes scored |
185
+ | `probabilities.settled(params)` | `GET /probabilities/settled` | Settled markets |
186
+ | **fund** | | |
187
+ | `fund.summary()` | `GET /fund` | The fund now |
188
+ | `fund.trades(params)` | `GET /fund/trades` | Fund trades |
189
+ | `fund.posts(params)` | `GET /fund/posts` | Fund posts |
190
+ | **account** | | |
191
+ | `account.backtests(params)` | `GET /backtests` | Your backtests |
192
+ | `account.backtest(id)` | `GET /backtests/{id}` | A backtest |
193
+ | `account.portfolio()` | `GET /portfolio` | Your portfolio |
194
+ | `account.portfolio_trades()` | `GET /portfolio/trades` | Your trades |
195
+ | `account.portfolio_factors()` | `GET /portfolio/factors` | Your portfolio's factors |
196
+ | `account.dashboards()` | `GET /dashboards` | Your dashboards |
197
+ | `account.dashboard(id)` | `GET /dashboards/{id}` | A dashboard |
198
+ <!-- /sdk:reference -->
199
+
200
+ </details>
201
+
202
+ Parameters are typed and described in your editor; fields for each are on its [docs page](https://tradytics.com/docs).
203
+
204
+ ## More
205
+
206
+ - [API docs](https://tradytics.com/docs), with a page per endpoint and a live console
207
+ - [Python SDK](https://pypi.org/project/tradytics/): `pip install tradytics`
208
+ - [MCP server](https://tradytics.com/docs/mcp) for Claude, ChatGPT and Cursor
209
+ - Support: [hello@tradytics.com](mailto:hello@tradytics.com)
package/base.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /** An object answer: the record in `data`, when it was computed in `as_of`. */
2
+ export interface Item<T = any> { data: T; as_of?: string; [key: string]: unknown }
3
+ /** A list answer: rows in `data`; pass `next_cursor` back as `cursor` for the next page (null on the last). */
4
+ export interface List<T = any> { data: T[]; count: number; next_cursor: string | null; [key: string]: unknown }
5
+ export declare class Resource { protected constructor(transport: unknown) }
6
+ export declare class TradyticsError extends Error {
7
+ status: number
8
+ code: string
9
+ requestId?: string
10
+ }
package/base.js ADDED
@@ -0,0 +1,49 @@
1
+ // The HTTP layer: one GET with the key in the header, retries on rate limits and blips, and one error type that
2
+ // carries the API's code, message and request id.
3
+ const RETRY = new Set([429, 500, 502, 503, 504])
4
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms))
5
+
6
+ export const enc = (v) => encodeURIComponent(String(v))
7
+
8
+ export class TradyticsError extends Error {
9
+ constructor(status, code, message, requestId) {
10
+ super(`${status} ${code}: ${message}${requestId ? ` (request ${requestId})` : ''}`)
11
+ Object.assign(this, { name: 'TradyticsError', status, code, requestId })
12
+ }
13
+ }
14
+
15
+ export class Transport {
16
+ constructor({ apiKey, baseUrl, timeout, maxRetries, userAgent }) {
17
+ Object.assign(this, { apiKey, baseUrl: baseUrl.replace(/\/$/, ''), timeout, maxRetries, userAgent })
18
+ }
19
+
20
+ async get(path, params = {}) {
21
+ const query = new URLSearchParams(Object.entries(params).filter(([, v]) => v !== undefined && v !== null).map(([k, v]) => [k, String(v)])).toString()
22
+ const url = this.baseUrl + path + (query ? `?${query}` : '')
23
+ const headers = { Authorization: `Bearer ${this.apiKey}`, Accept: 'application/json', ...(typeof window === 'undefined' ? { 'User-Agent': this.userAgent } : {}) }
24
+ for (let attempt = 0; ; attempt++) {
25
+ let res
26
+ try {
27
+ res = await fetch(url, { headers, signal: AbortSignal.timeout(this.timeout) })
28
+ } catch (e) {
29
+ if (attempt < this.maxRetries) { await sleep(1000 * 2 ** attempt); continue }
30
+ throw new TradyticsError(0, 'network_error', String(e?.message ?? e))
31
+ }
32
+ if (res.ok) return res.json()
33
+ const wait = Number(res.headers.get('retry-after') ?? 2 ** attempt)
34
+ if (RETRY.has(res.status) && attempt < this.maxRetries && wait <= 60) { await sleep(wait * 1000); continue }
35
+ const body = await res.json().catch(() => ({}))
36
+ throw new TradyticsError(res.status, body.error?.code ?? 'error', body.error?.message ?? res.statusText, body.request_id)
37
+ }
38
+ }
39
+ }
40
+
41
+ // A resource's methods come bound, so client.options.flow can be handed to paginate and stream.
42
+ export class Resource {
43
+ constructor(transport) {
44
+ this._t = transport
45
+ for (const k of Object.getOwnPropertyNames(Object.getPrototypeOf(this))) if (k !== 'constructor') this[k] = this[k].bind(this)
46
+ }
47
+
48
+ _get(path, params) { return this._t.get(path, params) }
49
+ }
package/index.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ import type { Item, List } from './base.js'
2
+ import { TradyticsError } from './base.js'
3
+ import type { Account, Darkpool, Fund, Market, Options, Probabilities, Research, Scanner, Signals, Symbols } from './resources.js'
4
+
5
+ export type { Item, List }
6
+ export { TradyticsError }
7
+ export declare const BASE_URL: string
8
+ export declare const VERSION: string
9
+
10
+ export interface ClientOptions {
11
+ /** Defaults to the TRADYTICS_API_KEY environment variable. Make one at https://tradytics.com/developer/keys. */
12
+ apiKey?: string
13
+ baseUrl?: string
14
+ /** Milliseconds. Default 30000. */
15
+ timeout?: number
16
+ /** Retries on 429 and 5xx. Default 3. */
17
+ maxRetries?: number
18
+ }
19
+
20
+ export declare class Tradytics {
21
+ constructor(options?: ClientOptions)
22
+ symbols: Symbols
23
+ market: Market
24
+ options: Options
25
+ darkpool: Darkpool
26
+ research: Research
27
+ scanner: Scanner
28
+ signals: Signals
29
+ probabilities: Probabilities
30
+ fund: Fund
31
+ account: Account
32
+ /** Any endpoint by its path: client.get('/options/flow', { symbol: 'NVDA' }). */
33
+ get(path: string, params?: Record<string, unknown>): Promise<Item | List>
34
+ /** Every row of a list endpoint, page after page: for await (const row of client.paginate(client.options.flow, { symbol: 'SPY' })). */
35
+ paginate(method: (...args: any[]) => Promise<List>, ...args: any[]): AsyncGenerator<any>
36
+ /** New prints as they happen, each once, from client.options.flow or client.darkpool.prints. */
37
+ stream(method: (params?: any) => Promise<List>, filters?: Record<string, unknown>, options?: { interval?: number }): AsyncGenerator<any>
38
+ }
39
+ export default Tradytics
package/index.js ADDED
@@ -0,0 +1,43 @@
1
+ // The client: one property per resource (client.options.flow({...}), client.symbols.bars('SPY')), and helpers to walk
2
+ // every page of a list and to stream new prints.
3
+ import { Transport, TradyticsError } from './base.js'
4
+ import { RESOURCES } from './resources.js'
5
+ import { VERSION } from './version.js'
6
+
7
+ export const BASE_URL = 'https://tradytics.com/api/public/v1'
8
+ export { TradyticsError, VERSION }
9
+
10
+ export class Tradytics {
11
+ constructor({ apiKey = globalThis.process?.env?.TRADYTICS_API_KEY, baseUrl = BASE_URL, timeout = 30_000, maxRetries = 3 } = {}) {
12
+ if (!apiKey) throw new TradyticsError(401, 'missing_key', 'Pass apiKey or set TRADYTICS_API_KEY. Make a key at https://tradytics.com/developer/keys.')
13
+ this._t = new Transport({ apiKey, baseUrl, timeout, maxRetries, userAgent: `tradytics-node/${VERSION}` })
14
+ for (const [name, Resource] of Object.entries(RESOURCES)) this[name] = new Resource(this._t)
15
+ }
16
+
17
+ get(path, params = {}) { return this._t.get(path, params) }
18
+
19
+ async *paginate(method, ...args) {
20
+ const params = { ...(typeof args.at(-1) === 'object' ? args.pop() : {}) }
21
+ const cursor = method.name.endsWith('bars') ? 'before' : 'cursor'
22
+ for (;;) {
23
+ const page = await method(...args, params)
24
+ yield* page.data ?? []
25
+ if (!page.next_cursor) return
26
+ params[cursor] = page.next_cursor
27
+ }
28
+ }
29
+
30
+ async *stream(method, filters = {}, { interval = 2000 } = {}) {
31
+ const latest = (await method({ ...filters, limit: 1 })).data ?? []
32
+ let last = latest[0]?.id ?? 0
33
+ for (;;) {
34
+ for (const row of (await method({ ...filters, since: last })).data ?? []) {
35
+ last = Math.max(last, row.id)
36
+ yield row
37
+ }
38
+ await new Promise((r) => setTimeout(r, interval))
39
+ }
40
+ }
41
+ }
42
+
43
+ export default Tradytics
package/package.json CHANGED
@@ -1,6 +1,37 @@
1
1
  {
2
2
  "name": "tradytics",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "JavaScript and TypeScript client for the Tradytics API: options flow, dark pool prints, dealer exposure and market data.",
5
+ "type": "module",
6
+ "main": "./index.js",
7
+ "types": "./index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./index.d.ts",
11
+ "import": "./index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "*.js",
16
+ "*.d.ts",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "engines": {
21
+ "node": ">=18"
22
+ },
23
+ "sideEffects": false,
24
+ "license": "MIT",
25
+ "author": "Tradytics <hello@tradytics.com>",
26
+ "homepage": "https://tradytics.com/docs",
27
+ "keywords": [
28
+ "options flow",
29
+ "dark pool",
30
+ "gamma exposure",
31
+ "market data",
32
+ "stocks",
33
+ "trading",
34
+ "api",
35
+ "tradytics"
36
+ ]
37
+ }
package/resources.d.ts ADDED
@@ -0,0 +1,199 @@
1
+ // Generated by web/scripts/sdk.mjs from the docs content. Do not edit.
2
+ import type { Item, List } from './base.js'
3
+ import { Resource } from './base.js'
4
+
5
+ /** Symbols, quotes, bars and each symbol's news. */
6
+ export declare class Symbols extends Resource {
7
+ /** The ~6,000 symbols Tradytics tracks, most traded first. Search by ticker or name with q. GET /symbols */
8
+ list(params?: { /** Matches the start of a ticker or any part of a name. */ q?: string; /** stock, etf or adr. */ kind?: string; /** Rows per page, up to 1000. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
9
+ /** One symbol: its name, kind, sector, industry, market cap and live quote. GET /symbols/{symbol} */
10
+ get(symbol: string, params?: { }): Promise<Item>
11
+ /** Live quotes for up to 100 symbols, or for every tracked symbol (most traded first) when symbols is left out. Refreshed every 30 seconds. GET /quotes */
12
+ quotes(params?: { /** Comma-separated tickers, up to 100. */ symbols?: string; /** Rows per page, up to 1000. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
13
+ /** OHLCV bars, oldest first, with today's forming bar. Daily, weekly and monthly bars go back to 2004 for every US stock; intraday bars cover two years of the ~3,000 most traded symbols, 1-second bars the last 7 days. Intraday buckets are aligned to New York time and include extended hours. GET /symbols/{symbol}/bars */
14
+ bars(symbol: string, params?: { /** 1s, 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w or 1M. */ timeframe?: string; /** Only bars starting before this time, epoch seconds. Pass next_cursor here to page back. */ before?: number; /** Rows per page, up to 5000. */ limit?: number }): Promise<List>
15
+ /** A symbol's latest 8 stories from the last 60 days. data is a list. GET /symbols/{symbol}/news */
16
+ news(symbol: string, params?: { }): Promise<Item>
17
+ }
18
+
19
+ /** The market overview, news and calendars. */
20
+ export declare class Market extends Resource {
21
+ /** Fifteen benchmarks in a fixed order: S&P 500, Nasdaq 100, Russell 2000, Dow, VIX, 20Y and 10Y Treasuries, high yield, gold, silver, oil, natural gas, the dollar, Bitcoin and Ethereum (through their ETFs). GET /market/assets */
22
+ assets(params?: { }): Promise<Item>
23
+ /** How many liquid names ($20M+ traded today) are up and down, and how today's moves are spread. GET /market/breadth */
24
+ breadth(params?: { }): Promise<Item>
25
+ /** The 11 sector ETFs with returns over six periods, their best and worst large caps today and how many members are up. GET /market/sectors */
26
+ sectors(params?: { }): Promise<Item>
27
+ /** The 300 largest US stocks by sector and industry with their size and move. GET /market/heatmap */
28
+ heatmap(params?: { }): Promise<Item>
29
+ /** Two dozen investing themes (AI chips, nuclear, crypto miners …) as equal-weight baskets. GET /market/themes */
30
+ themes(params?: { }): Promise<Item>
31
+ /** Today's top 10 gainers, losers, most active and most unusual volume among stocks worth $2B+ trading $20M+. GET /market/movers */
32
+ movers(params?: { }): Promise<Item>
33
+ /** The crypto market and its top 100 coins, with the day's biggest gainers and losers. GET /market/crypto */
34
+ crypto(params?: { }): Promise<Item>
35
+ /** Up to 16 crypto categories by market cap. data is a list. GET /market/crypto/sectors */
36
+ crypto_sectors(params?: { }): Promise<Item>
37
+ /** An AI-written read of the market: what moved and why, and the week's events ahead. Rewritten every 30 minutes in the session. GET /market/digest */
38
+ digest(params?: { }): Promise<Item>
39
+ /** The day's most important stories, newest first. data is a list. GET /news */
40
+ news(params?: { }): Promise<Item>
41
+ /** Companies worth $10B+ reporting in the next 7 days, by date then size, with today's reported EPS as it comes in. GET /calendar/earnings */
42
+ earnings_calendar(params?: { }): Promise<Item>
43
+ /** The latest large open-market insider buys and sells (Form 4), and 20 days of insider money flow. GET /insiders */
44
+ insiders(params?: { }): Promise<Item>
45
+ /** The latest stock trades disclosed by members of Congress, newest disclosure first. GET /congress */
46
+ congress(params?: { }): Promise<Item>
47
+ }
48
+
49
+ /** Options flow, the options market and each symbol's options. */
50
+ export declare class Options extends Resource {
51
+ /** The latest session's prints as they happen, newest first, and any of the last 7 sessions with date. Pass since to poll for new prints. The response also lists the sessions held in dates. GET /options/flow */
52
+ flow(params?: { /** One underlying. */ symbol?: string; /** A session in the last 7, YYYY-MM-DD. Default the latest. */ date?: string; /** call or put. */ type?: string; /** sweep, block, split or single. */ kind?: string; /** bought (at or above the ask side) or sold. */ side?: string; /** Only prints of at least this premium, $. */ min_premium?: number; /** One expiration, YYYY-MM-DD. */ expiry?: string; /** Only prints larger than the open interest: new positions. */ opening?: boolean; /** Only prints after this id, oldest first (polling). */ since?: number; /** Rows per page, up to 1000. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
53
+ /** One symbol's prints from the archive, every session since 2025-03-31, newest first. GET /options/flow/history */
54
+ flow_history(params?: { /** Underlying. */ symbol: string; /** First day, YYYY-MM-DD. Default 30 days before to. */ from?: string; /** Last day. Default today. */ to?: string; /** call or put. */ type?: string; /** sweep, block, split or single. */ kind?: string; /** bought (at or above the ask side) or sold. */ side?: string; /** Only prints of at least this premium, $. */ min_premium?: number; /** One expiration, YYYY-MM-DD. */ expiry?: string; /** Only prints larger than the open interest: new positions. */ opening?: boolean; /** Rows per page, up to 1000. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
55
+ /** Net premium through the day: calls bought minus sold against puts bought minus sold. market is single stocks (indices left out) over 1, 3 or 5 sessions; or one of SPY, QQQ, IWM. GET /market/options/sentiment */
56
+ sentiment(params?: { /** market, market-3d, market-5d, SPY, QQQ or IWM. */ scope?: string }): Promise<Item>
57
+ /** Each session's net delta of options flow in stock-equivalent dollars, over 60 sessions, with SPY. GET /market/options/pressure */
58
+ pressure(params?: { }): Promise<Item>
59
+ /** Dealer gamma exposure by strike near spot, with the call wall, put wall and gamma flip. GET /market/options/gamma */
60
+ index_gamma(params?: { /** SPX, SPY or QQQ. */ symbol?: string }): Promise<Item>
61
+ /** Today's call and put premium, split between index products and single stocks. GET /market/options/put-call */
62
+ put_call(params?: { }): Promise<Item>
63
+ /** The 10 single stocks with the most bullish and the most bearish net premium today. GET /market/options/leaders */
64
+ leaders(params?: { }): Promise<Item>
65
+ /** Bullish and bearish premium today by sector, most bullish first. GET /market/options/sectors */
66
+ sectors(params?: { }): Promise<Item>
67
+ /** Today's 12 largest prints by premium. GET /market/options/top-prints */
68
+ top_prints(params?: { }): Promise<Item>
69
+ /** The 15 contracts with the most volume today. GET /market/options/contracts */
70
+ contracts(params?: { }): Promise<Item>
71
+ /** Liquid stocks with the highest implied volatility and the biggest IV rises and drops since the last session. GET /market/options/iv */
72
+ iv(params?: { }): Promise<Item>
73
+ /** Same-day expiring premium through the day, bought minus sold. GET /market/options/zero-dte */
74
+ zero_dte(params?: { /** SPY, QQQ, SPX or IWM. */ symbol?: string }): Promise<Item>
75
+ /** Dealer gamma from today's same-day expiring prints by strike, updated every 30 seconds. GET /market/options/zero-dte/gamma */
76
+ zero_dte_gamma(params?: { /** SPX, SPY or QQQ. */ symbol?: string }): Promise<Item>
77
+ /** The Options page's read of the day: the lean against the last 20 sessions at the same minute, notes, SPY's expected move, dealer gamma and hedging. GET /market/options/read */
78
+ read(params?: { }): Promise<Item>
79
+ /** Single stocks with today's largest net premium against their own usual day, and the same by sector. GET /market/options/bets */
80
+ bets(params?: { }): Promise<Item>
81
+ /** Today's biggest single-stock prints that opened new positions ($250K+, size above open interest, no spreads). GET /market/options/unusual */
82
+ unusual(params?: { }): Promise<Item>
83
+ /** Today's contracts in four lists: most active, cheap (under $1), LEAPs (a year+) and far out of the money. GET /market/options/chains */
84
+ chains(params?: { }): Promise<Item>
85
+ /** What the flow lab proved, computed live every 5 minutes: likely ranges for SPY and QQQ, the gamma regime, IV against realized, the 0DTE share and big-move odds. GET /market/options/evidence */
86
+ evidence(params?: { }): Promise<Item>
87
+ /** Today at a glance from prints of $25K+. GET /symbols/{symbol}/options */
88
+ overview(symbol: string, params?: { }): Promise<Item>
89
+ /** Bullish and bearish premium through today against the price. GET /symbols/{symbol}/options/flow */
90
+ net_flow(symbol: string, params?: { }): Promise<Item>
91
+ /** Dealer gamma by strike near spot with the call wall, put wall and gamma flip. 404 for symbols without dealer data. GET /symbols/{symbol}/options/gamma */
92
+ gamma(symbol: string, params?: { }): Promise<Item>
93
+ /** The at-the-money term structure and the front expiry's smile. GET /symbols/{symbol}/options/volatility */
94
+ volatility(symbol: string, params?: { }): Promise<Item>
95
+ /** Call and put open interest by strike near spot, for all expiries or one. GET /symbols/{symbol}/options/open-interest */
96
+ open_interest(symbol: string, params?: { /** One expiry, YYYY-MM-DD (from expiries). Default all. */ expiry?: string }): Promise<Item>
97
+ /** Net premium on the 6 busiest strikes by the 6 busiest expiries, today and over the last 5 sessions. GET /symbols/{symbol}/options/expiries */
98
+ expiries(symbol: string, params?: { }): Promise<Item>
99
+ /** Today's 12 largest orders and 12 most unusual contracts (volume far above open interest). GET /symbols/{symbol}/options/orders */
100
+ orders(symbol: string, params?: { }): Promise<Item>
101
+ /** The last 30 sessions of premium, oldest first. GET /symbols/{symbol}/options/history */
102
+ history(symbol: string, params?: { }): Promise<Item>
103
+ /** Dealer gamma, delta, vanna or charm by strike for about 2,500 stocks and ETFs, recomputed every five minutes, with each strike's change since the session before, a week and two weeks back. GET /symbols/{symbol}/options/exposure */
104
+ exposure(symbol: string, params?: { /** gamma, delta, vanna or charm. */ greek?: string; /** One expiry, YYYY-MM-DD. Default all. */ expiry?: string }): Promise<Item>
105
+ /** About 18 months of daily dealer net delta and net gamma against the close, oldest first. GET /symbols/{symbol}/options/exposure/history */
106
+ exposure_history(symbol: string, params?: { /** First day, YYYY-MM-DD. */ from?: string; /** Last day, YYYY-MM-DD. */ to?: string }): Promise<Item>
107
+ }
108
+
109
+ /** Dark pool prints, history, levels and ranks. */
110
+ export declare class Darkpool extends Resource {
111
+ /** The latest session's prints as they happen, newest first, and any of the last 10 sessions with date. Pass since to poll. GET /darkpool/prints */
112
+ prints(params?: { /** One ticker. */ symbol?: string; /** A session in the last 10, YYYY-MM-DD. */ date?: string; /** dark (off-exchange) or lit (exchange blocks). */ venue?: string; /** Only prints worth at least this, $. */ min_value?: number; /** Only prints after this id, oldest first. */ since?: number; /** Rows per page, up to 1000. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
113
+ /** One symbol's prints from the archive, every session since 2025-06-09, newest first. GET /darkpool/history */
114
+ history(params?: { /** Ticker. */ symbol: string; /** First day. Default 30 days before to. */ from?: string; /** Last day. Default today. */ to?: string; /** dark or lit. */ venue?: string; /** Minimum value, $. */ min_value?: number; /** Rows per page, up to 1000. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
115
+ /** The price levels with the most dark pool money over the last 10 sessions, and 30 sessions of daily totals. GET /symbols/{symbol}/darkpool */
116
+ levels(symbol: string, params?: { }): Promise<Item>
117
+ /** A year of one stock's prints, each ranked against every print of the same kind in its last 12 months (1 is the largest in a year). Prints are reported after they happen. GET /symbols/{symbol}/darkpool/ranked */
118
+ ranked(symbol: string, params?: { /** trade (block trades), close or open (the auctions). */ kind?: string; /** big (largest first) or new. */ sort?: string; /** Rows per page, up to 200. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
119
+ }
120
+
121
+ /** Each symbol's fundamentals, analysts and technicals. */
122
+ export declare class Research extends Resource {
123
+ /** Quote, returns, valuation, margins, short interest and the company profile. GET /symbols/{symbol}/summary */
124
+ summary(symbol: string, params?: { }): Promise<Item>
125
+ /** Ratings from each firm's latest call in the last year, price targets from the last six months, and recent actions. GET /symbols/{symbol}/analysts */
126
+ analysts(symbol: string, params?: { }): Promise<Item>
127
+ /** The last 8 quarters against estimates, the beat record and the next report. GET /symbols/{symbol}/earnings */
128
+ earnings(symbol: string, params?: { }): Promise<Item>
129
+ /** Twelve quarters and six fiscal years of the income statement, with cash flow. GET /symbols/{symbol}/financials */
130
+ financials(symbol: string, params?: { }): Promise<Item>
131
+ /** An overall technical rating with the signals, moving averages and oscillators behind it, and monthly seasonality. GET /symbols/{symbol}/technicals */
132
+ technicals(symbol: string, params?: { }): Promise<Item>
133
+ /** Recent insider buys and sells, short interest history, float and institutional ownership. GET /symbols/{symbol}/ownership */
134
+ ownership(symbol: string, params?: { }): Promise<Item>
135
+ /** An ETF's sector weights, top 10 holdings and facts. GET /symbols/{symbol}/holdings */
136
+ holdings(symbol: string, params?: { }): Promise<Item>
137
+ }
138
+
139
+ /** The full-market scanner. */
140
+ export declare class Scanner extends Resource {
141
+ /** Filter on any numeric field with min_<field> and max_<field> (e.g. min_rvol=2&max_rsi=30), require labels, and sort by any field. GET /scanner */
142
+ scan(params?: { /** Comma-separated fields to return. Default a compact set. */ fields?: string; /** Comma-separated label ids; a row must carry all of them. */ labels?: string; /** One sector, e.g. Technology. */ sector?: string; /** stock, etf or adr. */ kind?: string; /** Field to sort by. */ sort?: string; /** asc or desc. */ order?: string; /** Rows per page, up to 1000. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string; [filter: string]: string | number | boolean | undefined }): Promise<List>
143
+ /** Every field name, and every label with its group and lean. GET /scanner/fields */
144
+ fields(params?: { }): Promise<Item>
145
+ /** One symbol's full scanner row. GET /symbols/{symbol}/scan */
146
+ symbol(symbol: string, params?: { }): Promise<Item>
147
+ }
148
+
149
+ /** Live orders matching tested flow patterns. */
150
+ export declare class Signals extends Resource {
151
+ /** Signals newest first, today's live. GET /signals */
152
+ list(params?: { /** One pattern: repeat-flow, opening-calls, heavy-calls, etf-repeat-calls, itm-puts, burst-calls, index-tide-calls. */ source?: string; /** One ticker. */ symbol?: string; /** open or settled. */ status?: string; /** Fired on this day, YYYY-MM-DD. */ date?: string; /** Rows per page, up to 100. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
153
+ /** One signal with the prints behind it and every mark. GET /signals/{id} */
154
+ get(id: number, params?: { }): Promise<Item>
155
+ }
156
+
157
+ /** Kalshi and Polymarket finance questions. */
158
+ export declare class Probabilities extends Resource {
159
+ /** Every live question the board shows (books no wider than 10 cents, active in the last day), with its leading outcomes. GET /probabilities */
160
+ list(params?: { /** close, range, hit or earnings. */ group?: string; /** One underlying, e.g. SPX, NDX, NVDA. */ symbol?: string }): Promise<List>
161
+ /** One question with every outcome, and for earnings questions the stock's past report-day moves. GET /probabilities/{id} */
162
+ get(id: string, params?: { }): Promise<Item>
163
+ /** One outcome's chance through time, live or settled: the last trade's price in each hour or day. GET /probabilities/markets/{market}/history */
164
+ history(market: string, params?: { /** hour or day. */ interval?: string; /** First day, YYYY-MM-DD. */ from?: string; /** Last day, YYYY-MM-DD. */ to?: string }): Promise<Item>
165
+ /** Where Kalshi and Polymarket put the S&P 500 at each date they price, from the next close to year end. GET /probabilities/outlook */
166
+ outlook(params?: { }): Promise<Item>
167
+ /** The S&P 500's and Nasdaq-100's last 30 sessions: where the crowd put the close at 10 AM against where it closed. GET /probabilities/track */
168
+ track(params?: { }): Promise<Item>
169
+ /** Every finance market Kalshi has settled since June 2021, and Polymarket's, the latest to close first. GET /probabilities/settled */
170
+ settled(params?: { /** kalshi or polymarket. */ source?: string; /** Kalshi series (e.g. KXINXU, the S&P 500 close) or Polymarket event id. */ series?: string; /** Kalshi category (Financials, Economics, Crypto) or Polymarket tag (stocks, economy, fed). */ category?: string; /** Closed on or after, YYYY-MM-DD. Default 30 days back unless series is set. */ from?: string; /** Closed on or before, YYYY-MM-DD. */ to?: string; /** Rows per page, up to 1000. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
171
+ }
172
+
173
+ /** The Tradytics AI Fund. */
174
+ export declare class Fund extends Resource {
175
+ /** Exposure, open positions and the latest posts. GET /fund */
176
+ summary(params?: { }): Promise<Item>
177
+ /** Every trade, open and closed, newest first. GET /fund/trades */
178
+ trades(params?: { /** open or closed. */ status?: string; /** One ticker. */ symbol?: string; /** Rows per page, up to 200. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
179
+ /** The portfolio manager's posts (one per trade, add, trim or close) and weekly letters, newest first. GET /fund/posts */
180
+ posts(params?: { /** post or letter. */ kind?: string; /** Rows per page, up to 100. */ limit?: number; /** next_cursor from the previous page. */ cursor?: string }): Promise<List>
181
+ }
182
+
183
+ /** Your own backtests, portfolio and dashboards. */
184
+ export declare class Account extends Resource {
185
+ /** Your backtests, the latest first. GET /backtests */
186
+ backtests(params?: { /** Only backtests whose title or messages mention this. */ q?: string; /** Rows per page, up to 200. */ limit?: number }): Promise<List>
187
+ /** One backtest: the conversation and every run it made. GET /backtests/{id} */
188
+ backtest(id: number, params?: { }): Promise<Item>
189
+ /** Your linked brokerage accounts, read-only: holdings, options and recent orders. GET /portfolio */
190
+ portfolio(params?: { }): Promise<Item>
191
+ /** A year of closed round trips, newest first, with dividends and fees. GET /portfolio/trades */
192
+ portfolio_trades(params?: { }): Promise<Item>
193
+ /** Risk by source, beta, value at risk and tracking error, and returns split into market, sectors, styles and stock picking. 404 not_connected before a brokerage is linked. GET /portfolio/factors */
194
+ portfolio_factors(params?: { }): Promise<Item>
195
+ /** Your dashboards. GET /dashboards */
196
+ dashboards(params?: { }): Promise<List>
197
+ /** One dashboard's layout. GET /dashboards/{id} */
198
+ dashboard(id: number, params?: { }): Promise<Item>
199
+ }
package/resources.js ADDED
@@ -0,0 +1,112 @@
1
+ // Generated by web/scripts/sdk.mjs from the docs content. Do not edit.
2
+ import { Resource, enc } from './base.js'
3
+
4
+ export class Symbols extends Resource {
5
+ list(params = {}) { return this._get('/symbols', params) }
6
+ get(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}`, params) }
7
+ quotes(params = {}) { return this._get('/quotes', params) }
8
+ bars(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/bars`, params) }
9
+ news(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/news`, params) }
10
+ }
11
+
12
+ export class Market extends Resource {
13
+ assets(params = {}) { return this._get('/market/assets', params) }
14
+ breadth(params = {}) { return this._get('/market/breadth', params) }
15
+ sectors(params = {}) { return this._get('/market/sectors', params) }
16
+ heatmap(params = {}) { return this._get('/market/heatmap', params) }
17
+ themes(params = {}) { return this._get('/market/themes', params) }
18
+ movers(params = {}) { return this._get('/market/movers', params) }
19
+ crypto(params = {}) { return this._get('/market/crypto', params) }
20
+ crypto_sectors(params = {}) { return this._get('/market/crypto/sectors', params) }
21
+ digest(params = {}) { return this._get('/market/digest', params) }
22
+ news(params = {}) { return this._get('/news', params) }
23
+ earnings_calendar(params = {}) { return this._get('/calendar/earnings', params) }
24
+ insiders(params = {}) { return this._get('/insiders', params) }
25
+ congress(params = {}) { return this._get('/congress', params) }
26
+ }
27
+
28
+ export class Options extends Resource {
29
+ flow(params = {}) { return this._get('/options/flow', params) }
30
+ flow_history(params = {}) { return this._get('/options/flow/history', params) }
31
+ sentiment(params = {}) { return this._get('/market/options/sentiment', params) }
32
+ pressure(params = {}) { return this._get('/market/options/pressure', params) }
33
+ index_gamma(params = {}) { return this._get('/market/options/gamma', params) }
34
+ put_call(params = {}) { return this._get('/market/options/put-call', params) }
35
+ leaders(params = {}) { return this._get('/market/options/leaders', params) }
36
+ sectors(params = {}) { return this._get('/market/options/sectors', params) }
37
+ top_prints(params = {}) { return this._get('/market/options/top-prints', params) }
38
+ contracts(params = {}) { return this._get('/market/options/contracts', params) }
39
+ iv(params = {}) { return this._get('/market/options/iv', params) }
40
+ zero_dte(params = {}) { return this._get('/market/options/zero-dte', params) }
41
+ zero_dte_gamma(params = {}) { return this._get('/market/options/zero-dte/gamma', params) }
42
+ read(params = {}) { return this._get('/market/options/read', params) }
43
+ bets(params = {}) { return this._get('/market/options/bets', params) }
44
+ unusual(params = {}) { return this._get('/market/options/unusual', params) }
45
+ chains(params = {}) { return this._get('/market/options/chains', params) }
46
+ evidence(params = {}) { return this._get('/market/options/evidence', params) }
47
+ overview(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options`, params) }
48
+ net_flow(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/flow`, params) }
49
+ gamma(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/gamma`, params) }
50
+ volatility(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/volatility`, params) }
51
+ open_interest(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/open-interest`, params) }
52
+ expiries(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/expiries`, params) }
53
+ orders(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/orders`, params) }
54
+ history(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/history`, params) }
55
+ exposure(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/exposure`, params) }
56
+ exposure_history(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/options/exposure/history`, params) }
57
+ }
58
+
59
+ export class Darkpool extends Resource {
60
+ prints(params = {}) { return this._get('/darkpool/prints', params) }
61
+ history(params = {}) { return this._get('/darkpool/history', params) }
62
+ levels(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/darkpool`, params) }
63
+ ranked(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/darkpool/ranked`, params) }
64
+ }
65
+
66
+ export class Research extends Resource {
67
+ summary(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/summary`, params) }
68
+ analysts(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/analysts`, params) }
69
+ earnings(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/earnings`, params) }
70
+ financials(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/financials`, params) }
71
+ technicals(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/technicals`, params) }
72
+ ownership(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/ownership`, params) }
73
+ holdings(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/holdings`, params) }
74
+ }
75
+
76
+ export class Scanner extends Resource {
77
+ scan(params = {}) { return this._get('/scanner', params) }
78
+ fields(params = {}) { return this._get('/scanner/fields', params) }
79
+ symbol(symbol, params = {}) { return this._get(`/symbols/${enc(symbol)}/scan`, params) }
80
+ }
81
+
82
+ export class Signals extends Resource {
83
+ list(params = {}) { return this._get('/signals', params) }
84
+ get(id, params = {}) { return this._get(`/signals/${enc(id)}`, params) }
85
+ }
86
+
87
+ export class Probabilities extends Resource {
88
+ list(params = {}) { return this._get('/probabilities', params) }
89
+ get(id, params = {}) { return this._get(`/probabilities/${enc(id)}`, params) }
90
+ history(market, params = {}) { return this._get(`/probabilities/markets/${enc(market)}/history`, params) }
91
+ outlook(params = {}) { return this._get('/probabilities/outlook', params) }
92
+ track(params = {}) { return this._get('/probabilities/track', params) }
93
+ settled(params = {}) { return this._get('/probabilities/settled', params) }
94
+ }
95
+
96
+ export class Fund extends Resource {
97
+ summary(params = {}) { return this._get('/fund', params) }
98
+ trades(params = {}) { return this._get('/fund/trades', params) }
99
+ posts(params = {}) { return this._get('/fund/posts', params) }
100
+ }
101
+
102
+ export class Account extends Resource {
103
+ backtests(params = {}) { return this._get('/backtests', params) }
104
+ backtest(id, params = {}) { return this._get(`/backtests/${enc(id)}`, params) }
105
+ portfolio(params = {}) { return this._get('/portfolio', params) }
106
+ portfolio_trades(params = {}) { return this._get('/portfolio/trades', params) }
107
+ portfolio_factors(params = {}) { return this._get('/portfolio/factors', params) }
108
+ dashboards(params = {}) { return this._get('/dashboards', params) }
109
+ dashboard(id, params = {}) { return this._get(`/dashboards/${enc(id)}`, params) }
110
+ }
111
+
112
+ export const RESOURCES = { symbols: Symbols, market: Market, options: Options, darkpool: Darkpool, research: Research, scanner: Scanner, signals: Signals, probabilities: Probabilities, fund: Fund, account: Account }
package/version.js ADDED
@@ -0,0 +1 @@
1
+ export const VERSION = '0.1.1'