roicai 0.1.0 → 0.2.0

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 (59) hide show
  1. package/README.md +385 -33
  2. package/dist/generated/calendar/earnings/client.d.ts +16 -0
  3. package/dist/generated/calendar/earnings/client.js +1 -1
  4. package/dist/generated/calendar/earnings/client.js.map +1 -1
  5. package/dist/generated/companies/employees/client.d.ts +16 -0
  6. package/dist/generated/companies/employees/client.js +1 -1
  7. package/dist/generated/companies/employees/client.js.map +1 -1
  8. package/dist/generated/earningsCalls/client.d.ts +16 -0
  9. package/dist/generated/earningsCalls/client.js +1 -1
  10. package/dist/generated/earningsCalls/client.js.map +1 -1
  11. package/dist/generated/forexPrices/client.d.ts +16 -0
  12. package/dist/generated/forexPrices/client.js +1 -1
  13. package/dist/generated/forexPrices/client.js.map +1 -1
  14. package/dist/generated/fundamentals/balanceSheets/client.d.ts +32 -0
  15. package/dist/generated/fundamentals/balanceSheets/client.js +1 -1
  16. package/dist/generated/fundamentals/balanceSheets/client.js.map +1 -1
  17. package/dist/generated/fundamentals/cashFlowStatements/client.d.ts +32 -0
  18. package/dist/generated/fundamentals/cashFlowStatements/client.js +1 -1
  19. package/dist/generated/fundamentals/cashFlowStatements/client.js.map +1 -1
  20. package/dist/generated/fundamentals/enterpriseValues/client.d.ts +32 -0
  21. package/dist/generated/fundamentals/enterpriseValues/client.js +1 -1
  22. package/dist/generated/fundamentals/enterpriseValues/client.js.map +1 -1
  23. package/dist/generated/fundamentals/incomeStatements/client.d.ts +32 -0
  24. package/dist/generated/fundamentals/incomeStatements/client.js +1 -1
  25. package/dist/generated/fundamentals/incomeStatements/client.js.map +1 -1
  26. package/dist/generated/fundamentals/multiples/client.d.ts +32 -0
  27. package/dist/generated/fundamentals/multiples/client.js +1 -1
  28. package/dist/generated/fundamentals/multiples/client.js.map +1 -1
  29. package/dist/generated/fundamentals/perShareMetrics/client.d.ts +32 -0
  30. package/dist/generated/fundamentals/perShareMetrics/client.js +1 -1
  31. package/dist/generated/fundamentals/perShareMetrics/client.js.map +1 -1
  32. package/dist/generated/fundamentals/ratios/credit/client.d.ts +32 -0
  33. package/dist/generated/fundamentals/ratios/credit/client.js +1 -1
  34. package/dist/generated/fundamentals/ratios/credit/client.js.map +1 -1
  35. package/dist/generated/fundamentals/ratios/liquidity/client.d.ts +32 -0
  36. package/dist/generated/fundamentals/ratios/liquidity/client.js +1 -1
  37. package/dist/generated/fundamentals/ratios/liquidity/client.js.map +1 -1
  38. package/dist/generated/fundamentals/ratios/profitability/client.d.ts +32 -0
  39. package/dist/generated/fundamentals/ratios/profitability/client.js +1 -1
  40. package/dist/generated/fundamentals/ratios/profitability/client.js.map +1 -1
  41. package/dist/generated/fundamentals/ratios/workingCapital/client.d.ts +32 -0
  42. package/dist/generated/fundamentals/ratios/workingCapital/client.js +1 -1
  43. package/dist/generated/fundamentals/ratios/workingCapital/client.js.map +1 -1
  44. package/dist/generated/fundamentals/ratios/yieldAnalysis/client.d.ts +32 -0
  45. package/dist/generated/fundamentals/ratios/yieldAnalysis/client.js +1 -1
  46. package/dist/generated/fundamentals/ratios/yieldAnalysis/client.js.map +1 -1
  47. package/dist/generated/stockPrices/client.d.ts +16 -0
  48. package/dist/generated/stockPrices/client.js +1 -1
  49. package/dist/generated/stockPrices/client.js.map +1 -1
  50. package/dist/generated/stockSplits/client.d.ts +16 -0
  51. package/dist/generated/stockSplits/client.js +1 -1
  52. package/dist/generated/stockSplits/client.js.map +1 -1
  53. package/dist/index.d.ts +12 -2
  54. package/dist/index.js +6 -2
  55. package/dist/index.js.map +1 -1
  56. package/dist/pagination.d.ts +42 -0
  57. package/dist/pagination.js +92 -0
  58. package/dist/pagination.js.map +1 -0
  59. package/package.json +16 -9
package/README.md CHANGED
@@ -1,17 +1,30 @@
1
- # ROIC.ai Node.js SDK
1
+ # ROIC.ai Node.js Library
2
2
 
3
- TypeScript and JavaScript client for the [ROIC.ai](https://roic.ai) financial data API: tickers, prices, fundamentals, ratios, earnings calls, company events and bulk downloads.
3
+ [![Version](https://img.shields.io/npm/v/roicai.svg)](https://www.npmjs.com/package/roicai)
4
+ [![Build Status](https://github.com/roicai/roicai-node/actions/workflows/ci.yml/badge.svg)](https://github.com/roicai/roicai-node/actions/workflows/ci.yml)
4
5
 
5
- ## Install
6
+ The ROIC.ai Node.js library is the official TypeScript and JavaScript client for the [ROIC.ai](https://roic.ai) financial data API and stock API. Use it to get fundamentals for public companies, such as income statements, balance sheets, cash flow statements, financial ratios and valuation multiples, and earnings call transcripts. It also covers historical and latest stock prices, SEC filings and other company documents, the earnings calendar, company profiles and forex rates.
7
+
8
+ ## Documentation
9
+
10
+ See the [ROIC.ai API reference](https://api.roic.ai/v3.0.0/openapi) for every endpoint, parameter and field, and the [API guides](https://www.roic.ai/api) for authentication, plans and response formats.
11
+
12
+ ## Requirements
13
+
14
+ Node.js 20 or later. The library also runs in Bun.
15
+
16
+ ## Installation
17
+
18
+ Install the package with:
6
19
 
7
20
  ```sh
8
21
  npm install roicai
9
22
  ```
10
23
 
11
- Requires Node.js 20 or later. It also runs in Bun.
12
-
13
24
  ## Usage
14
25
 
26
+ The library needs your ROIC.ai API key, which you can find on the [authentication page](https://www.roic.ai/api/docs/authentication) once you sign in. Create a client with it:
27
+
15
28
  ```ts
16
29
  import { createClient } from 'roicai';
17
30
 
@@ -28,69 +41,408 @@ const statements = await roicai.fundamentals.incomeStatements.list({
28
41
  const latest = await roicai.stockPrices.latest.retrieve({ identifier: 'NASDAQ:AAPL' });
29
42
  ```
30
43
 
44
+ Or using CommonJS, on Node.js 20.19+ and 22.12+:
45
+
46
+ ```js
47
+ const { createClient } = require('roicai');
48
+
49
+ const roicai = createClient({ token: process.env.ROICAI_API_KEY });
50
+
51
+ roicai.tickers
52
+ .retrieve({ identifier: 'NASDAQ:AAPL' })
53
+ .then((ticker) => console.log(ticker.name))
54
+ .catch((error) => console.error(error));
55
+ ```
56
+
57
+ The package is ESM-only. On older Node.js versions, load it from CommonJS with `await import('roicai')`.
58
+
31
59
  Methods are grouped the way the API's URLs are: `/v3.0.0/fundamental/ratios/credit/{identifier}` is `roicai.fundamentals.ratios.credit.list(...)`. Each group has `list`, `retrieve` or `search`.
32
60
 
33
- Identifiers are an exchange and symbol separated by a colon (`NASDAQ:AAPL`), a ticker ID (`tkr_...`) or a FIGI.
61
+ Identify a company by its exchange and symbol separated by a colon (`NASDAQ:AAPL`), its ticker ID (`tkr_...`) or its FIGI.
62
+
63
+ ### Usage with TypeScript
64
+
65
+ The package includes its types. Every request field and response field is typed, with enums as string literal unions:
66
+
67
+ ```ts
68
+ import { createClient, type Client } from 'roicai';
69
+
70
+ type Ticker = Awaited<ReturnType<Client['tickers']['retrieve']>>;
71
+
72
+ const client: Client = createClient({ token: process.env.ROICAI_API_KEY! });
73
+ const msft: Ticker = await client.tickers.retrieve({ identifier: 'NASDAQ:MSFT' });
74
+ console.log(msft.status); // "listed" | "delisted" | null
75
+ ```
34
76
 
35
77
  ### Fields and dates
36
78
 
37
79
  Fields are camelCase (`periodEndDate`), where the API's JSON is snake_case (`period_end_date`). Dates and timestamps are ISO 8601 strings; pass them to `new Date()` when you need a `Date`.
38
80
 
39
- ### Errors
81
+ ## Configuration
82
+
83
+ ### Initialize with config object
84
+
85
+ Pass options to `createClient`:
86
+
87
+ ```ts
88
+ const configured = createClient({
89
+ token: process.env.ROICAI_API_KEY!,
90
+ headers: { 'user-agent': 'my-app/1.0' },
91
+ });
92
+ ```
93
+
94
+ | Option | Default | Description |
95
+ |---|---|---|
96
+ | `token` | required | Your API key, sent as `Authorization: Bearer <token>`. |
97
+ | `baseUrl` | `https://api.roic.ai` | URL that requests are made to. |
98
+ | `fetch` | global `fetch` | [Function that sends requests.](#using-a-custom-fetch) |
99
+ | `headers` | | Headers sent with every request. |
100
+ | `query` | | A `URLSearchParams` sent with every request. |
101
+
102
+ ### Request options
103
+
104
+ Every method takes `RequestOptions` as its last argument:
105
+
106
+ | Option | Description |
107
+ |---|---|
108
+ | `signal` | An `AbortSignal` that cancels the request. |
109
+ | `headers` | Headers for this request. They replace the client's headers of the same name. |
110
+ | `query` | Query parameters appended to this request. |
111
+ | `onResponse` | Called with the `Response` before its body is read. |
112
+
113
+ ### Configuring timeouts
114
+
115
+ The library sets no timeout. Pass a signal to limit one request:
116
+
117
+ ```ts
118
+ const ticker = await roicai.tickers.retrieve(
119
+ { identifier: 'NASDAQ:AAPL' },
120
+ { signal: AbortSignal.timeout(5_000) },
121
+ );
122
+ ```
123
+
124
+ A request that times out rejects with the signal's reason, a `TimeoutError`. To set a timeout for every request, use a [custom `fetch`](#using-a-custom-fetch).
125
+
126
+ ### Examining responses
127
+
128
+ Use `onResponse` to read the status and headers, such as the request ID to quote when you contact support:
129
+
130
+ ```ts
131
+ await roicai.tickers.retrieve(
132
+ { identifier: 'NASDAQ:AAPL' },
133
+ { onResponse: (response) => console.log(response.status, response.headers.get('request-id')) },
134
+ );
135
+ ```
136
+
137
+ ### Using a custom fetch
138
+
139
+ Pass your own `fetch` to log, time out, retry or proxy requests. The library doesn't retry failed requests by itself:
140
+
141
+ ```ts
142
+ const logged = createClient({
143
+ token: process.env.ROICAI_API_KEY!,
144
+ fetch: async (input, init) => {
145
+ const response = await fetch(input, { ...init, signal: init?.signal ?? AbortSignal.timeout(10_000) });
146
+ console.log(init?.method, String(input), response.status);
147
+ return response;
148
+ },
149
+ });
150
+
151
+ await logged.tickers.retrieve({ identifier: 'NASDAQ:MSFT' });
152
+ // GET https://api.roic.ai/v3.0.0/tickers/NASDAQ%3AMSFT 200
153
+ ```
154
+
155
+ ### Date and fiscal year ranges
156
+
157
+ Lists of dated rows take `dateGte`, `dateGt`, `dateLte` and `dateLt`, with dates as `YYYY-MM-DD`:
158
+
159
+ ```ts
160
+ const january = await roicai.stockPrices.list({
161
+ identifier: 'NASDAQ:AAPL',
162
+ dateGte: '2025-01-01',
163
+ dateLte: '2025-01-31',
164
+ order: 'asc',
165
+ });
166
+ ```
167
+
168
+ They work on stock prices, stock splits, forex prices, earnings calls, the earnings calendar and every fundamentals list. Fundamentals and employee counts also take `fiscalYearGte`, `fiscalYearGt`, `fiscalYearLte` and `fiscalYearLt`:
169
+
170
+ ```ts
171
+ const since2020 = await roicai.fundamentals.incomeStatements.list({
172
+ identifier: 'NASDAQ:AAPL',
173
+ periodType: 'annual',
174
+ fiscalYearGte: 2020,
175
+ });
176
+ ```
177
+
178
+ ### Auto-pagination
179
+
180
+ List methods return one page of up to `limit` rows. You can also have the library fetch the next pages for you as you go. It sends the same request again with the page token from `nextPageUrl`, so every page uses your filters, and it stops after the last page. There are a few ways to do this.
181
+
182
+ #### Async iterators (`for await`)
183
+
184
+ ```ts
185
+ for await (const call of roicai.earningsCalls.list({ identifier: 'NASDAQ:AAPL', limit: 100 })) {
186
+ console.log(call.fiscalYear, call.fiscalQuarter, call.date);
187
+ }
188
+ ```
189
+
190
+ Use `break` to stop early. The library doesn't request any page after the one you stopped in.
191
+
192
+ #### `autoPagingEach`
193
+
194
+ ```ts
195
+ await roicai.stockPrices.list({ identifier: 'NASDAQ:AAPL', dateGte: '2020-01-01' }).autoPagingEach((price) => {
196
+ console.log(price.date, price.close);
197
+ });
198
+ ```
199
+
200
+ The callback can return a promise, which the library waits for before the next item. Return `false` to stop.
201
+
202
+ #### `autoPagingToArray`
203
+
204
+ This collects the items into an array. It's meant for lists you expect to be small, so you must pass a `limit` of at most 10,000; for more, use one of the methods above:
205
+
206
+ ```ts
207
+ const tickers = await roicai.tickers.list({ exchange: 'NASDAQ', limit: 500 }).autoPagingToArray({ limit: 2000 });
208
+ ```
209
+
210
+ #### Fetching pages yourself
211
+
212
+ Awaiting a list gives its first page. To fetch the next page yourself, send the same request with the `page` token from `nextPageUrl`, which is `null` on the last page. A token only works with the filters and `limit` it was issued for.
213
+
214
+ ## Handling errors
40
215
 
41
216
  A request that fails throws an `ApiError` with the HTTP `status` and the API's error in `details`:
42
217
 
43
218
  ```ts
44
- import { ApiError } from 'roicai';
219
+ import { ApiError, type V3Error } from 'roicai';
45
220
 
46
221
  try {
47
222
  await roicai.tickers.retrieve({ identifier: 'NASDAQ:NOPE' });
48
223
  } catch (err) {
49
224
  if (err instanceof ApiError && err.status === 404) {
50
225
  // no such ticker
226
+ const { error } = err.details as V3Error;
227
+ console.log(error.code, error.message, error.requestId); // resource_missing ...
51
228
  }
52
229
  }
53
230
  ```
54
231
 
55
- ### Options
232
+ The API returns `401` for a missing or invalid key, `402` when your plan doesn't include the data, `404` for an unknown identifier and `429` when you exceed your rate limit.
56
233
 
57
- | Option | Default | |
58
- |---|---|---|
59
- | `token` | required | Your API key, sent as `Authorization: Bearer <token>`. |
60
- | `baseUrl` | `https://api.roic.ai` | |
61
- | `fetch` | global `fetch` | |
62
- | `headers` | | Sent with every request. |
234
+ ## Examples
63
235
 
64
- Each method also takes `RequestOptions` as its last argument, such as an `AbortSignal`.
236
+ The examples use the `roicai` client from [Usage](#usage).
65
237
 
66
- ## Development
238
+ ### Tickers
67
239
 
68
- The client in `src/generated` is generated from the API's OpenAPI document with [forge](https://github.com/cloudflare/forge). Don't edit it by hand: CI regenerates it from `openapi.json` and fails on any difference.
240
+ Retrieve one ticker, search by symbol or company name, or list tickers with filters:
69
241
 
70
- ```sh
71
- npm ci
72
- npm run build
73
- npm test # set ROICAI_API_KEY to also run the live tests
242
+ ```ts
243
+ const apple = await roicai.tickers.retrieve({ identifier: 'NASDAQ:AAPL' });
244
+ console.log(apple.name, apple.isin, apple.figi);
245
+
246
+ const bySymbol = await roicai.tickers.search({ query: 'AAPL', limit: 5 });
247
+ const byName = await roicai.tickers.search({ query: 'apple', searchBy: 'name', limit: 5 });
248
+ const byIsin = await roicai.tickers.search({ query: 'US0378331005', searchBy: 'isin' });
249
+ console.log(byName.data.map((t) => t.symbol));
250
+
251
+ const nasdaq = await roicai.tickers.list({
252
+ exchange: 'NASDAQ',
253
+ type: 'stock',
254
+ status: 'listed',
255
+ limit: 100,
256
+ });
257
+ const japan = await roicai.tickers.list({ listingCountryCode: 'JP', isPrimary: true });
74
258
  ```
75
259
 
76
- To regenerate, install jq and forge at the pinned commit, then run the script:
260
+ `searchBy` also matches `cik`, `cusip`, `figi` and the other ticker fields exactly.
77
261
 
78
- ```sh
79
- cargo install --git https://github.com/cloudflare/forge --rev "$(cat .forge-version)" forge
80
- npm run generate # from https://api.roic.ai/openapi.json
81
- npm run generate -- ./spec.json # from another document
262
+ ### Company profile
263
+
264
+ ```ts
265
+ const profile = await roicai.companies.profiles.retrieve({ identifier: 'NASDAQ:AAPL' });
266
+ console.log(profile.name, profile.sector, profile.industry, profile.ceo);
267
+ console.log(profile.earningsSchedule.nextReleaseDate);
268
+ ```
269
+
270
+ ### Stock prices
271
+
272
+ Historical daily prices come newest first. Prices are unadjusted unless you set `adjustment` to `splits` or `total_return`:
273
+
274
+ ```ts
275
+ const prices = await roicai.stockPrices.list({ identifier: 'NASDAQ:AAPL', limit: 30 });
276
+ for (const day of prices.data) {
277
+ console.log(day.date, day.open, day.high, day.low, day.close, day.volume);
278
+ }
279
+ console.log(prices.currency); // "USD"
280
+
281
+ const splitAdjusted = await roicai.stockPrices.list({
282
+ identifier: 'NASDAQ:AAPL',
283
+ date: '2020-08-28',
284
+ adjustment: 'splits',
285
+ });
286
+
287
+ const latest = await roicai.stockPrices.latest.retrieve({ identifier: 'NASDAQ:AAPL' });
288
+ console.log(latest.date, latest.close);
289
+ ```
290
+
291
+ For a date range, see [Date and fiscal year ranges](#date-and-fiscal-year-ranges).
292
+
293
+ ### Financial statements
294
+
295
+ Income statements, balance sheets and cash flow statements take the same parameters. Set `periodType` to `annual`, `quarterly` or `ttm`, and `periodLabel` to one fiscal period (`FY`, `Q1` to `Q4`):
296
+
297
+ ```ts
298
+ const annual = await roicai.fundamentals.incomeStatements.list({
299
+ identifier: 'NASDAQ:AAPL',
300
+ periodType: 'annual',
301
+ limit: 5,
302
+ });
303
+ for (const year of annual.data) {
304
+ console.log(year.fiscalYear, year.isSalesRevenueTurnover, year.isNetIncome, year.dilutedEps);
305
+ }
306
+
307
+ const quarters = await roicai.fundamentals.balanceSheets.list({
308
+ identifier: 'NASDAQ:AAPL',
309
+ periodType: 'quarterly',
310
+ limit: 4,
311
+ });
312
+ console.log(quarters.data.map((q) => [q.fiscalYear, q.periodLabel, q.bsTotAsset, q.bsTotLiab]));
313
+
314
+ const fourthQuarters = await roicai.fundamentals.cashFlowStatements.list({
315
+ identifier: 'NASDAQ:AAPL',
316
+ periodType: 'quarterly',
317
+ periodLabel: 'Q4',
318
+ limit: 4,
319
+ });
320
+ console.log(fourthQuarters.data.map((q) => [q.fiscalYear, q.cfCashFromOper, q.cfFreeCashFlow]));
321
+ ```
322
+
323
+ Rows come newest first. Amounts are in `currency`, and line items use short names: `isSalesRevenueTurnover` is revenue, `bsTotAsset` is total assets and `cfCapExpenditures` is capital expenditures. `roicai.fundamentals.perShareMetrics` and `roicai.fundamentals.enterpriseValues` work the same way.
324
+
325
+ ### Ratios and multiples
326
+
327
+ Ratios are grouped into `profitability`, `credit`, `liquidity`, `workingCapital` and `yieldAnalysis`. Margins and returns are percentages (`46.9` is 46.9%):
328
+
329
+ ```ts
330
+ const profitability = await roicai.fundamentals.ratios.profitability.list({
331
+ identifier: 'NASDAQ:AAPL',
332
+ periodType: 'annual',
333
+ limit: 5,
334
+ });
335
+ for (const year of profitability.data) {
336
+ console.log(year.fiscalYear, year.grossMargin, year.operMargin, year.returnOnInvCapital);
337
+ }
338
+
339
+ const credit = await roicai.fundamentals.ratios.credit.list({ identifier: 'NASDAQ:AAPL', limit: 1 });
340
+ console.log(credit.data[0]?.netDebtToEbitda);
341
+
342
+ const multiples = await roicai.fundamentals.multiples.list({
343
+ identifier: 'NASDAQ:AAPL',
344
+ periodType: 'quarterly',
345
+ limit: 1,
346
+ });
347
+ const [last] = multiples.data;
348
+ console.log(last?.peRatio, last?.evToTtmEbitda, last?.prToBookRatio, last?.prToFreeCashFlow);
349
+ ```
350
+
351
+ ### Earnings call transcripts
352
+
353
+ List a company's earnings calls, then retrieve a transcript by fiscal year and quarter. Free plans can access each company's latest two calls:
354
+
355
+ ```ts
356
+ const calls = await roicai.earningsCalls.list({ identifier: 'NASDAQ:AAPL', limit: 8 });
357
+ console.log(calls.data.map((c) => [c.fiscalYear, c.fiscalQuarter, c.date]));
358
+
359
+ const call = await roicai.earningsCalls.retrieve({
360
+ identifier: 'NASDAQ:AAPL',
361
+ fiscalYear: 2026,
362
+ fiscalQuarter: 3,
363
+ });
364
+ if (Array.isArray(call.transcript)) {
365
+ for (const turn of call.transcript) {
366
+ console.log(`${turn.speaker}: ${turn.text}`);
367
+ }
368
+ }
369
+
370
+ const text = await roicai.earningsCalls.retrieve({
371
+ identifier: 'NASDAQ:AAPL',
372
+ fiscalYear: 2026,
373
+ fiscalQuarter: 3,
374
+ format: 'text',
375
+ });
376
+ console.log(typeof text.transcript); // "string"
377
+ ```
378
+
379
+ By default `transcript` is an array of `{ speaker, text }` turns. With `format: 'text'` it is one string.
380
+
381
+ Leave out `identifier` to list calls from every company, and filter by `date`, `fiscalYear` or `fiscalQuarter`:
382
+
383
+ ```ts
384
+ const sameDay = await roicai.earningsCalls.list({ date: '2026-07-30' });
385
+ ```
386
+
387
+ ### Earnings calendar
388
+
389
+ Each event has the release date and session, and the EPS and revenue estimates and actuals:
390
+
391
+ ```ts
392
+ const schedule = await roicai.calendar.earnings.list({ identifier: 'NASDAQ:AAPL', limit: 4 });
393
+ for (const event of schedule.data) {
394
+ console.log(event.fiscalPeriod, event.releaseDate, event.releaseSession, event.epsEstimate, event.epsActual);
395
+ }
396
+
397
+ const oneDay = await roicai.calendar.earnings.list({ date: '2026-10-28' });
398
+ ```
399
+
400
+ ### SEC filings and company documents
401
+
402
+ A company event is one reporting period, with the IDs of its transcripts, call audio, slides and filings, such as 10-Q and 8-K reports. Retrieve a document by ID to get a signed download URL, which needs no API key:
403
+
404
+ ```ts
405
+ const events = await roicai.companyEvents.list({ identifier: 'NASDAQ:AAPL', limit: 4 });
406
+ const [event] = events.data;
407
+ console.log(event?.fiscalYear, event?.fiscalQuarter, event?.releaseDate);
408
+
409
+ const filing = event?.filings.find((f) => f.form === '10-Q');
410
+ if (filing) {
411
+ const download = await roicai.documents.filings.retrieve({ id: filing.id });
412
+ console.log(download.filename, download.url, download.expiresAt);
413
+ }
414
+
415
+ const withSlides = await roicai.companyEvents.list({ identifier: 'NASDAQ:AAPL', content: 'slides' });
416
+ ```
417
+
418
+ `roicai.documents.slides`, `audio`, `transcripts.edited` and `transcripts.raw` retrieve the other kinds by ID.
419
+
420
+ ### Forex
421
+
422
+ Identify a currency pair as `FX:` followed by the base and quote currencies:
423
+
424
+ ```ts
425
+ const pairs = await roicai.forexPairs.list({ baseCurrency: 'EUR', quoteCurrency: 'USD' });
426
+ const yen = await roicai.forexPairs.list({ search: 'yen' });
427
+
428
+ const eurusd = await roicai.forexPrices.list({ identifier: 'FX:EURUSD', limit: 30 });
429
+ console.log(eurusd.data.map((day) => [day.date, day.close]));
430
+
431
+ const rate = await roicai.forexPrices.latest.retrieve({ identifier: 'FX:EURUSD' });
432
+ console.log(rate.date, rate.close);
433
+
434
+ const toUsd = await roicai.forexPrices.latest.list({ quoteCurrency: 'USD' });
82
435
  ```
83
436
 
84
- The **Codegen** workflow does this after every API deploy and opens a pull request when the SDK changed. Review the `openapi.json` diff in that pull request: a removed or renamed method, group or field is a breaking change (see [Releasing](#releasing)).
437
+ ## Support
85
438
 
86
- `src/index.ts` is the only hand-written source. It sets the default `baseUrl` and re-exports the generated client.
439
+ Report bugs and request features in [GitHub issues](https://github.com/roicai/roicai-node/issues). For questions about your account, plan or the data, contact ROIC.ai through [roic.ai](https://roic.ai).
87
440
 
88
- ## Releasing
441
+ The library follows semver. While it is `0.x`, a minor version can include breaking changes, so pin the minor version you use.
89
442
 
90
- 1. Open a pull request that sets `version` in `package.json` (and `package-lock.json`, with `npm version <version> --no-git-tag-version`). The SDK follows semver: while it is `0.x`, a breaking change needs a new minor version.
91
- 2. After it merges, publish a GitHub release whose tag is `v` plus that version, such as `v0.1.0`. Mark it as a pre-release to publish under the `next` tag instead of `latest`.
443
+ ## Contributing
92
444
 
93
- The **Release** workflow then builds, tests and publishes to npm with a provenance attestation. npm trusts that workflow as the package's publisher, so there is no npm token to rotate.
445
+ See [CONTRIBUTING.md](CONTRIBUTING.md) to build and test the library, regenerate it from the API, and release it.
94
446
 
95
447
  ## License
96
448
 
@@ -34,6 +34,22 @@ export interface ListRequest {
34
34
  * Return events whose release date is exactly this date.
35
35
  */
36
36
  date?: string;
37
+ /**
38
+ * Return events whose release date is on or after this date.
39
+ */
40
+ dateGte?: string;
41
+ /**
42
+ * Return events whose release date is strictly after this date.
43
+ */
44
+ dateGt?: string;
45
+ /**
46
+ * Return events whose release date is on or before this date.
47
+ */
48
+ dateLte?: string;
49
+ /**
50
+ * Return events whose release date is strictly before this date.
51
+ */
52
+ dateLt?: string;
37
53
  order?: "asc" | "desc";
38
54
  /**
39
55
  * Maximum number of resources to return. Defaults to 100.
@@ -14,7 +14,7 @@ export function bind(transport) {
14
14
  const ListOperation = {
15
15
  method: "GET",
16
16
  route: "/v3.0.0/calendar/earnings",
17
- query: { apikey: "apikey", identifier: "identifier", date: "date", order: "order", limit: "limit", page: "page" },
17
+ query: { apikey: "apikey", identifier: "identifier", date: "date", dateGte: "date.gte", dateGt: "date.gt", dateLte: "date.lte", dateLt: "date.lt", order: "order", limit: "limit", page: "page" },
18
18
  response: V3EarningsEventListCodec,
19
19
  errors: { "400": V3ErrorCodec, "401": V3ErrorCodec, "402": V3ErrorCodec, "404": V3ErrorCodec, "429": V3ErrorCodec, "500": V3ErrorCodec, "503": V3ErrorCodec },
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/generated/calendar/earnings/client.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,oBAAoB;AAEpB,OAAO,EAIL,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CA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AAM,UAAU,IAAI,CAAC,SAAoB;IACvC,OAAO;QACL,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC;KAC5E,CAAC;AACJ,CAAC;AAgDD,MAAM,aAAa,GAAc;IAC/B,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,2BAA2B;IAClC,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE;IACjM,QAAQ,EAAE,wBAAwB;IAClC,MAAM,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;CAC9J,CAAC"}
@@ -36,6 +36,22 @@ export interface ListRequest {
36
36
  * Return only counts for exactly this fiscal year.
37
37
  */
38
38
  fiscalYear?: string | number;
39
+ /**
40
+ * Return counts from this fiscal year onward.
41
+ */
42
+ fiscalYearGte?: string | number;
43
+ /**
44
+ * Return counts after this fiscal year.
45
+ */
46
+ fiscalYearGt?: string | number;
47
+ /**
48
+ * Return counts through this fiscal year.
49
+ */
50
+ fiscalYearLte?: string | number;
51
+ /**
52
+ * Return counts before this fiscal year.
53
+ */
54
+ fiscalYearLt?: string | number;
39
55
  order?: "asc" | "desc";
40
56
  /**
41
57
  * Maximum number of resources to return. Defaults to 100.
@@ -14,7 +14,7 @@ export function bind(transport) {
14
14
  const ListOperation = {
15
15
  method: "GET",
16
16
  route: "/v3.0.0/company/employees",
17
- query: { apikey: "apikey", identifier: "identifier", fiscalYear: "fiscal_year", order: "order", limit: "limit", page: "page" },
17
+ query: { apikey: "apikey", identifier: "identifier", fiscalYear: "fiscal_year", fiscalYearGte: "fiscal_year.gte", fiscalYearGt: "fiscal_year.gt", fiscalYearLte: "fiscal_year.lte", fiscalYearLt: "fiscal_year.lt", order: "order", limit: "limit", page: "page" },
18
18
  response: V3EmployeeCountListCodec,
19
19
  errors: { "400": V3ErrorCodec, "401": V3ErrorCodec, "402": V3ErrorCodec, "404": V3ErrorCodec, "429": V3ErrorCodec, "500": V3ErrorCodec, "503": V3ErrorCodec },
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/generated/companies/employees/client.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,oBAAoB;AAEpB,OAAO,EAIL,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAEL,wBAAwB,GACzB,MAAM,aAAa,CAAC;AAoBrB,MAAM,UAAU,YAAY,CAAC,OAAsB;IACjD,OAAO,IAAI,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,SAAoB;IACvC,OAAO;QACL,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC;KAC5E,CAAC;AACJ,CAAC;AAkCD,MAAM,aAAa,GAAc;IAC/B,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,2BAA2B;IAClC,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,E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,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;CAC9J,CAAC"}
@@ -60,6 +60,22 @@ export interface ListRequest {
60
60
  * Return calls that occurred on this UTC calendar date.
61
61
  */
62
62
  date?: string;
63
+ /**
64
+ * Return calls on or after this UTC calendar date.
65
+ */
66
+ dateGte?: string;
67
+ /**
68
+ * Return calls after this UTC calendar date.
69
+ */
70
+ dateGt?: string;
71
+ /**
72
+ * Return calls on or before this UTC calendar date.
73
+ */
74
+ dateLte?: string;
75
+ /**
76
+ * Return calls before this UTC calendar date.
77
+ */
78
+ dateLt?: string;
63
79
  order?: "asc" | "desc";
64
80
  /**
65
81
  * Maximum number of resources to return. Defaults to 50.
@@ -20,7 +20,7 @@ export function bind(transport) {
20
20
  const ListOperation = {
21
21
  method: "GET",
22
22
  route: "/v3.0.0/earnings-calls",
23
- query: { apikey: "apikey", identifier: "identifier", fiscalYear: "fiscal_year", fiscalQuarter: "fiscal_quarter", date: "date", order: "order", limit: "limit", page: "page" },
23
+ query: { apikey: "apikey", identifier: "identifier", fiscalYear: "fiscal_year", fiscalQuarter: "fiscal_quarter", date: "date", dateGte: "date.gte", dateGt: "date.gt", dateLte: "date.lte", dateLt: "date.lt", order: "order", limit: "limit", page: "page" },
24
24
  response: V3EarningsCallListCodec,
25
25
  errors: { "400": V3ErrorCodec, "401": V3ErrorCodec, "402": V3ErrorCodec, "404": V3ErrorCodec, "429": V3ErrorCodec, "500": V3ErrorCodec, "503": V3ErrorCodec },
26
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/generated/earningsCalls/client.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,oBAAoB;AAEpB,OAAO,EAIL,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE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
37
37
  date?: string;
38
+ /**
39
+ * Return prices whose date is on or after this date.
40
+ */
41
+ dateGte?: string;
42
+ /**
43
+ * Return prices whose date is strictly after this date.
44
+ */
45
+ dateGt?: string;
46
+ /**
47
+ * Return prices whose date is on or before this date.
48
+ */
49
+ dateLte?: string;
50
+ /**
51
+ * Return prices whose date is strictly before this date.
52
+ */
53
+ dateLt?: string;
38
54
  order?: "asc" | "desc";
39
55
  /**
40
56
  * Maximum number of resources to return. Defaults to 250.
@@ -19,7 +19,7 @@ export function bind(transport) {
19
19
  const ListOperation = {
20
20
  method: "GET",
21
21
  route: "/v3.0.0/forex-prices/{identifier}",
22
- query: { apikey: "apikey", date: "date", order: "order", limit: "limit", page: "page" },
22
+ query: { apikey: "apikey", date: "date", dateGte: "date.gte", dateGt: "date.gt", dateLte: "date.lte", dateLt: "date.lt", order: "order", limit: "limit", page: "page" },
23
23
  response: V3ForexPriceListCodec,
24
24
  errors: { "400": V3ErrorCodec, "401": V3ErrorCodec, "402": V3ErrorCodec, "404": V3ErrorCodec, "429": V3ErrorCodec, "500": V3ErrorCodec, "503": V3ErrorCodec },
25
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/generated/forexPrices/client.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,oBAAoB;AAEpB,OAAO,EAIL,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAEL,IAAI,IAAI,UAAU,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyB,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAoB3E,MAAM,UAAU,YAAY,CAAC,OAAsB;IACjD,OAAO,IAAI,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,SAAoB;IACvC,IAAI,YAAsC,CAAC;IAC3C,OAAO;QACL,IAA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