sentisense 0.31.0 → 0.34.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.
package/dist/index.d.ts CHANGED
@@ -49,6 +49,17 @@ interface StockQuote {
49
49
  dividendYield: number | null;
50
50
  /** 200-day simple moving average of daily closes. Null when fewer than 200 trading days of history exist. */
51
51
  movingAverage200Day: number | null;
52
+ /**
53
+ * Currency the issuer reports its financials in ("USD", "TWD", "JPY", ...). Absent when
54
+ * the currency is unknown, which is not the same as implicitly USD. Same field and same
55
+ * meaning as {@link Fundamentals.reportedCurrency}.
56
+ *
57
+ * Price fields on this response are always in the listing currency of the quoted symbol,
58
+ * so on an ADR filing in a home currency the price and the per-share statement figures are
59
+ * in different units. The valuation ratios derived from both (`peRatio`, `epsTTM`) are
60
+ * omitted rather than computed in that case, so treat them as possibly absent, not zero.
61
+ */
62
+ reportedCurrency?: string;
52
63
  timestamp: number | null;
53
64
  /** Extended-hours view (pre-market or after-hours). Null/absent during RTH, overnight, and weekends. */
54
65
  extendedHours?: ExtendedHoursInfo | null;
@@ -87,6 +98,68 @@ interface StockEntity {
87
98
  type: string;
88
99
  [key: string]: unknown;
89
100
  }
101
+ /** Per-source tone for a stock: where the conversation is, and how it leans. */
102
+ interface SentimentSourceTone {
103
+ /** "News", "Reddit", "X", "YouTube", "Substack". */
104
+ source: string;
105
+ /** "Bullish" | "Neutral" | "Bearish". */
106
+ direction: string;
107
+ /**
108
+ * Whole-number percent of this stock's mentions, not a fraction. Each source's share is
109
+ * rounded independently, so the array sums to about 100 rather than exactly 100: 101 is
110
+ * common and is not a data error. Do not use the shares to reconstruct per-source counts.
111
+ */
112
+ mentionShare: number;
113
+ /** Exact polarity in [-1, 1]. */
114
+ value?: number;
115
+ }
116
+ /** A news story moving a stock's sentiment, with its own tone. */
117
+ interface SentimentDriver {
118
+ title: string;
119
+ /** Tone of this driver in [-1, 1]. */
120
+ tone: number;
121
+ }
122
+ interface StockSentiment {
123
+ ticker: string;
124
+ companyName?: string;
125
+ /** ISO date (YYYY-MM-DD) the data is current as of. */
126
+ asOf?: string;
127
+ /** Latest SentiSense Score: a 0-centered composite of sentiment and mentions, unbounded. */
128
+ sentisenseScore?: number;
129
+ /** 30-day average Score, the stable regime figure. */
130
+ sentisenseScoreAvg30d?: number;
131
+ sentisenseScoreDelta30d?: number;
132
+ /** Seven-band label of the 30-day average. */
133
+ scoreLabel?: string;
134
+ /** "Bullish" | "Neutral" | "Bearish", from the 30-day average. */
135
+ direction?: string;
136
+ /** Same three bands, from today's read. */
137
+ latestDirection?: string;
138
+ /** "UP" | "DOWN" | "FLAT". */
139
+ trend?: string;
140
+ /** Daily Score series. */
141
+ scoreSparkline?: number[];
142
+ /** Today's mention volume. */
143
+ mentions?: number;
144
+ /** 30-day average mentions per day. */
145
+ mentionsAvg30d?: number;
146
+ /** Latest share of voice, as a fraction (0.021 = 2.1%). Note this is NOT the same unit as `mentionShare`. */
147
+ socialDominance?: number;
148
+ /** Per-source tone, loudest source first. */
149
+ bySource?: SentimentSourceTone[];
150
+ relatedTickers?: Array<{
151
+ ticker: string;
152
+ name: string;
153
+ }>;
154
+ drivers?: SentimentDriver[];
155
+ /** Plain-language summary of why the Score sits where it does. */
156
+ narrative?: string;
157
+ faq?: Array<{
158
+ question: string;
159
+ answer: string;
160
+ }>;
161
+ [key: string]: unknown;
162
+ }
90
163
  interface ChartDataPoint {
91
164
  /** Unix timestamp in milliseconds. */
92
165
  timestamp?: number;
@@ -112,9 +185,47 @@ interface MarketStatus {
112
185
  status: string;
113
186
  [key: string]: unknown;
114
187
  }
188
+ /**
189
+ * One period of filed financial statement data from `stocks.getFundamentals()`.
190
+ *
191
+ * The index signature is deliberate: the response carries the full income statement, balance
192
+ * sheet, and cash flow line items, and more are added over time, so every field is reachable
193
+ * whether or not it is typed here. The cash-flow block below is typed because its sign and
194
+ * relationships are easy to get wrong.
195
+ */
115
196
  interface Fundamentals {
116
197
  ticker: string;
117
198
  timeframe: string;
199
+ /**
200
+ * The currency the filer reports in ("USD", "KRW", "EUR", ...). Statement figures are as
201
+ * reported in this currency and are never converted to US dollars: foreign companies listed
202
+ * as ADRs file in their home currency while their listed share price is in USD. Absent means
203
+ * the currency is unknown, not implicitly USD. For non-USD filers the API serves `peRatio`,
204
+ * `psRatio`, and `pbRatio` as `null` on purpose (a USD price over a home-currency per-share
205
+ * figure is a unit mismatch); do not recompute them client-side.
206
+ */
207
+ reportedCurrency?: string;
208
+ /** Net cash from operating activities, in the reporting currency (see `reportedCurrency`). */
209
+ operatingCashFlow?: number | null;
210
+ /** Net cash from investing activities, in the reporting currency. */
211
+ investingCashFlow?: number | null;
212
+ /** Net cash from financing activities, in the reporting currency. */
213
+ financingCashFlow?: number | null;
214
+ /**
215
+ * Capital expenditure, in the reporting currency, signed as filed: normally NEGATIVE,
216
+ * because it is an outflow. Take the absolute value before treating it as a magnitude.
217
+ */
218
+ capitalExpenditure?: number | null;
219
+ /**
220
+ * Free cash flow, in the reporting currency: `operatingCashFlow - Math.abs(capitalExpenditure)`.
221
+ *
222
+ * `null` rather than a guess when the period's capital expenditure is not available, so a
223
+ * screen for positive free cash flow can never match on a fabricated number. Do not
224
+ * substitute `operatingCashFlow + investingCashFlow`: investing cash flow also carries
225
+ * marketable-securities and acquisition activity, which for a company holding a large
226
+ * securities portfolio is wrong by billions and can flip the sign.
227
+ */
228
+ freeCashFlow?: number | null;
118
229
  [key: string]: unknown;
119
230
  }
120
231
  /**
@@ -169,7 +280,19 @@ interface AISummary {
169
280
  [key: string]: unknown;
170
281
  }
171
282
  interface GetChartOptions {
172
- timeframe?: "1D" | "5D" | "1W" | "1M" | "3M" | "6M" | "1Y" | "ALL";
283
+ /**
284
+ * Chart range. "MAX" returns the full available history (up to ~26 years) as monthly bars;
285
+ * "10Y" and "5Y" return weekly bars.
286
+ *
287
+ * Price basis differs by range, so do not compare closes across two ranges without
288
+ * checking this: "10Y" and "MAX" are split- and dividend-adjusted, while "5Y" and every
289
+ * shorter range are split-adjusted only. A "5Y" weekly close equals the "1Y" daily close of
290
+ * that week's last trading day; the "10Y" bar for the same week is lower by the dividends
291
+ * paid since, and the gap widens the further back you read.
292
+ *
293
+ * "ALL" is a legacy alias of "5Y", retained so existing code keeps compiling.
294
+ */
295
+ timeframe?: "1D" | "5D" | "1W" | "1M" | "3M" | "6M" | "1Y" | "5Y" | "10Y" | "MAX" | "ALL";
173
296
  }
174
297
  interface GetImagesOptions {
175
298
  forced?: boolean;
@@ -210,6 +333,15 @@ interface Document {
210
333
  id: string;
211
334
  url: string;
212
335
  source: "NEWS" | "REDDIT" | "X" | "SUBSTACK" | "YOUTUBE";
336
+ /**
337
+ * Publisher name for a news article, e.g. `"The Motley Fool"`. Null on social sources,
338
+ * where the publisher is the platform already named in `source`, so fall back to
339
+ * `source` for a label rather than printing an empty string.
340
+ *
341
+ * Typed optional so existing object literals keep compiling; the API sends the key on
342
+ * every document row.
343
+ */
344
+ sourceName?: string | null;
213
345
  published: number;
214
346
  averageSentiment: number;
215
347
  reliability: number;
@@ -330,7 +462,7 @@ interface InstitutionalFlow {
330
462
  avgClosePrice?: number | null;
331
463
  /**
332
464
  * Dollar-weighted net flow: `netSharesChange × avgClosePrice`. 0 when
333
- * `avgClosePrice` is missing — fall back to displaying `netSharesChange`.
465
+ * `avgClosePrice` is missing, so fall back to displaying `netSharesChange`.
334
466
  */
335
467
  dollarFlowUsd: number;
336
468
  }
@@ -343,6 +475,36 @@ interface Holder {
343
475
  changeType: "NEW" | "INCREASED" | "DECREASED" | "SOLD_OUT" | "UNCHANGED";
344
476
  sharesChange: number;
345
477
  sharesChangePct: number;
478
+ /**
479
+ * URL slug for this filer, to pass straight to
480
+ * `institutional.getInstitutionDetail()`. Null when the filer has no curated
481
+ * institution page, so check it before building a link.
482
+ *
483
+ * Typed optional so existing object literals keep compiling; the API sends the key
484
+ * on every holder row.
485
+ */
486
+ entitySlug?: string | null;
487
+ /**
488
+ * Number of SEC filer CIKs rolled up into this row, when the row aggregates a
489
+ * multi-filer manager. Null for a single-CIK filer, which is the common case, so
490
+ * read it as "1 or unknown" rather than zero.
491
+ */
492
+ cikCount?: number | null;
493
+ }
494
+ /**
495
+ * A server-side shortlist of the quarter's significant position changes, so a caller
496
+ * paging through thousands of rows does not have to fetch them all to find the movers.
497
+ *
498
+ * Scoped to the whole ticker, not to the page you asked for: the same values come back
499
+ * whatever `limit` and `offset` you send. The server picks both the threshold behind
500
+ * `count` and the ranking behind `top`, and neither is part of the API contract, so treat
501
+ * this as a display aid and re-derive anything you need to sort or filter on from `holders`.
502
+ */
503
+ interface HolderNotableChanges {
504
+ /** How many holders the server judged to have changed significantly this quarter. */
505
+ count: number;
506
+ /** The shortlist itself, already ranked. Same row shape as `holders`. */
507
+ top: Holder[];
346
508
  }
347
509
  /**
348
510
  * Institutional ownership for one ticker: the `data` payload of
@@ -356,8 +518,25 @@ interface TickerHolders {
356
518
  reportDate: string;
357
519
  totalInstitutionalShares: number;
358
520
  totalInstitutionalValue: number;
521
+ /** Every institutional holder of this ticker for the quarter, ignoring any paging. */
359
522
  holderCount: number;
360
523
  holders: Holder[];
524
+ /**
525
+ * Rows actually returned in `holders`. Sent only when you passed `limit`, so use
526
+ * `holders.length` if you need a count that is always there. On the last page it is
527
+ * smaller than the `limit` you asked for, which is how you know to stop.
528
+ */
529
+ returnedCount?: number;
530
+ /**
531
+ * Row offset these `holders` start at, echoing the request. Sent only when you passed
532
+ * `limit`; the unpaged response omits it rather than sending 0.
533
+ */
534
+ offset?: number;
535
+ /**
536
+ * Ticker-wide summary of the quarter's biggest position changes. Sent only when you
537
+ * passed `limit`, since it exists to spare a paging caller a full scan.
538
+ */
539
+ notableChanges?: HolderNotableChanges;
361
540
  }
362
541
  /**
363
542
  * The flows payload inside the response envelope: `institutional.getFlows()` returns
@@ -394,6 +573,27 @@ type InstitutionalFlowsResponse = InstitutionalFlows;
394
573
  interface GetFlowsOptions {
395
574
  limit?: number;
396
575
  }
576
+ /**
577
+ * Paging and sort options for `institutional.getHolders`.
578
+ *
579
+ * `limit` is the switch for the whole set: sent on its own it pages, and it is also what
580
+ * turns on `offset`, `sortBy`, `sortDir`, and the `returnedCount` / `offset` /
581
+ * `notableChanges` fields on the response. Send any of the others without `limit` and the
582
+ * server ignores them and returns the full unsorted list, silently, with a 200.
583
+ */
584
+ interface GetHoldersOptions {
585
+ /**
586
+ * Maximum holder rows to return. Must be >= 1; values above 1000 are capped
587
+ * server-side. Omit to get the full, unbounded holder list.
588
+ */
589
+ limit?: number;
590
+ /** Row offset to start from. Server default is 0. Requires `limit`. */
591
+ offset?: number;
592
+ /** Sort field. Server default is `"shares"`. Requires `limit`. */
593
+ sortBy?: "shares" | "valueUsd" | "sharesChangePct";
594
+ /** Sort direction. Server default is `"desc"`. Requires `limit`. */
595
+ sortDir?: "asc" | "desc";
596
+ }
397
597
  /** A single institution summary from the discovery list. */
398
598
  interface InstitutionSummary {
399
599
  /** SEC Central Index Key of the (rolled-up) institution. */
@@ -569,6 +769,26 @@ interface GetPoliticiansOptions {
569
769
  /** Number of days to look back (1-365). Defaults to 90. */
570
770
  lookbackDays?: number;
571
771
  }
772
+ /**
773
+ * Options for `politicians.getActivity`, which pages on top of the shared lookback window.
774
+ *
775
+ * The market-wide feed is far longer than one response: a 90-day window is routinely well
776
+ * over a thousand disclosures and the server returns 200 of them by default. Read
777
+ * `totalCount` on the envelope to size the walk, then step through with `limit` and
778
+ * `offset`. Omitting both keeps the original single 200-row request.
779
+ */
780
+ interface GetPoliticianActivityOptions extends GetPoliticiansOptions {
781
+ /**
782
+ * Rows to return. Must be >= 1; the server rejects 0 or negative with HTTP 400
783
+ * (`invalid_limit`) and caps anything above 500 at 500. Omit for the default 200.
784
+ */
785
+ limit?: number;
786
+ /**
787
+ * Row offset to start from. Defaults to 0, and unlike the holders endpoint it works
788
+ * without `limit`. An offset past the end returns an empty `data` array, not an error.
789
+ */
790
+ offset?: number;
791
+ }
572
792
  /** Generic preview wrapper used by PRO-gated endpoints. */
573
793
  interface EarningsEvent {
574
794
  ticker: string;
@@ -618,9 +838,15 @@ interface PreviewResponse<T> {
618
838
  isPreview: boolean;
619
839
  previewReason: "PRO_REQUIRED" | null;
620
840
  /**
621
- * Number of items in the full PRO dataset, before preview truncation.
622
- * Present on preview (free-tier) list responses so callers can show
623
- * "showing N of totalCount". Absent on full PRO responses.
841
+ * Size of the full result set, before any truncation your response went through.
842
+ *
843
+ * Sent whenever the server knows that number and the response might not hold all of it:
844
+ * on a preview (`isPreview: true`), so you can render "showing N of totalCount", and on a
845
+ * paged endpoint such as `politicians.getActivity`, where it is the full match count for
846
+ * your filters on every tier, including a PRO response with `isPreview: false`.
847
+ *
848
+ * Absent on the endpoints that simply return everything, so a missing `totalCount` means
849
+ * "ask `data` for the count", never "zero results".
624
850
  */
625
851
  totalCount?: number;
626
852
  data: T;
@@ -830,7 +1056,7 @@ interface TrackerListing {
830
1056
  interface TrackerListResponse {
831
1057
  trackers: TrackerListing[];
832
1058
  }
833
- /** One row of a `viewType: "table"` tracker — a ranked leaderboard cell. */
1059
+ /** One row of a `viewType: "table"` tracker: a ranked leaderboard cell. */
834
1060
  interface TrackerTableRow {
835
1061
  /** 1-based rank on the sort the tracker is built for; may be null. */
836
1062
  rank: number | null;
@@ -1089,14 +1315,15 @@ declare class EntityMetrics {
1089
1315
  /**
1090
1316
  * Get time-series metric data for an entity using the v2 Serving Metrics API.
1091
1317
  *
1092
- * @param symbol Ticker symbol (e.g. "AAPL") — the backend resolves the entity.
1318
+ * @param symbol Ticker symbol (e.g. "AAPL") or entity urlSlug (e.g. "Nancy-Pelosi",
1319
+ * case-insensitive; discover slugs via stocks.getEntities()).
1093
1320
  * @param options Metric type and optional time range / resolution.
1094
1321
  */
1095
1322
  getMetrics(symbol: string, options?: MetricsOptions): Promise<ServingMetric[]>;
1096
1323
  /**
1097
1324
  * Get distribution data for a metric, broken down by a dimension (default: source).
1098
1325
  *
1099
- * @param symbol Ticker symbol (e.g. "AAPL").
1326
+ * @param symbol Ticker symbol (e.g. "AAPL") or entity urlSlug.
1100
1327
  * @param metricType The metric to break down (e.g. "mentions", "sentiment").
1101
1328
  * @param options Optional dimension parameter.
1102
1329
  */
@@ -1117,18 +1344,18 @@ interface EtfHolding {
1117
1344
  name: string | null;
1118
1345
  /** Weight in the fund as a percentage (0-100). */
1119
1346
  weightPct: number;
1120
- /** ISO date "YYYY-MM-DD" — first date this holding appeared in the composition. */
1347
+ /** ISO date "YYYY-MM-DD". First date this holding appeared in the composition. */
1121
1348
  firstSeen: string | null;
1122
1349
  }
1123
1350
  interface EtfHoldings {
1124
1351
  ticker: string;
1125
1352
  issuer: string;
1126
1353
  issuerEndpoint: string | null;
1127
- /** ISO date "YYYY-MM-DD" — composition snapshot date from the issuer. */
1354
+ /** ISO date "YYYY-MM-DD". Composition snapshot date from the issuer. */
1128
1355
  asOfDate: string;
1129
1356
  /** Epoch seconds when SentiSense refreshed the composition. */
1130
1357
  fetchedAt: number | null;
1131
- /** ISO date "YYYY-MM-DD" — when the composition is scheduled to be refreshed next. */
1358
+ /** ISO date "YYYY-MM-DD". When the composition is scheduled to be refreshed next. */
1132
1359
  nextRefreshDue: string;
1133
1360
  totalHoldings: number;
1134
1361
  holdings: EtfHolding[];
@@ -1162,7 +1389,7 @@ interface EtfAnalystContributor {
1162
1389
  }
1163
1390
  interface EtfAnalystAggregate {
1164
1391
  ticker: string;
1165
- /** ISO date "YYYY-MM-DD" — composition snapshot date. */
1392
+ /** ISO date "YYYY-MM-DD". Composition snapshot date. */
1166
1393
  asOfDate: string | null;
1167
1394
  /** Epoch seconds when this rollup was computed. */
1168
1395
  computedAt: number;
@@ -1193,7 +1420,7 @@ interface EtfInsiderContributor {
1193
1420
  }
1194
1421
  interface EtfInsiderAggregate {
1195
1422
  ticker: string;
1196
- /** ISO date "YYYY-MM-DD" — composition snapshot date. */
1423
+ /** ISO date "YYYY-MM-DD". Composition snapshot date. */
1197
1424
  asOfDate: string | null;
1198
1425
  /** Epoch seconds when this rollup was computed. */
1199
1426
  computedAt: number;
@@ -1212,7 +1439,7 @@ interface EtfSentimentReading {
1212
1439
  }
1213
1440
  interface EtfSentimentAggregate {
1214
1441
  ticker: string;
1215
- /** ISO date "YYYY-MM-DD" — composition snapshot date. */
1442
+ /** ISO date "YYYY-MM-DD". Composition snapshot date. */
1216
1443
  asOfDate: string | null;
1217
1444
  /** Epoch seconds when this aggregate was assembled. */
1218
1445
  computedAt: number;
@@ -1301,8 +1528,21 @@ declare class Politicians {
1301
1528
  *
1302
1529
  * PRO-gated. Free/unauthenticated users receive a preview (top 5 trades)
1303
1530
  * with `isPreview: true` in the response.
1531
+ *
1532
+ * The feed is longer than one response: a default 90-day window is routinely well over a
1533
+ * thousand disclosures, and without `limit` the server sends the first 200 with no marker
1534
+ * that it stopped. `totalCount` on the envelope is the real size on every tier, so page
1535
+ * with `limit` and `offset` rather than reading `data.length` as the total.
1536
+ *
1537
+ * ```typescript
1538
+ * const first = await client.politicians.getActivity({ limit: 100 });
1539
+ * for (let offset = 100; offset < first.totalCount!; offset += 100) {
1540
+ * const page = await client.politicians.getActivity({ limit: 100, offset });
1541
+ * // ... page.data
1542
+ * }
1543
+ * ```
1304
1544
  */
1305
- getActivity(options?: GetPoliticiansOptions): Promise<PreviewResponse<CongressTrade[]>>;
1545
+ getActivity(options?: GetPoliticianActivityOptions): Promise<PreviewResponse<CongressTrade[]>>;
1306
1546
  /**
1307
1547
  * Get congressional trades for a specific stock.
1308
1548
  *
@@ -1411,8 +1651,17 @@ declare class Institutional {
1411
1651
  * are two levels down: `(await getHolders(t, d)).data.holders`, alongside ticker-level
1412
1652
  * totals like `holderCount`. Free callers get a truncated `holders` array with
1413
1653
  * `isPreview: true`.
1654
+ *
1655
+ * A widely held ticker returns thousands of rows: a megacap quarter is about
1656
+ * 6,000 holders and 1.5 MB. Pass `limit` unless you really want all of them.
1657
+ * Omitting `options` sends the original unbounded request.
1658
+ *
1659
+ * `limit` is the switch for the whole option set. With it, the response also carries
1660
+ * `returnedCount`, `offset`, and a `notableChanges` summary, so you can walk the list
1661
+ * without re-counting it. Without it, `offset` / `sortBy` / `sortDir` are ignored by the
1662
+ * server and you get the full unsorted list back with a 200.
1414
1663
  */
1415
- getHolders(ticker: string, reportDate: string): Promise<PreviewResponse<TickerHolders>>;
1664
+ getHolders(ticker: string, reportDate: string, options?: GetHoldersOptions): Promise<PreviewResponse<TickerHolders>>;
1416
1665
  /**
1417
1666
  * Get activist investor positions (NEW or INCREASED).
1418
1667
  *
@@ -1492,6 +1741,18 @@ declare class Stocks {
1492
1741
  getSimilar(ticker: string, options?: GetSimilarOptions): Promise<SimilarStock[]>;
1493
1742
  /** Get company profile (CEO, sector, industry, market data). */
1494
1743
  getProfile(ticker: string, options?: GetProfileOptions): Promise<StockProfile>;
1744
+ /**
1745
+ * Get the headline sentiment picture for a stock in one call.
1746
+ *
1747
+ * Returns the SentiSense Score with its 30-day regime, mention volume and social
1748
+ * dominance, per-source tone in `bySource`, plus related tickers, story drivers, a
1749
+ * narrative and an FAQ. Available in full on every API-key tier.
1750
+ *
1751
+ * Use `entityMetrics.getMetrics(ticker, "sentiment", ...)` instead when you need a time
1752
+ * series over a specific window rather than the headline read. Returns 404 for tickers
1753
+ * with no sentiment coverage.
1754
+ */
1755
+ getSentiment(ticker: string): Promise<PreviewResponse<StockSentiment>>;
1495
1756
  /** Get related KB entities (people, products, partners). */
1496
1757
  getEntities(ticker: string): Promise<StockEntity[]>;
1497
1758
  /** Get AI-generated stock analysis report. Requires PRO tier. */
@@ -1508,7 +1769,13 @@ declare class Stocks {
1508
1769
  getChart(ticker: string, options?: GetChartOptions): Promise<ChartData>;
1509
1770
  /** Get current market open/closed/pre-market/after-hours status. */
1510
1771
  getMarketStatus(): Promise<MarketStatus>;
1511
- /** Get financial statement data. */
1772
+ /**
1773
+ * Get financial statement data for one reporting period: income statement, balance sheet,
1774
+ * and cash flow, including `capitalExpenditure` and `freeCashFlow`.
1775
+ *
1776
+ * Capital expenditure is signed as filed, so normally negative. See {@link Fundamentals}
1777
+ * for the free-cash-flow relationship and when it is `null`.
1778
+ */
1512
1779
  getFundamentals(ticker: string, options?: GetFundamentalsOptions): Promise<Fundamentals>;
1513
1780
  /** Get available fiscal periods. The periods are in `periods`. */
1514
1781
  getFundamentalsPeriods(ticker: string): Promise<FundamentalsPeriodsResponse>;
@@ -1547,8 +1814,8 @@ declare class Stocks {
1547
1814
  */
1548
1815
  listKpiCoverage(): Promise<KpiCoverageResponse>;
1549
1816
  /**
1550
- * List the KPI metadata tuples available for a ticker — `id, name, category,
1551
- * chartType` — without paying the cost of the full series payload. Mirrors
1817
+ * List the KPI metadata tuples available for a ticker (`id, name, category,
1818
+ * chartType`) without paying the cost of the full series payload. Mirrors
1552
1819
  * the `/api/v1/insights/stock/{ticker}/types` precedent.
1553
1820
  *
1554
1821
  * Auth: API key required, no quota cost. 404 if the ticker has no curated KPIs.
@@ -1557,10 +1824,10 @@ declare class Stocks {
1557
1824
  }
1558
1825
 
1559
1826
  /**
1560
- * Trackers — observational data products published as a standardized
1827
+ * Trackers: observational data products published as a standardized
1561
1828
  * `TrackerSnapshot` envelope. Every tracker (institution rankings,
1562
1829
  * hedge-fund reported returns, social trackers, surveillance dashboards)
1563
- * returns the same shape — consumers write one renderer per `viewType` and
1830
+ * returns the same shape, so consumers write one renderer per `viewType` and
1564
1831
  * get every current and future SentiSense tracker for free.
1565
1832
  *
1566
1833
  * @see TrackerSnapshot
@@ -1569,7 +1836,7 @@ declare class Trackers {
1569
1836
  private client;
1570
1837
  constructor(client: APIClient);
1571
1838
  /**
1572
- * List every publicly-visible tracker — id, display name, category,
1839
+ * List every publicly-visible tracker: id, display name, category,
1573
1840
  * one-line description, and the methodology anchor to link out to.
1574
1841
  */
1575
1842
  list(): Promise<TrackerListResponse>;
@@ -1581,8 +1848,8 @@ declare class Trackers {
1581
1848
  * `"choropleth"` they live at `data.geo[]`; etc. Dispatch on `viewType`
1582
1849
  * in your renderer.
1583
1850
  *
1584
- * @param trackerId — slug from {@link list}, e.g. `"institution-concentration"`.
1585
- * @param params — provider-specific query params (e.g. `{ scope: "us" }` for
1851
+ * @param trackerId slug from {@link list}, e.g. `"institution-concentration"`.
1852
+ * @param params provider-specific query params (e.g. `{ scope: "us" }` for
1586
1853
  * geographically-scoped trackers like hantavirus). Unknown keys are ignored.
1587
1854
  */
1588
1855
  get(trackerId: string, params?: Record<string, string | number | boolean>): Promise<TrackerSnapshotResponse>;
@@ -1632,7 +1899,24 @@ declare class AuthenticationError extends SentiSenseError {
1632
1899
  declare class NotFoundError extends SentiSenseError {
1633
1900
  constructor(message: string, code?: string);
1634
1901
  }
1902
+ /**
1903
+ * Thrown when a deep chart range is still being assembled.
1904
+ *
1905
+ * The API answers 202 for "10Y" and "MAX" the first time a rarely-requested stock is asked
1906
+ * for. It deliberately does not substitute a shorter range, so a successful response always
1907
+ * carries the timeframe you asked for. Retry after a few seconds.
1908
+ */
1909
+ declare class DeepHistoryUnavailableError extends SentiSenseError {
1910
+ retryAfter?: number;
1911
+ constructor(message: string, retryAfter?: number);
1912
+ }
1635
1913
  declare class RateLimitError extends SentiSenseError {
1914
+ /**
1915
+ * Seconds to wait before retrying, from the server's `Retry-After` header, clamped to
1916
+ * `[0.5, 120]`. Always either a finite number or `undefined`: an absent header, or one
1917
+ * carrying an HTTP-date instead of a number of seconds, leaves it undefined rather than
1918
+ * `NaN`, so `setTimeout(fn, err.retryAfter * 1000)` can never fire immediately.
1919
+ */
1636
1920
  retryAfter?: number;
1637
1921
  constructor(message: string, code?: string, retryAfter?: number);
1638
1922
  }
@@ -1640,6 +1924,6 @@ declare class APIError extends SentiSenseError {
1640
1924
  constructor(message: string, status: number, code?: string);
1641
1925
  }
1642
1926
 
1643
- declare const VERSION = "0.31.0";
1927
+ declare const VERSION = "0.34.0";
1644
1928
 
1645
- export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, type Document, type DocumentSearchResponse, type DocumentSource, type EarningsCalendarResponse, type EarningsEvent, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfSentimentAggregate, type EtfSentimentReading, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEtfInsiderAggregateOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticiansOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, type InstitutionalFlows, type InstitutionalFlowsResponse, type KBEntity, type KpiCoverageEntry, type KpiCoverageResponse, type KpiDataPoint, type KpiSeries, type KpiTypeEntry, type ListInstitutionsOptions, type LockedInsight, type MarketMood, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type PoliticianDetail, type PoliticianSummary, type PreviewResponse, type Quarter, RateLimitError, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortVolume, type SimilarStock, type StockDetail, type StockEntity, type StockImage, type StockPrice, type StockProfile, type StockQuote, type Story, type StoryCluster, type TickerHolders, type TrackerEvent, type TrackerGeoEntry, type TrackerHeadlineMetric, type TrackerListResponse, type TrackerListing, type TrackerMetricValue, type TrackerSignal, type TrackerSnapshot, type TrackerSnapshotResponse, type TrackerSourceRef, type TrackerTableRow, type TrackerTimeSeriesPoint, type TtmFundamentals, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
1929
+ export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarningsCalendarResponse, type EarningsEvent, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfSentimentAggregate, type EtfSentimentReading, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticianActivityOptions, type GetPoliticiansOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type HolderNotableChanges, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, type InstitutionalFlows, type InstitutionalFlowsResponse, type KBEntity, type KpiCoverageEntry, type KpiCoverageResponse, type KpiDataPoint, type KpiSeries, type KpiTypeEntry, type ListInstitutionsOptions, type LockedInsight, type MarketMood, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type PoliticianDetail, type PoliticianSummary, type PreviewResponse, type Quarter, RateLimitError, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortVolume, type SimilarStock, type StockDetail, type StockEntity, type StockImage, type StockPrice, type StockProfile, type StockQuote, type Story, type StoryCluster, type TickerHolders, type TrackerEvent, type TrackerGeoEntry, type TrackerHeadlineMetric, type TrackerListResponse, type TrackerListing, type TrackerMetricValue, type TrackerSignal, type TrackerSnapshot, type TrackerSnapshotResponse, type TrackerSourceRef, type TrackerTableRow, type TrackerTimeSeriesPoint, type TtmFundamentals, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };