thetadatadx 8.0.10 → 8.0.11

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.
Files changed (4) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +734 -73
  3. package/index.js +58 -52
  4. package/package.json +4 -4
package/README.md CHANGED
@@ -109,7 +109,7 @@ npm run build # requires Rust stable + protoc
109
109
 
110
110
  ## API reference
111
111
 
112
- All 61 endpoints from `endpoint_surface.toml` are exposed as camelCase methods on `ThetaDataDx`. See `index.d.ts` for the complete method list with JSDoc comments.
112
+ Every historical endpoint from `endpoint_surface.toml` is exposed as a camelCase method on `ThetaDataDx`. See `index.d.ts` for the complete method list with JSDoc comments.
113
113
 
114
114
  ## Docs
115
115
 
package/index.d.ts CHANGED
@@ -1,17 +1,5 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
- export type Right = 'call' | 'put' | 'both'
4
- export const Right: { readonly Call: 'call', readonly Put: 'put', readonly Both: 'both' }
5
- export type Venue = 'nqb' | 'utp_cta'
6
- export const Venue: { readonly Nqb: 'nqb', readonly UtpCta: 'utp_cta' }
7
- export type Interval = 'tick' | '10ms' | '100ms' | '500ms' | '1s' | '5s' | '10s' | '15s' | '30s' | '1m' | '5m' | '10m' | '15m' | '30m' | '1h'
8
- export const Interval: { readonly Tick: 'tick', readonly Ms10: '10ms', readonly Ms100: '100ms', readonly Ms500: '500ms', readonly S1: '1s', readonly S5: '5s', readonly S10: '10s', readonly S15: '15s', readonly S30: '30s', readonly M1: '1m', readonly M5: '5m', readonly M10: '10m', readonly M15: '15m', readonly M30: '30m', readonly H1: '1h' }
9
- export type RateType = 'sofr' | 'treasury_m1' | 'treasury_m3' | 'treasury_m6' | 'treasury_y1' | 'treasury_y2' | 'treasury_y3' | 'treasury_y5' | 'treasury_y7' | 'treasury_y10' | 'treasury_y20' | 'treasury_y30'
10
- export const RateType: { readonly Sofr: 'sofr', readonly TreasuryM1: 'treasury_m1', readonly TreasuryM3: 'treasury_m3', readonly TreasuryM6: 'treasury_m6', readonly TreasuryY1: 'treasury_y1', readonly TreasuryY2: 'treasury_y2', readonly TreasuryY3: 'treasury_y3', readonly TreasuryY5: 'treasury_y5', readonly TreasuryY7: 'treasury_y7', readonly TreasuryY10: 'treasury_y10', readonly TreasuryY20: 'treasury_y20', readonly TreasuryY30: 'treasury_y30' }
11
- export type RequestType = 'trade' | 'quote'
12
- export const RequestType: { readonly Trade: 'trade', readonly Quote: 'quote' }
13
- export type Version = 'latest' | '1'
14
- export const Version: { readonly Latest: 'latest', readonly V1: '1' }
15
3
  export declare class ThetaDataDx {
16
4
  /**
17
5
  * Connect to ThetaData. Historical (MDDS/gRPC) only; call startStreaming()
@@ -33,127 +21,744 @@ export declare class ThetaDataDx {
33
21
  * (Number would top out at 2^53).
34
22
  */
35
23
  droppedEvents(): bigint
36
- /** List all available stock ticker symbols. */
24
+ /**
25
+ * List all available stock ticker symbols.
26
+ *
27
+ * A symbol can be defined as a unique identifier for a stock / underlying asset. Common terms also include: root, ticker, and underlying. This endpoint returns all traded symbols for stocks. This endpoint is updated overnight.
28
+ */
37
29
  stockListSymbols(timeoutMs?: number | undefined | null): Array<string>
38
- /** List available dates for a stock by request type (EOD, TRADE, QUOTE, etc.). */
30
+ /**
31
+ * List available dates for a stock by request type (EOD, TRADE, QUOTE, etc.).
32
+ *
33
+ * Lists all dates of data that are available for a stock with a given request type and symbol. This endpoint is updated overnight.
34
+ */
39
35
  stockListDates(requestType: string, symbol: string, timeoutMs?: number | undefined | null): Array<string>
40
- /** Get the latest OHLC snapshot for one or more stocks. */
36
+ /**
37
+ * Get the latest OHLC snapshot for one or more stocks.
38
+ *
39
+ * Provides a real-time Open, High, Low, Close for the current day.
40
+ * * Returns a real-time session OHLC from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
41
+ * * Returns a 15-minute delayed session OHLC from the [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs) if the account has the stocks value subscription.
42
+ * * Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.
43
+ *
44
+ * Defaults (upstream):
45
+ * - `venue`: `"nqb"`
46
+ */
41
47
  stockSnapshotOHLC(symbols: string | Array<string>, venue?: string | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<OhlcTick>
42
- /** Get the latest trade snapshot for one or more stocks. */
48
+ /**
49
+ * Get the latest trade snapshot for one or more stocks.
50
+ *
51
+ * Returns a real-time last trade from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
52
+ *
53
+ * - Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.
54
+ *
55
+ * Defaults (upstream):
56
+ * - `venue`: `"nqb"`
57
+ */
43
58
  stockSnapshotTrade(symbols: string | Array<string>, venue?: string | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<TradeTick>
44
- /** Get the latest NBBO quote snapshot for one or more stocks. */
59
+ /**
60
+ * Get the latest NBBO quote snapshot for one or more stocks.
61
+ *
62
+ * * Returns a real-time last BBO quote from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
63
+ * * Returns a 15-minute delayed NBBO quote from the [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs) account has the [stocks value subscription](https://www.thetadata.net/subscribe.html#stocks) subscription.
64
+ * - Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.
65
+ *
66
+ * Defaults (upstream):
67
+ * - `venue`: `"nqb"`
68
+ */
45
69
  stockSnapshotQuote(symbols: string | Array<string>, venue?: string | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<QuoteTick>
46
- /** Get the latest market value snapshot for one or more stocks. */
70
+ /**
71
+ * Get the latest market value snapshot for one or more stocks.
72
+ *
73
+ * * Returns a real-time market value derived from the last BBO quote from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
74
+ * * Returns a 15-minute delayed market value derived from an NBBO quote from the [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs) if the account has the [stocks value subscription](https://www.thetadata.net/subscribe.html#stocks) subscription.
75
+ * - Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.
76
+ *
77
+ * Defaults (upstream):
78
+ * - `venue`: `"nqb"`
79
+ */
47
80
  stockSnapshotMarketValue(symbols: string | Array<string>, venue?: string | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<MarketValueTick>
48
- /** Fetch end-of-day stock data for a date range. Returns OHLCV + bid/ask per trading day. */
81
+ /**
82
+ * Fetch end-of-day stock data for a date range. Returns OHLCV + bid/ask per trading day.
83
+ *
84
+ * Since [the equity SIPs](/Articles/Data-And-Requests/The-SIPs.html) only generate a partial EOD report, Theta Data generates a national EOD report at 17:15 ET each day. ``created`` represents the datetime the report was generated and ``last_trade`` represents the datetime of the last trade. The quote in the response represents the last NBBO reported by [CTA or UTP](/Articles/Data-And-Requests/The-SIPs.html) at the time of report generation. You can read more about EOD & OHLC data [here](/Articles/Data-And-Requests/OHLC-EOD.html). Theta Data plans to avail SIP EOD reports in the near future.
85
+ */
49
86
  stockHistoryEOD(symbol: string, startDate: string | Date, endDate: string | Date, timeoutMs?: number | undefined | null): Array<EodTick>
50
- /** Fetch intraday OHLC bars for a stock on a single date. */
87
+ /**
88
+ * Fetch intraday OHLC bars for a stock on a single date.
89
+ *
90
+ * - Aggregated OHLC bars that use [SIP rules](/Articles/Data-And-Requests/OHLC-EOD.html) for each bar. Time timestamp of the bar represents the opening time of the bar. For a trade to be part of the bar: ``bar time`` <= ``trade time`` < ``bar timestamp + ivl``, where ivl is the specified interval size in milliseconds.
91
+ * - Set the ``venue`` parameter to ``nqb`` to access current-day real-time historic data from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
92
+ * - Multi-day requests are limited to 1 month of data.
93
+ *
94
+ * Defaults (upstream):
95
+ * - `interval`: `"1s"`
96
+ * - `start_time`: `"09:30:00"`
97
+ * - `end_time`: `"16:00:00"`
98
+ * - `venue`: `"nqb"`
99
+ */
51
100
  stockHistoryOHLC(symbol: string, date: string | Date, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, venue?: string | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<OhlcTick>
52
- /** Fetch all trades for a stock on a given date. */
101
+ /**
102
+ * Fetch all trades for a stock on a given date.
103
+ *
104
+ * Returns every trade reported by [UTP & CTA](/Articles/Data-And-Requests/The-SIPs). Set the ``venue`` parameter to ``nqb`` to access current-day real-time historic data from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
105
+ * - Multi-day requests are limited to 1 month of data.
106
+ *
107
+ * Defaults (upstream):
108
+ * - `start_time`: `"09:30:00"`
109
+ * - `end_time`: `"16:00:00"`
110
+ * - `venue`: `"nqb"`
111
+ */
53
112
  stockHistoryTrade(symbol: string, date: string | Date, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, venue?: string | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<TradeTick>
54
- /** Fetch NBBO quotes for a stock on a given date at a given interval. */
113
+ /**
114
+ * Fetch NBBO quotes for a stock on a given date at a given interval.
115
+ *
116
+ * - Returns every NBBO quote reported by [UTP and CTA](/Articles/Data-And-Requests/The-SIPs).
117
+ * - If the ``interval`` parameter is specified, the quote for each interval represents the last quote prior to the interval's timestamp.
118
+ * - Set the ``venue`` parameter to ``nqb`` to access current-day real-time historic data from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
119
+ * - Multi-day requests are limited to 1 month of data.
120
+ *
121
+ * Defaults (upstream):
122
+ * - `interval`: `"1s"`
123
+ * - `start_time`: `"09:30:00"`
124
+ * - `end_time`: `"16:00:00"`
125
+ * - `venue`: `"nqb"`
126
+ */
55
127
  stockHistoryQuote(symbol: string, date: string | Date, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, venue?: string | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<QuoteTick>
56
- /** Fetch combined trade + quote ticks for a stock on a given date. Returns raw DataTable. */
128
+ /**
129
+ * Fetch combined trade + quote ticks for a stock on a given date. Returns raw DataTable.
130
+ *
131
+ * Returns every trade reported by [UTP & CTA](/Articles/Data-And-Requests/The-SIPs) paired with the last BBO quote reported by [UTP or CTA](/Articles/Data-And-Requests/The-SIPs) at the time of trade. A quote is matched with a trade if its timestamp ``<=`` the trade timestamp. If you prefer to match quotes with timestamps that are ``<`` the trade timestamp, specify the ``exclusive`` parameter to ``true``. Set the ``venue`` parameter to ``nqb`` to access current-day real-time historic data from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
132
+ * - Multi-day requests are limited to 1 month of data.
133
+ *
134
+ * Defaults (upstream):
135
+ * - `start_time`: `"09:30:00"`
136
+ * - `end_time`: `"16:00:00"`
137
+ * - `exclusive`: `true`
138
+ * - `venue`: `"nqb"`
139
+ */
57
140
  stockHistoryTradeQuote(symbol: string, date: string | Date, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, exclusive?: boolean | undefined | null, venue?: string | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<TradeQuoteTick>
58
- /** Fetch the trade at a specific time of day across a date range. */
141
+ /**
142
+ * Fetch the trade at a specific time of day across a date range.
143
+ *
144
+ * #### Real-time request:
145
+ * - Returns a real-time session from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs.html#nasdaq-basic) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
146
+ * - Returns a 15-minute delayed session from the [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs.html#equities-cta-utp) account has the [stocks value subscription](https://www.thetadata.net/subscribe.html#stocks) subscription.
147
+ *
148
+ * #### Historical request:
149
+ * Returns the last trade reported by [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs.html#equities-cta-utp) at a specified millisecond of the day.
150
+ * Trade condition mappings can be found [here](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html).
151
+ *
152
+ * Defaults (upstream):
153
+ * - `venue`: `"nqb"`
154
+ */
59
155
  stockAtTimeTrade(symbol: string, startDate: string | Date, endDate: string | Date, timeOfDay: string | Date, venue?: string | undefined | null, timeoutMs?: number | undefined | null): Array<TradeTick>
60
- /** Fetch the quote at a specific time of day across a date range. */
156
+ /**
157
+ * Fetch the quote at a specific time of day across a date range.
158
+ *
159
+ * #### Real-time request:
160
+ * - Subscription tier standard or higher will default to NQB.
161
+ * - Real-time last BBO quote at-time_of_day-time from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs.html#nasdaq-basic) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).
162
+ * - 15-minute delayed NBBO quote at-time_of_day-time from the [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs.html#equities-cta-utp) account has the [stocks value subscription](https://www.thetadata.net/subscribe.html#stocks) subscription.
163
+ *
164
+ * #### Historical request:
165
+ * Returns the last NBBO quote reported by [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs.html#equities-cta-utp) at a specified millisecond of the day.
166
+ *
167
+ * Defaults (upstream):
168
+ * - `venue`: `"nqb"`
169
+ */
61
170
  stockAtTimeQuote(symbol: string, startDate: string | Date, endDate: string | Date, timeOfDay: string | Date, venue?: string | undefined | null, timeoutMs?: number | undefined | null): Array<QuoteTick>
62
- /** List all available option underlying symbols. */
171
+ /**
172
+ * List all available option underlying symbols.
173
+ *
174
+ * A symbol can be defined as a unique identifier for a stock / underlying asset. Common terms also include: root, ticker, and underlying. This endpoint returns all traded symbols for options. This endpoint is updated overnight.
175
+ */
63
176
  optionListSymbols(timeoutMs?: number | undefined | null): Array<string>
64
- /** List available dates for an option contract by request type. */
177
+ /**
178
+ * List available dates for an option contract by request type.
179
+ *
180
+ * Lists all dates of data that are available for an option with a given symbol, request type, and expiration.
181
+ * This endpoint is updated overnight.
182
+ *
183
+ * Defaults (upstream):
184
+ * - `strike`: `"*"`
185
+ * - `right`: `"both"`
186
+ */
65
187
  optionListDates(requestType: string, symbol: string, expiration: string | Date, timeoutMs?: number | undefined | null): Array<string>
66
- /** List available expiration dates for an option underlying. */
188
+ /**
189
+ * List available expiration dates for an option underlying.
190
+ *
191
+ * Lists all dates of expirations that are available for an option with a given symbol.
192
+ * This endpoint is updated overnight.
193
+ */
67
194
  optionListExpirations(symbol: string, timeoutMs?: number | undefined | null): Array<string>
68
- /** List available strike prices for an option at a given expiration. */
195
+ /**
196
+ * List available strike prices for an option at a given expiration.
197
+ *
198
+ * Lists all strikes that are available for an option with a given symbol and expiration date.
199
+ * This endpoint is updated overnight.
200
+ */
69
201
  optionListStrikes(symbol: string, expiration: string | Date, timeoutMs?: number | undefined | null): Array<string>
70
- /** List all option contracts for a symbol on a given date. */
202
+ /**
203
+ * List all option contracts for a symbol on a given date.
204
+ *
205
+ * Lists all contracts that were traded or quoted on a particular date.
206
+ *
207
+ * If the ``symbol`` parameter is specified, the returned contracts will be filtered to match the symbol.
208
+ * Multiple symbols can be specified by separating them with commas such as ``symbol=AAPL,SPY,AMD``
209
+ * This endpoint is updated real-time.
210
+ */
71
211
  optionListContracts(requestType: string, symbol: string, date: string | Date, maxDte?: number | undefined | null, timeoutMs?: number | undefined | null): Array<OptionContract>
72
- /** Get the latest OHLC snapshot for an option contract. */
212
+ /**
213
+ * Get the latest OHLC snapshot for an option contract.
214
+ *
215
+ * - Retrieve a real-time last ohlc of an option contract for the trading day.
216
+ * - You might need to change the default expiration date to a different date if it is past the current date.
217
+ *
218
+ * Defaults (upstream):
219
+ * - `strike`: `"*"`
220
+ * - `right`: `"both"`
221
+ */
73
222
  optionSnapshotOHLC(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<OhlcTick>
74
- /** Get the latest trade snapshot for an option contract. */
223
+ /**
224
+ * Get the latest trade snapshot for an option contract.
225
+ *
226
+ * - Retrieve the real-time last trade of an option contract.
227
+ * - You might need to change the default expiration date to a different date if it is past the current date.
228
+ * - This endpoint will return no data if the market was closed for the day. Theta Data resets the snapshot cache at midnight ET every night.
229
+ *
230
+ * Defaults (upstream):
231
+ * - `strike`: `"*"`
232
+ * - `right`: `"both"`
233
+ */
75
234
  optionSnapshotTrade(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<TradeTick>
76
- /** Get the latest NBBO quote snapshot for an option contract. */
235
+ /**
236
+ * Get the latest NBBO quote snapshot for an option contract.
237
+ *
238
+ * - Retrieve a real-time last NBBO quote of an option contract.
239
+ * - You might need to change the default expiration date to a different date if it is past the current date.
240
+ * - This endpoint will return no data if the market was closed for the day. Theta Data resets the snapshot cache at midnight ET every night.
241
+ *
242
+ * Defaults (upstream):
243
+ * - `strike`: `"*"`
244
+ * - `right`: `"both"`
245
+ */
77
246
  optionSnapshotQuote(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<QuoteTick>
78
- /** Get the latest open interest snapshot for an option contract. */
247
+ /**
248
+ * Get the latest open interest snapshot for an option contract.
249
+ *
250
+ * - Retrieve the last open interest message of an option contract.
251
+ * - Open interest is reported around 06:30 ET every morning by OPRA and reflects the open interest at the of the previous trading day.
252
+ * - You might need to change the default expiration date to a different date if it is past the current date.
253
+ * - This endpoint will return no data if the market was closed for the day. Theta Data resets the snapshot cache at midnight ET every night.
254
+ *
255
+ * Defaults (upstream):
256
+ * - `strike`: `"*"`
257
+ * - `right`: `"both"`
258
+ */
79
259
  optionSnapshotOpenInterest(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<OpenInterestTick>
80
- /** Get the latest market value snapshot for an option contract. */
260
+ /**
261
+ * Get the latest market value snapshot for an option contract.
262
+ *
263
+ * * Returns a real-time market value derived from the last NBBO quote of an option contract.
264
+ *
265
+ * Defaults (upstream):
266
+ * - `strike`: `"*"`
267
+ * - `right`: `"both"`
268
+ */
81
269
  optionSnapshotMarketValue(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<MarketValueTick>
82
- /** Get implied volatility snapshot for an option contract (from ThetaData server). */
270
+ /**
271
+ * Get implied volatility snapshot for an option contract (from ThetaData server).
272
+ *
273
+ * Returns implied volatilies calculated using the national best bid, mid, and ask price
274
+ * of the option respectively. The underlying price represents whatever the last underlying price was at the
275
+ * ``underlying_timestamp`` field. You can read more about how Theta Data calculates greeks
276
+ * [here](/Articles/Data-And-Requests/Option-Greeks.html).
277
+ *
278
+ * Defaults (upstream):
279
+ * - `strike`: `"*"`
280
+ * - `right`: `"both"`
281
+ * - `rate_type`: `"sofr"`
282
+ * - `version`: `"latest"`
283
+ * - `use_market_value`: `false`
284
+ */
83
285
  optionSnapshotGreeksImpliedVolatility(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, stockPrice?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, useMarketValue?: boolean | undefined | null, timeoutMs?: number | undefined | null): Array<IvTick>
84
- /** Get all Greeks snapshot for an option contract (from ThetaData server). */
286
+ /**
287
+ * Get all Greeks snapshot for an option contract (from ThetaData server).
288
+ *
289
+ * - Retrieve a real-time last greeks calculation for all option contracts that lie on a provided expiration.
290
+ * - You might need to change the default expiration date to a different date if it is past the current date. Some quotes are omitted in the example to reduce the space of the sample output.
291
+ * - Make `expiration` * if you want to get the snapshot for every expiration chain for the underlying.
292
+ * > This endpoint will return no data if the market was closed for the day. Theta Data resets the snapshot cache at midnight ET every night.
293
+ *
294
+ * Defaults (upstream):
295
+ * - `strike`: `"*"`
296
+ * - `right`: `"both"`
297
+ * - `rate_type`: `"sofr"`
298
+ * - `version`: `"latest"`
299
+ * - `use_market_value`: `false`
300
+ */
85
301
  optionSnapshotGreeksAll(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, stockPrice?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, useMarketValue?: boolean | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
86
- /** Get first-order Greeks snapshot (delta, theta, rho) for an option contract. */
302
+ /**
303
+ * Get first-order Greeks snapshot (delta, theta, rho) for an option contract.
304
+ *
305
+ * - Retrieve a real-time last greeks calculation for all option contracts that lie on a provided expiration.
306
+ * - You might need to change the default expiration date to a different date if it is past the current date. Some quotes are omitted in the example to reduce the space of the sample output.
307
+ * - Make `expiration` * if you want to get the snapshot for every expiration chain for the underlying.
308
+ * > This endpoint will return no data if the market was closed for the day. Theta Data resets the snapshot cache at midnight ET every night.
309
+ *
310
+ * Defaults (upstream):
311
+ * - `strike`: `"*"`
312
+ * - `right`: `"both"`
313
+ * - `rate_type`: `"sofr"`
314
+ * - `version`: `"latest"`
315
+ * - `use_market_value`: `false`
316
+ */
87
317
  optionSnapshotGreeksFirstOrder(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, stockPrice?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, useMarketValue?: boolean | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
88
- /** Get second-order Greeks snapshot (gamma, vanna, charm) for an option contract. */
318
+ /**
319
+ * Get second-order Greeks snapshot (gamma, vanna, charm) for an option contract.
320
+ *
321
+ * - Retrieve a real-time last second order greeks calculation for all option contracts that lie on a provided expiration.
322
+ * - You might need to change the default expiration date to a different date if it is past the current date. Some quotes are omitted in the example to reduce the space of the sample output.
323
+ * - Make `expiration` * if you want to get the snapshot for every expiration chain for the underlying.
324
+ * > This endpoint will return no data if the market was closed for the day. Theta Data resets the snapshot cache at midnight ET every night.
325
+ *
326
+ * Defaults (upstream):
327
+ * - `strike`: `"*"`
328
+ * - `right`: `"both"`
329
+ * - `rate_type`: `"sofr"`
330
+ * - `version`: `"latest"`
331
+ * - `use_market_value`: `false`
332
+ */
89
333
  optionSnapshotGreeksSecondOrder(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, stockPrice?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, useMarketValue?: boolean | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
90
- /** Get third-order Greeks snapshot (speed, color, ultima) for an option contract. */
334
+ /**
335
+ * Get third-order Greeks snapshot (speed, color, ultima) for an option contract.
336
+ *
337
+ * - Retrieve a real-time last third order greeks calculation for all option contracts that lie on a provided expiration.
338
+ * - You might need to change the default expiration date to a different date if it is past the current date. Some quotes are omitted in the example to reduce the space of the sample output.
339
+ * - Make `expiration` * if you want to get the snapshot for every expiration chain for the underlying.
340
+ * > This endpoint will return no data if the market was closed for the day. Theta Data resets the snapshot cache at midnight ET every night.
341
+ *
342
+ * Defaults (upstream):
343
+ * - `strike`: `"*"`
344
+ * - `right`: `"both"`
345
+ * - `rate_type`: `"sofr"`
346
+ * - `version`: `"latest"`
347
+ * - `use_market_value`: `false`
348
+ */
91
349
  optionSnapshotGreeksThirdOrder(symbol: string, expiration: string | Date, strike?: string | undefined | null, right?: string | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, stockPrice?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, minTime?: string | Date | undefined | null, useMarketValue?: boolean | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
92
- /** Fetch end-of-day option data for a contract over a date range. */
350
+ /**
351
+ * Fetch end-of-day option data for a contract over a date range.
352
+ *
353
+ * - Since [OPRA](/Articles/Data-And-Requests/The-SIPs.html) does not provide a national EOD report for options, Theta Data generates a national EOD report at 17:15 ET each day.
354
+ * - ``created`` represents the datetime the report was generated and ``last_trade`` represents the datetime of the last trade.
355
+ * - The quote in the response represents the last NBBO reported by OPRA at the time of report generation.
356
+ * - You can read more about EOD & OHLC data [here](/Articles/Data-And-Requests/OHLC-EOD.html).
357
+ *
358
+ * Defaults (upstream):
359
+ * - `strike`: `"*"`
360
+ * - `right`: `"both"`
361
+ */
93
362
  optionHistoryEOD(symbol: string, expiration: string | Date, startDate: string | Date, endDate: string | Date, strike?: string | undefined | null, right?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, timeoutMs?: number | undefined | null): Array<EodTick>
94
- /** Fetch intraday OHLC bars for an option contract. */
363
+ /**
364
+ * Fetch intraday OHLC bars for an option contract.
365
+ *
366
+ * - Aggregated OHLC bars that use [SIP rules](/Articles/Data-And-Requests/OHLC-EOD.html) for each bar.
367
+ * - Time timestamp of the bar represents the opening time of the bar. For a trade to be part of the bar: ``bar timestamp`` <= ``trade time`` < ``bar timestamp + interval``.
368
+ * - Multi-day requests are limited to 1 month of data.
369
+ *
370
+ * Defaults (upstream):
371
+ * - `strike`: `"*"`
372
+ * - `right`: `"both"`
373
+ * - `interval`: `"1s"`
374
+ * - `start_time`: `"09:30:00"`
375
+ * - `end_time`: `"16:00:00"`
376
+ */
95
377
  optionHistoryOHLC(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<OhlcTick>
96
- /** Fetch all trades for an option contract on a given date. */
378
+ /**
379
+ * Fetch all trades for an option contract on a given date.
380
+ *
381
+ * - Returns every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html).
382
+ * - Trade condition mappings can be found [here](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html).
383
+ * - Extended trade conditions are not reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) for options, so they can be ignored.
384
+ * - Multi-day requests are limited to 1 month of data, and must specify an expiration.
385
+ *
386
+ * Defaults (upstream):
387
+ * - `strike`: `"*"`
388
+ * - `right`: `"both"`
389
+ * - `start_time`: `"09:30:00"`
390
+ * - `end_time`: `"16:00:00"`
391
+ */
97
392
  optionHistoryTrade(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<TradeTick>
98
- /** Fetch NBBO quotes for an option contract on a given date. */
393
+ /**
394
+ * Fetch NBBO quotes for an option contract on a given date.
395
+ *
396
+ * - Returns every NBBO quote reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html).
397
+ * - If the ``interval`` parameter is specified, the quote for each interval represents the last quote at the interval's timestamp.
398
+ * - Multi-day requests are limited to 1 month of data, and must specify an expiration.
399
+ *
400
+ * Defaults (upstream):
401
+ * - `strike`: `"*"`
402
+ * - `right`: `"both"`
403
+ * - `interval`: `"1s"`
404
+ * - `start_time`: `"09:30:00"`
405
+ * - `end_time`: `"16:00:00"`
406
+ */
99
407
  optionHistoryQuote(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<QuoteTick>
100
- /** Fetch combined trade + quote ticks for an option contract. */
408
+ /**
409
+ * Fetch combined trade + quote ticks for an option contract.
410
+ *
411
+ * - Returns every [trade](/operations/option_history_trade.html) reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) paired with the last NBBO quote reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) at the time of trade.
412
+ * - A quote is matched with a trade if its timestamp ``<=`` the trade timestamp.
413
+ * - To match trades with quotes timestamps that are ``<`` the trade timestamp, specify the ``exclusive``parameter to ``true``. After thorough testing, we have determined that using ``exclusive=true`` might yield better results for various applications.
414
+ * - Multi-day requests are limited to 1 month of data, and must specify an expiration.
415
+ *
416
+ * Defaults (upstream):
417
+ * - `strike`: `"*"`
418
+ * - `right`: `"both"`
419
+ * - `start_time`: `"09:30:00"`
420
+ * - `end_time`: `"16:00:00"`
421
+ * - `exclusive`: `true`
422
+ */
101
423
  optionHistoryTradeQuote(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, exclusive?: boolean | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<TradeQuoteTick>
102
- /** Fetch open interest history for an option contract. */
424
+ /**
425
+ * Fetch open interest history for an option contract.
426
+ *
427
+ * - Open Interest is normally reported once per day by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) at approximately 06:30 ET.
428
+ * - A new open interest message might not be sent by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) if there is no open interest for the option contract.
429
+ * - The reported open interest represents the open interest at the end of the previous trading day.
430
+ *
431
+ * Defaults (upstream):
432
+ * - `strike`: `"*"`
433
+ * - `right`: `"both"`
434
+ */
103
435
  optionHistoryOpenInterest(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<OpenInterestTick>
104
- /** Fetch end-of-day Greeks history for an option contract. */
436
+ /**
437
+ * Fetch end-of-day Greeks history for an option contract.
438
+ *
439
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
440
+ * - Uses Theta Data's EOD reports that get generated at 17:15 ET each day. The closing option price and closing underlying price are used for the greeks calculation.
441
+ * - **Set `expiration` to ``*`` if you want to retrieve data for every option that shares the same ``symbol``. (note: Any ``expiration=*`` must be requested day by day)**
442
+ *
443
+ * Defaults (upstream):
444
+ * - `strike`: `"*"`
445
+ * - `right`: `"both"`
446
+ * - `rate_type`: `"sofr"`
447
+ * - `version`: `"latest"`
448
+ * - `underlyer_use_nbbo`: `false`
449
+ */
105
450
  optionHistoryGreeksEOD(symbol: string, expiration: string | Date, startDate: string | Date, endDate: string | Date, strike?: string | undefined | null, right?: string | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, underlyerUseNbbo?: boolean | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
106
- /** Fetch all Greeks history for an option contract (intraday, sampled by interval). */
451
+ /**
452
+ * Fetch all Greeks history for an option contract (intraday, sampled by interval).
453
+ *
454
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
455
+ * - Calculated using the option and underlying midpoint price. If an interval size is specified (*highly recommended*), the option quote used in the calculation follows the same rules as the [quote](/operations/option_history_quote.html) endpoint.
456
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
457
+ * - Multi-day requests are limited to 1 month of data.
458
+ *
459
+ * Defaults (upstream):
460
+ * - `strike`: `"*"`
461
+ * - `right`: `"both"`
462
+ * - `interval`: `"1s"`
463
+ * - `start_time`: `"09:30:00"`
464
+ * - `end_time`: `"16:00:00"`
465
+ * - `rate_type`: `"sofr"`
466
+ * - `version`: `"latest"`
467
+ */
107
468
  optionHistoryGreeksAll(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
108
- /** Fetch all Greeks on each trade for an option contract. */
469
+ /**
470
+ * Fetch all Greeks on each trade for an option contract.
471
+ *
472
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
473
+ * - Calculates greeks for every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html).
474
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
475
+ * - Multi-day requests are limited to 1 month of data, and must specify an expiration.
476
+ *
477
+ * Defaults (upstream):
478
+ * - `strike`: `"*"`
479
+ * - `right`: `"both"`
480
+ * - `start_time`: `"09:30:00"`
481
+ * - `end_time`: `"16:00:00"`
482
+ * - `rate_type`: `"sofr"`
483
+ * - `version`: `"latest"`
484
+ */
109
485
  optionHistoryTradeGreeksAll(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
110
- /** Fetch first-order Greeks history (intraday, sampled by interval). */
486
+ /**
487
+ * Fetch first-order Greeks history (intraday, sampled by interval).
488
+ *
489
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
490
+ * - Calculated using the option and underlying midpoint price. If an interval size is specified (*highly recommended*), the option quote used in the calculation follows the same rules as the [quote](/operations/option_history_quote.html) endpoint.
491
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
492
+ * - Multi-day requests are limited to 1 month of data.
493
+ *
494
+ * Defaults (upstream):
495
+ * - `strike`: `"*"`
496
+ * - `right`: `"both"`
497
+ * - `interval`: `"1s"`
498
+ * - `start_time`: `"09:30:00"`
499
+ * - `end_time`: `"16:00:00"`
500
+ * - `rate_type`: `"sofr"`
501
+ * - `version`: `"latest"`
502
+ */
111
503
  optionHistoryGreeksFirstOrder(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
112
- /** Fetch first-order Greeks on each trade for an option contract. */
504
+ /**
505
+ * Fetch first-order Greeks on each trade for an option contract.
506
+ *
507
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
508
+ * - Calculates greeks for every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html).
509
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
510
+ * - Multi-day requests are limited to 1 month of data, and must specify an expiration.
511
+ *
512
+ * Defaults (upstream):
513
+ * - `strike`: `"*"`
514
+ * - `right`: `"both"`
515
+ * - `start_time`: `"09:30:00"`
516
+ * - `end_time`: `"16:00:00"`
517
+ * - `rate_type`: `"sofr"`
518
+ * - `version`: `"latest"`
519
+ */
113
520
  optionHistoryTradeGreeksFirstOrder(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
114
- /** Fetch second-order Greeks history (intraday, sampled by interval). */
521
+ /**
522
+ * Fetch second-order Greeks history (intraday, sampled by interval).
523
+ *
524
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
525
+ * - Calculated using the option and underlying midpoint price. If an interval size is specified (*highly recommended*), the option quote used in the calculation follows the same rules as the [quote](/operations/option_history_quote.html) endpoint.
526
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
527
+ * - Multi-day requests are limited to 1 month of data.
528
+ *
529
+ * Defaults (upstream):
530
+ * - `strike`: `"*"`
531
+ * - `right`: `"both"`
532
+ * - `interval`: `"1s"`
533
+ * - `start_time`: `"09:30:00"`
534
+ * - `end_time`: `"16:00:00"`
535
+ * - `rate_type`: `"sofr"`
536
+ * - `version`: `"latest"`
537
+ */
115
538
  optionHistoryGreeksSecondOrder(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
116
- /** Fetch second-order Greeks on each trade for an option contract. */
539
+ /**
540
+ * Fetch second-order Greeks on each trade for an option contract.
541
+ *
542
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
543
+ * - Calculates greeks for every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html).
544
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
545
+ * - Multi-day requests are limited to 1 month of data, and must specify an expiration.
546
+ *
547
+ * Defaults (upstream):
548
+ * - `strike`: `"*"`
549
+ * - `right`: `"both"`
550
+ * - `start_time`: `"09:30:00"`
551
+ * - `end_time`: `"16:00:00"`
552
+ * - `rate_type`: `"sofr"`
553
+ * - `version`: `"latest"`
554
+ */
117
555
  optionHistoryTradeGreeksSecondOrder(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
118
- /** Fetch third-order Greeks history (intraday, sampled by interval). */
556
+ /**
557
+ * Fetch third-order Greeks history (intraday, sampled by interval).
558
+ *
559
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
560
+ * - Calculated using the option and underlying midpoint price. If an interval size is specified (*highly recommended*), the option quote used in the calculation follows the same rules as the [quote](/operations/option_history_quote.html) endpoint.
561
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
562
+ * - Multi-day requests are limited to 1 month of data.
563
+ *
564
+ * Defaults (upstream):
565
+ * - `strike`: `"*"`
566
+ * - `right`: `"both"`
567
+ * - `interval`: `"1s"`
568
+ * - `start_time`: `"09:30:00"`
569
+ * - `end_time`: `"16:00:00"`
570
+ * - `rate_type`: `"sofr"`
571
+ * - `version`: `"latest"`
572
+ */
119
573
  optionHistoryGreeksThirdOrder(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
120
- /** Fetch third-order Greeks on each trade for an option contract. */
574
+ /**
575
+ * Fetch third-order Greeks on each trade for an option contract.
576
+ *
577
+ * - Returns the data for all contracts that share the same provided symbol and expiration.
578
+ * - Calculates greeks for every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html).
579
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
580
+ * - Multi-day requests are limited to 1 month of data, and must specify an expiration.
581
+ *
582
+ * Defaults (upstream):
583
+ * - `strike`: `"*"`
584
+ * - `right`: `"both"`
585
+ * - `start_time`: `"09:30:00"`
586
+ * - `end_time`: `"16:00:00"`
587
+ * - `rate_type`: `"sofr"`
588
+ * - `version`: `"latest"`
589
+ */
121
590
  optionHistoryTradeGreeksThirdOrder(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<GreeksTick>
122
- /** Fetch implied volatility history (intraday, sampled by interval). */
591
+ /**
592
+ * Fetch implied volatility history (intraday, sampled by interval).
593
+ *
594
+ * - Returns implied volatilies calculated using the national best bid, mid, and ask price of the option respectively.
595
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
596
+ * - Multi-day requests are limited to 1 month of data.
597
+ *
598
+ * Defaults (upstream):
599
+ * - `strike`: `"*"`
600
+ * - `right`: `"both"`
601
+ * - `interval`: `"1s"`
602
+ * - `start_time`: `"09:30:00"`
603
+ * - `end_time`: `"16:00:00"`
604
+ * - `rate_type`: `"sofr"`
605
+ * - `version`: `"latest"`
606
+ */
123
607
  optionHistoryGreeksImpliedVolatility(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<IvTick>
124
- /** Fetch implied volatility on each trade for an option contract. */
608
+ /**
609
+ * Fetch implied volatility on each trade for an option contract.
610
+ *
611
+ * - Returns implied volatilies calculated using the trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html).
612
+ * - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).
613
+ * - Multi-day requests are limited to 1 month of data, and must specify an expiration.
614
+ *
615
+ * Defaults (upstream):
616
+ * - `strike`: `"*"`
617
+ * - `right`: `"both"`
618
+ * - `start_time`: `"09:30:00"`
619
+ * - `end_time`: `"16:00:00"`
620
+ * - `rate_type`: `"sofr"`
621
+ * - `version`: `"latest"`
622
+ */
125
623
  optionHistoryTradeGreeksImpliedVolatility(symbol: string, expiration: string | Date, date: string | Date, strike?: string | undefined | null, right?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, annualDividend?: number | undefined | null, rateType?: string | undefined | null, rateValue?: number | undefined | null, version?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<IvTick>
126
- /** Fetch the trade at a specific time of day across a date range for an option. */
624
+ /**
625
+ * Fetch the trade at a specific time of day across a date range for an option.
626
+ *
627
+ * - Returns the last trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) at a specified millisecond of the day.
628
+ * - Trade condition mappings can be found [here](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html).
629
+ * - Extended trade conditions are not reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) for options, so they can be ignored.
630
+ * - The ``time_of_day``parameter represents the 00:00:00.000 ET that the trade should be provided for.
631
+ *
632
+ * Defaults (upstream):
633
+ * - `strike`: `"*"`
634
+ * - `right`: `"both"`
635
+ */
127
636
  optionAtTimeTrade(symbol: string, expiration: string | Date, startDate: string | Date, endDate: string | Date, timeOfDay: string | Date, strike?: string | undefined | null, right?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, timeoutMs?: number | undefined | null): Array<TradeTick>
128
- /** Fetch the quote at a specific time of day across a date range for an option. */
637
+ /**
638
+ * Fetch the quote at a specific time of day across a date range for an option.
639
+ *
640
+ * - Returns the last NBBO quote reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) at a specified millisecond of the day.
641
+ * - The ``time_of_day``parameter represents the 00:00:00.000 ET that the quote should be provided for.
642
+ *
643
+ * Defaults (upstream):
644
+ * - `strike`: `"*"`
645
+ * - `right`: `"both"`
646
+ */
129
647
  optionAtTimeQuote(symbol: string, expiration: string | Date, startDate: string | Date, endDate: string | Date, timeOfDay: string | Date, strike?: string | undefined | null, right?: string | undefined | null, maxDte?: number | undefined | null, strikeRange?: number | undefined | null, timeoutMs?: number | undefined | null): Array<QuoteTick>
130
- /** List all available index symbols. */
648
+ /**
649
+ * List all available index symbols.
650
+ *
651
+ * A symbol can be defined as a unique identifier for a stock / underlying asset. Common terms also include: root, ticker, and underlying. This endpoint returns all traded symbols for options. This endpoint is updated overnight.
652
+ */
131
653
  indexListSymbols(timeoutMs?: number | undefined | null): Array<string>
132
- /** List available dates for an index symbol. */
654
+ /**
655
+ * List available dates for an index symbol.
656
+ *
657
+ * Lists all dates of data that are available for a index with a given request type and symbol. This endpoint is updated overnight.
658
+ */
133
659
  indexListDates(symbol: string, timeoutMs?: number | undefined | null): Array<string>
134
- /** Get the latest OHLC snapshot for one or more indices. */
660
+ /**
661
+ * Get the latest OHLC snapshot for one or more indices.
662
+ *
663
+ * - Retrieves the real-time current day OHLC.
664
+ * - [Exchanges](/Articles/Data-And-Requests/The-SIPs.html) typically generate a price report every second for popular indices like SPX.
665
+ */
135
666
  indexSnapshotOHLC(symbols: string | Array<string>, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<OhlcTick>
136
- /** Get the latest price snapshot for one or more indices. */
667
+ /**
668
+ * Get the latest price snapshot for one or more indices.
669
+ *
670
+ * - Retrieves a real-time last index price.
671
+ * - [Exchanges](/Articles/Data-And-Requests/The-SIPs.html) typically generate a price report every second for popular indices like SPX.
672
+ */
137
673
  indexSnapshotPrice(symbols: string | Array<string>, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<PriceTick>
138
- /** Get the latest market value snapshot for one or more indices. */
674
+ /**
675
+ * Get the latest market value snapshot for one or more indices.
676
+ *
677
+ * - Retrieves a real-time last index market value.
678
+ * - [Exchanges](/Articles/Data-And-Requests/The-SIPs.html) typically generate a price report every second for popular indices like SPX.
679
+ */
139
680
  indexSnapshotMarketValue(symbols: string | Array<string>, minTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<MarketValueTick>
140
- /** Fetch end-of-day index data for a date range. */
681
+ /**
682
+ * Fetch end-of-day index data for a date range.
683
+ *
684
+ * - Since [the indices feeds](/Articles/Data-And-Requests/The-SIPs.html) do not provide a national EOD report, Theta Data generates a national EOD report at 17:15 each day.
685
+ */
141
686
  indexHistoryEOD(symbol: string, startDate: string | Date, endDate: string | Date, timeoutMs?: number | undefined | null): Array<EodTick>
142
- /** Fetch intraday OHLC bars for an index. */
687
+ /**
688
+ * Fetch intraday OHLC bars for an index.
689
+ *
690
+ * - Aggregated OHLC bars that use [SIP rules](/Articles/Data-And-Requests/OHLC-EOD.html) for each bar.
691
+ * - Time timestamp of the bar represents the opening time of the bar. For a trade to be part of the bar: ``bar timestamp`` <= ``trade time`` < ``bar timestamp + interval``.
692
+ * - [Exchanges](/Articles/Data-And-Requests/The-SIPs.html) typically generate a price report every second for popular indices like SPX.
693
+ *
694
+ * Defaults (upstream):
695
+ * - `interval`: `"1s"`
696
+ * - `start_time`: `"09:30:00"`
697
+ * - `end_time`: `"16:00:00"`
698
+ */
143
699
  indexHistoryOHLC(symbol: string, startDate: string | Date, endDate: string | Date, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<OhlcTick>
144
- /** Fetch intraday price history for an index. */
700
+ /**
701
+ * Fetch intraday price history for an index.
702
+ *
703
+ * - Retrieves historical indices price reports. [Exchanges](/Articles/Data-And-Requests/The-SIPs.html) typically generate a price report every second for popular indices like SPX.
704
+ * - When the ``interval`` parameter is specified, the returned data represents the price at the exact time of each timestamp. If the timestamp in the response is 10:30:00, the price field represents the price at that exact time of the day.
705
+ * - A price update from the exchange is omitted if the price remained the same from the previous update.
706
+ * - Multi-day requests are limited to 1 month of data.
707
+ *
708
+ * Defaults (upstream):
709
+ * - `interval`: `"1s"`
710
+ * - `start_time`: `"09:30:00"`
711
+ * - `end_time`: `"16:00:00"`
712
+ */
145
713
  indexHistoryPrice(symbol: string, date: string | Date, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, startDate?: string | Date | undefined | null, endDate?: string | Date | undefined | null, timeoutMs?: number | undefined | null): Array<PriceTick>
146
- /** Fetch the index price at a specific time of day across a date range. */
714
+ /**
715
+ * Fetch the index price at a specific time of day across a date range.
716
+ *
717
+ * - Retrieves historical indices price reports. [Exchanges](/Articles/Data-And-Requests/The-SIPs.html) typically generate a price report every second for popular indices like SPX.
718
+ * - The ``time_of_day`` parameter represents the 00:00:00.000 ET that the price should be provided for.
719
+ */
147
720
  indexAtTimePrice(symbol: string, startDate: string | Date, endDate: string | Date, timeOfDay: string | Date, timeoutMs?: number | undefined | null): Array<PriceTick>
148
- /** Check whether the market is open today. */
721
+ /**
722
+ * Check whether the market is open today.
723
+ *
724
+ * - Retrieves current day equity market schedule
725
+ * - *On days when the market closes early at 1:00 PM ET; eligible options will trade until 1:15 PM.
726
+ * - **Some NYSE exchanges will continue late trading until 5:00 PM ET on early close days.
727
+ */
149
728
  calendarOpenToday(timeoutMs?: number | undefined | null): Array<CalendarDay>
150
- /** Get calendar information for a specific date. */
729
+ /**
730
+ * Get calendar information for a specific date.
731
+ *
732
+ * - Retrieves equity market schedule for a given date
733
+ * - Note: Holiday data is available 01/01/2012 through the end of the calendar year that immediately follows the current year
734
+ * - *On days when the market closes early at 1:00 PM ET; eligible options will trade until 1:15 PM.
735
+ * - **Some NYSE exchanges will continue late trading until 5:00 PM ET on early close days.
736
+ */
151
737
  calendarOnDate(date: string | Date, timeoutMs?: number | undefined | null): Array<CalendarDay>
152
- /** Get calendar information for an entire year. */
738
+ /**
739
+ * Get calendar information for an entire year.
740
+ *
741
+ * - Retrieves equity market holidays for a given year
742
+ * - Note: Holiday data is available 01/01/2012 through the end of the calendar year that immediately follows the current year
743
+ * - *On days when the market closes early at 1:00 PM ET; eligible options will trade until 1:15 PM.
744
+ * - **Some NYSE exchanges will continue late trading until 5:00 PM ET on early close days.
745
+ */
153
746
  calendarYear(year: string, timeoutMs?: number | undefined | null): Array<CalendarDay>
154
- /** Fetch end-of-day interest rate history. */
747
+ /**
748
+ * Fetch end-of-day interest rate history.
749
+ *
750
+ * - Returns the interest rate reported. Depending on the rate, reports can occur in the morning or the afternoon.
751
+ */
155
752
  interestRateHistoryEOD(symbol: string, startDate: string | Date, endDate: string | Date, timeoutMs?: number | undefined | null): Array<InterestRateTick>
156
- /** Fetch intraday OHLC bars across a date range. */
753
+ /**
754
+ * Fetch intraday OHLC bars across a date range.
755
+ *
756
+ * Defaults (upstream):
757
+ * - `interval`: `"1s"`
758
+ * - `start_time`: `"09:30:00"`
759
+ * - `end_time`: `"16:00:00"`
760
+ * - `venue`: `"nqb"`
761
+ */
157
762
  stockHistoryOHLCRange(symbol: string, startDate: string | Date, endDate: string | Date, interval?: string | undefined | null, startTime?: string | Date | undefined | null, endTime?: string | Date | undefined | null, venue?: string | undefined | null, timeoutMs?: number | undefined | null): Array<OhlcTick>
158
763
  /** Start FPSS streaming. Events are buffered; poll with next_event(). */
159
764
  startStreaming(): void
@@ -334,6 +939,24 @@ export interface InterestRateTick {
334
939
  date: number
335
940
  }
336
941
 
942
+ export declare const enum Interval {
943
+ Tick = 'tick',
944
+ Ms10 = '10ms',
945
+ Ms100 = '100ms',
946
+ Ms500 = '500ms',
947
+ S1 = '1s',
948
+ S5 = '5s',
949
+ S10 = '10s',
950
+ S15 = '15s',
951
+ S30 = '30s',
952
+ M1 = '1m',
953
+ M5 = '5m',
954
+ M10 = '10m',
955
+ M15 = '15m',
956
+ M30 = '30m',
957
+ H1 = '1h'
958
+ }
959
+
337
960
  /** Implied volatility tick. */
338
961
  export interface IvTick {
339
962
  msOfDay: number
@@ -457,6 +1080,34 @@ export interface QuoteTick {
457
1080
  right: string
458
1081
  }
459
1082
 
1083
+ export declare const enum RateType {
1084
+ Sofr = 'sofr',
1085
+ TreasuryM1 = 'treasury_m1',
1086
+ TreasuryM3 = 'treasury_m3',
1087
+ TreasuryM6 = 'treasury_m6',
1088
+ TreasuryY1 = 'treasury_y1',
1089
+ TreasuryY2 = 'treasury_y2',
1090
+ TreasuryY3 = 'treasury_y3',
1091
+ TreasuryY5 = 'treasury_y5',
1092
+ TreasuryY7 = 'treasury_y7',
1093
+ TreasuryY10 = 'treasury_y10',
1094
+ TreasuryY20 = 'treasury_y20',
1095
+ TreasuryY30 = 'treasury_y30'
1096
+ }
1097
+
1098
+ export declare const enum RequestType {
1099
+ Trade = 'trade',
1100
+ Quote = 'quote',
1101
+ Eod = 'eod',
1102
+ Ohlc = 'ohlc'
1103
+ }
1104
+
1105
+ export declare const enum Right {
1106
+ Call = 'call',
1107
+ Put = 'put',
1108
+ Both = 'both'
1109
+ }
1110
+
460
1111
  /** FPSS Trade tick. Mirrors `FpssData::Trade`. */
461
1112
  export interface Trade {
462
1113
  contractId: number
@@ -531,3 +1182,13 @@ export interface TradeTick {
531
1182
  strike: number
532
1183
  right: string
533
1184
  }
1185
+
1186
+ export declare const enum Venue {
1187
+ Nqb = 'nqb',
1188
+ UtpCta = 'utp_cta'
1189
+ }
1190
+
1191
+ export declare const enum Version {
1192
+ Latest = 'latest',
1193
+ V1 = '1'
1194
+ }
package/index.js CHANGED
@@ -77,8 +77,8 @@ function requireNative() {
77
77
  try {
78
78
  const binding = require('thetadatadx-android-arm64')
79
79
  const bindingPackageVersion = require('thetadatadx-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
80
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -93,8 +93,8 @@ function requireNative() {
93
93
  try {
94
94
  const binding = require('thetadatadx-android-arm-eabi')
95
95
  const bindingPackageVersion = require('thetadatadx-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
96
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -114,8 +114,8 @@ function requireNative() {
114
114
  try {
115
115
  const binding = require('thetadatadx-win32-x64-gnu')
116
116
  const bindingPackageVersion = require('thetadatadx-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -130,8 +130,8 @@ function requireNative() {
130
130
  try {
131
131
  const binding = require('thetadatadx-win32-x64-msvc')
132
132
  const bindingPackageVersion = require('thetadatadx-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
133
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('thetadatadx-win32-ia32-msvc')
149
149
  const bindingPackageVersion = require('thetadatadx-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -163,8 +163,8 @@ function requireNative() {
163
163
  try {
164
164
  const binding = require('thetadatadx-win32-arm64-msvc')
165
165
  const bindingPackageVersion = require('thetadatadx-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -182,8 +182,8 @@ function requireNative() {
182
182
  try {
183
183
  const binding = require('thetadatadx-darwin-universal')
184
184
  const bindingPackageVersion = require('thetadatadx-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -198,8 +198,8 @@ function requireNative() {
198
198
  try {
199
199
  const binding = require('thetadatadx-darwin-x64')
200
200
  const bindingPackageVersion = require('thetadatadx-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
201
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -214,8 +214,8 @@ function requireNative() {
214
214
  try {
215
215
  const binding = require('thetadatadx-darwin-arm64')
216
216
  const bindingPackageVersion = require('thetadatadx-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
217
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -234,8 +234,8 @@ function requireNative() {
234
234
  try {
235
235
  const binding = require('thetadatadx-freebsd-x64')
236
236
  const bindingPackageVersion = require('thetadatadx-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
237
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -250,8 +250,8 @@ function requireNative() {
250
250
  try {
251
251
  const binding = require('thetadatadx-freebsd-arm64')
252
252
  const bindingPackageVersion = require('thetadatadx-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -271,8 +271,8 @@ function requireNative() {
271
271
  try {
272
272
  const binding = require('thetadatadx-linux-x64-musl')
273
273
  const bindingPackageVersion = require('thetadatadx-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
274
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -287,8 +287,8 @@ function requireNative() {
287
287
  try {
288
288
  const binding = require('thetadatadx-linux-x64-gnu')
289
289
  const bindingPackageVersion = require('thetadatadx-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
290
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -305,8 +305,8 @@ function requireNative() {
305
305
  try {
306
306
  const binding = require('thetadatadx-linux-arm64-musl')
307
307
  const bindingPackageVersion = require('thetadatadx-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
308
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -321,8 +321,8 @@ function requireNative() {
321
321
  try {
322
322
  const binding = require('thetadatadx-linux-arm64-gnu')
323
323
  const bindingPackageVersion = require('thetadatadx-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
324
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -339,8 +339,8 @@ function requireNative() {
339
339
  try {
340
340
  const binding = require('thetadatadx-linux-arm-musleabihf')
341
341
  const bindingPackageVersion = require('thetadatadx-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
342
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -355,8 +355,8 @@ function requireNative() {
355
355
  try {
356
356
  const binding = require('thetadatadx-linux-arm-gnueabihf')
357
357
  const bindingPackageVersion = require('thetadatadx-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
358
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -373,8 +373,8 @@ function requireNative() {
373
373
  try {
374
374
  const binding = require('thetadatadx-linux-loong64-musl')
375
375
  const bindingPackageVersion = require('thetadatadx-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
376
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -389,8 +389,8 @@ function requireNative() {
389
389
  try {
390
390
  const binding = require('thetadatadx-linux-loong64-gnu')
391
391
  const bindingPackageVersion = require('thetadatadx-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
392
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -407,8 +407,8 @@ function requireNative() {
407
407
  try {
408
408
  const binding = require('thetadatadx-linux-riscv64-musl')
409
409
  const bindingPackageVersion = require('thetadatadx-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
410
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -423,8 +423,8 @@ function requireNative() {
423
423
  try {
424
424
  const binding = require('thetadatadx-linux-riscv64-gnu')
425
425
  const bindingPackageVersion = require('thetadatadx-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('thetadatadx-linux-ppc64-gnu')
442
442
  const bindingPackageVersion = require('thetadatadx-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('thetadatadx-linux-s390x-gnu')
458
458
  const bindingPackageVersion = require('thetadatadx-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -476,8 +476,8 @@ function requireNative() {
476
476
  try {
477
477
  const binding = require('thetadatadx-openharmony-arm64')
478
478
  const bindingPackageVersion = require('thetadatadx-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
479
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -492,8 +492,8 @@ function requireNative() {
492
492
  try {
493
493
  const binding = require('thetadatadx-openharmony-x64')
494
494
  const bindingPackageVersion = require('thetadatadx-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
495
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -508,8 +508,8 @@ function requireNative() {
508
508
  try {
509
509
  const binding = require('thetadatadx-openharmony-arm')
510
510
  const bindingPackageVersion = require('thetadatadx-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '8.0.10' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
- throw new Error(`Native binding package version mismatch, expected 8.0.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
511
+ if (bindingPackageVersion !== '8.0.11' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 8.0.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
@@ -577,3 +577,9 @@ if (!nativeBinding) {
577
577
 
578
578
  module.exports = nativeBinding
579
579
  module.exports.ThetaDataDx = nativeBinding.ThetaDataDx
580
+ module.exports.Interval = nativeBinding.Interval
581
+ module.exports.RateType = nativeBinding.RateType
582
+ module.exports.RequestType = nativeBinding.RequestType
583
+ module.exports.Right = nativeBinding.Right
584
+ module.exports.Venue = nativeBinding.Venue
585
+ module.exports.Version = nativeBinding.Version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thetadatadx",
3
- "version": "8.0.10",
3
+ "version": "8.0.11",
4
4
  "description": "Native ThetaData SDK for Node.js — powered by Rust via napi-rs",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -30,9 +30,9 @@
30
30
  "@napi-rs/cli": "^3.6.2"
31
31
  },
32
32
  "optionalDependencies": {
33
- "thetadatadx-linux-x64-gnu": "8.0.10",
34
- "thetadatadx-darwin-arm64": "8.0.10",
35
- "thetadatadx-win32-x64-msvc": "8.0.10"
33
+ "thetadatadx-linux-x64-gnu": "8.0.11",
34
+ "thetadatadx-darwin-arm64": "8.0.11",
35
+ "thetadatadx-win32-x64-msvc": "8.0.11"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">= 20"