sentisense 0.47.2 → 0.50.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/README.md +65 -2
- package/dist/cli.cjs +116 -1
- package/dist/index.cjs +116 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +407 -3
- package/dist/index.d.ts +407 -3
- package/dist/index.mjs +116 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -182,6 +182,13 @@ interface StockProfile {
|
|
|
182
182
|
delistedDate?: string;
|
|
183
183
|
/** Why it delisted. Absent unless `listingStatus` is `DELISTED`. */
|
|
184
184
|
delistingReason?: 'acquired' | 'take_private' | 'bankruptcy' | 'exchange_rule' | 'merged';
|
|
185
|
+
/**
|
|
186
|
+
* For a tracked ETF ticker, the curated landscape card image for the fund: the
|
|
187
|
+
* same value returned by {@link EtfInfo.imageUrl}. Separate from `logoUrl` and
|
|
188
|
+
* `iconUrl`, which are square branding marks. Absent when no curated image is
|
|
189
|
+
* assigned, and for ordinary stocks.
|
|
190
|
+
*/
|
|
191
|
+
imageUrl?: string | null;
|
|
185
192
|
[key: string]: unknown;
|
|
186
193
|
}
|
|
187
194
|
interface StockEntity {
|
|
@@ -650,6 +657,129 @@ interface OptionsOverview {
|
|
|
650
657
|
/** Full ETF board size on a FREE response, mirroring what the envelope's `totalCount` does for stocks. */
|
|
651
658
|
etfTotalCount?: number;
|
|
652
659
|
}
|
|
660
|
+
/** The six dimensions the composite is blended from, by stable `key`. */
|
|
661
|
+
type RatingDimensionKey = "crowd" | "smart_money" | "options" | "analysts" | "fundamentals" | "earnings";
|
|
662
|
+
/**
|
|
663
|
+
* Why a stock has no grade.
|
|
664
|
+
*
|
|
665
|
+
* `stale` means a row exists but the nightly has not written recently, which is an
|
|
666
|
+
* operational gap rather than a coverage one. `not_rated_today` means no row and no refusal
|
|
667
|
+
* on record: an ETF, a ticker outside the swept universe, or one that entered coverage after
|
|
668
|
+
* the last run. The other two mean the run looked and declined to grade.
|
|
669
|
+
*/
|
|
670
|
+
type RatingNotRatedReason = "stale" | "not_rated_today" | "insufficient_dimensions" | "insufficient_coverage_weight";
|
|
671
|
+
/**
|
|
672
|
+
* One constituent leg behind a dimension's percentile.
|
|
673
|
+
*
|
|
674
|
+
* Only the smart-money dimension carries legs today; every other dimension omits the field
|
|
675
|
+
* entirely, so an absent `subLegs` means "this dimension has no legs", never "the legs were
|
|
676
|
+
* all zero".
|
|
677
|
+
*/
|
|
678
|
+
interface RatingSubLeg {
|
|
679
|
+
/** Stable snake_case identifier, e.g. `"inst_13f"`. */
|
|
680
|
+
key: string;
|
|
681
|
+
label: string;
|
|
682
|
+
/** The leg's natural-scale reading. `null` when the leg had no data. */
|
|
683
|
+
raw: number | null;
|
|
684
|
+
/** `"%"` for a percentage, `"ratio"` for a scale-free balance. */
|
|
685
|
+
unit: string;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* One of the six dimensions the composite is blended from.
|
|
689
|
+
*
|
|
690
|
+
* **All six always arrive, in a fixed order, whether or not they had data.** An absent
|
|
691
|
+
* dimension is a full row with `present` false and a `null` percentile; the server never
|
|
692
|
+
* drops it, precisely so a client cannot mistake a gap for a five-dimension rating. Read
|
|
693
|
+
* `present` before reading `percentile`, and never substitute zero for a `null`: zero is the
|
|
694
|
+
* bottom of the cross-section, absence is not a position on it.
|
|
695
|
+
*/
|
|
696
|
+
interface RatingDimension {
|
|
697
|
+
key: RatingDimensionKey;
|
|
698
|
+
/** Display label, owned by the API so every surface agrees on the wording. */
|
|
699
|
+
label: string;
|
|
700
|
+
/** The dimension's cross-sectional rank, 0 to 100. `null` when absent. */
|
|
701
|
+
percentile: number | null;
|
|
702
|
+
/** The natural-scale reading behind the percentile, when the dimension has one. */
|
|
703
|
+
raw: number | null;
|
|
704
|
+
/** What `raw` means and in what unit, e.g. `"Operating margin, percent"`. */
|
|
705
|
+
rawLabel: string | null;
|
|
706
|
+
/** Whether this dimension had data for this stock. */
|
|
707
|
+
present: boolean;
|
|
708
|
+
/** Constituent legs, currently smart-money only. Absent on every other dimension. */
|
|
709
|
+
subLegs?: RatingSubLeg[];
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* One anomaly flag evaluated alongside the rating.
|
|
713
|
+
*
|
|
714
|
+
* Flags are informational and never move the composite. A flag the run could not evaluate is
|
|
715
|
+
* absent from the list rather than reported inactive, so present-and-false and absent stay
|
|
716
|
+
* distinguishable.
|
|
717
|
+
*/
|
|
718
|
+
interface RatingFlag {
|
|
719
|
+
/** Stable snake_case identifier, e.g. `"unusual_options_flow"`. */
|
|
720
|
+
key: string;
|
|
721
|
+
label: string;
|
|
722
|
+
active: boolean;
|
|
723
|
+
}
|
|
724
|
+
/** The fields both rating shapes carry, graded or not. */
|
|
725
|
+
interface RatingBase {
|
|
726
|
+
ticker: string;
|
|
727
|
+
/**
|
|
728
|
+
* The stock's knowledge base id, e.g. `"kb/company/1"`. Addresses the metrics time series
|
|
729
|
+
* without a second lookup.
|
|
730
|
+
*/
|
|
731
|
+
kbEntityId: string;
|
|
732
|
+
/** The New York calendar day this answer describes, `"YYYY-MM-DD"`. */
|
|
733
|
+
asOf: string;
|
|
734
|
+
/** Always all six, in a fixed order, absent ones with `present` false. */
|
|
735
|
+
dimensions: RatingDimension[];
|
|
736
|
+
flags: RatingFlag[];
|
|
737
|
+
/** The standard financial disclaimer. Display it alongside the grade. */
|
|
738
|
+
disclaimer: string;
|
|
739
|
+
}
|
|
740
|
+
/** A stock that has a grade for `asOf`. */
|
|
741
|
+
interface RatedStockRating extends RatingBase {
|
|
742
|
+
rated: true;
|
|
743
|
+
/**
|
|
744
|
+
* `"A"`, `"B"`, `"C"`, `"D"` or `"F"`. Served as stored, never re-derived from
|
|
745
|
+
* `percentile`, so read it rather than computing your own bucket edges.
|
|
746
|
+
*/
|
|
747
|
+
letter: string;
|
|
748
|
+
/** Rank of `composite` among the day's rated stocks, 0 to 100. */
|
|
749
|
+
percentile: number;
|
|
750
|
+
/** The weighted blend before ranking, in [-1, +1]. */
|
|
751
|
+
composite: number;
|
|
752
|
+
/** How many stocks were rated that day: the rank's denominator. */
|
|
753
|
+
ratedCount: number;
|
|
754
|
+
/** The weights and floors in force when the row was written, e.g. `"2026.09-v1"`. */
|
|
755
|
+
methodologyVersion: string;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* A stock with no grade for `asOf`. A normal 200, not an error: ETFs and tickers outside
|
|
759
|
+
* the swept universe answer this way, and the composition still arrives so a card can render.
|
|
760
|
+
*/
|
|
761
|
+
interface UnratedStockRating extends RatingBase {
|
|
762
|
+
rated: false;
|
|
763
|
+
/** Why there is no grade. */
|
|
764
|
+
reason: RatingNotRatedReason;
|
|
765
|
+
/** How many of the six dimensions had data. */
|
|
766
|
+
dimensionsPresent?: number;
|
|
767
|
+
/** Which dimensions had data, by `key`. */
|
|
768
|
+
presentDimensions: RatingDimensionKey[];
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* The SentiSense Rating for one stock: where it ranks against the day's rated set.
|
|
772
|
+
*
|
|
773
|
+
* A discriminated union on `rated`, so `if (rating.rated)` narrows to the graded fields and
|
|
774
|
+
* the `else` branch narrows to `reason`. Branch on that flag rather than testing a field for
|
|
775
|
+
* `undefined`.
|
|
776
|
+
*
|
|
777
|
+
* The rating is a *relative* research signal, informational and educational only. It ranks a
|
|
778
|
+
* stock against the others rated that day; it is not financial, investment or trading advice
|
|
779
|
+
* and it is not a recommendation about any security. Carry `disclaimer` wherever you display
|
|
780
|
+
* a grade. Methodology: https://sentisense.ai/methodology/#sentisense-rating
|
|
781
|
+
*/
|
|
782
|
+
type StockRating = RatedStockRating | UnratedStockRating;
|
|
653
783
|
type DocumentSource = "news" | "reddit" | "x" | "substack" | "youtube";
|
|
654
784
|
/** Per-entity sentiment classification with resolved entity details. */
|
|
655
785
|
interface SentimentEntry {
|
|
@@ -1368,7 +1498,12 @@ interface PreviewResponse<T> {
|
|
|
1368
1498
|
data: T;
|
|
1369
1499
|
}
|
|
1370
1500
|
/** Supported metric types for the v2 Serving Metrics API. */
|
|
1371
|
-
type MetricType = "mentions" | "sentiment" | "sentisense_score"
|
|
1501
|
+
type MetricType = "mentions" | "sentiment" | "sentisense_score"
|
|
1502
|
+
/**
|
|
1503
|
+
* The SentiSense Rating percentile, 0 to 100. Time series only: it has no source
|
|
1504
|
+
* breakdown, so `getDistribution` answers with an empty distribution for it.
|
|
1505
|
+
*/
|
|
1506
|
+
| "sentisense_rating" | "social_dominance" | "creators";
|
|
1372
1507
|
/** Options for `EntityMetrics.getMetrics()`. */
|
|
1373
1508
|
interface MetricsOptions {
|
|
1374
1509
|
/** Metric to retrieve. Defaults to `"sentiment"`. */
|
|
@@ -2118,6 +2253,170 @@ interface GetAnalystMarketActivityOptions {
|
|
|
2118
2253
|
/** Days of history to return. Default 30. */
|
|
2119
2254
|
lookbackDays?: number;
|
|
2120
2255
|
}
|
|
2256
|
+
/** One price target note. */
|
|
2257
|
+
interface AnalystNote {
|
|
2258
|
+
/** ISO date the note was published, `"YYYY-MM-DD"`. */
|
|
2259
|
+
publishedDate: string;
|
|
2260
|
+
/**
|
|
2261
|
+
* The individual named on the note, or `null` when the report named nobody.
|
|
2262
|
+
* Absent means the report did not identify one, never that the note did not happen.
|
|
2263
|
+
*/
|
|
2264
|
+
analyst: string | null;
|
|
2265
|
+
priceTarget: number | null;
|
|
2266
|
+
adjPriceTarget: number | null;
|
|
2267
|
+
priceWhenPosted: number | null;
|
|
2268
|
+
newsTitle: string | null;
|
|
2269
|
+
newsUrl: string | null;
|
|
2270
|
+
newsPublisher: string | null;
|
|
2271
|
+
}
|
|
2272
|
+
/** A firm's most recent rating action. Published at firm level, with no individual attached. */
|
|
2273
|
+
interface AnalystFirmRating {
|
|
2274
|
+
rating: string | null;
|
|
2275
|
+
priorRating: string | null;
|
|
2276
|
+
/** UPGRADE, DOWNGRADE, INITIATE, REITERATE, OTHER */
|
|
2277
|
+
actionType: string | null;
|
|
2278
|
+
/** ISO date of the action, `"YYYY-MM-DD"`. */
|
|
2279
|
+
date: string | null;
|
|
2280
|
+
}
|
|
2281
|
+
/** A named analyst on a firm's desk, as it appears on a coverage row. */
|
|
2282
|
+
interface AnalystCoverageAnalyst {
|
|
2283
|
+
/**
|
|
2284
|
+
* Addresses `analyst.profile(slug)` and `analyst.calls(slug)`. `null` for a named
|
|
2285
|
+
* analyst we hold no profile for; the row keeps the `name` rather than being dropped.
|
|
2286
|
+
*/
|
|
2287
|
+
slug: string | null;
|
|
2288
|
+
name: string;
|
|
2289
|
+
noteCount: number;
|
|
2290
|
+
firstNote: string | null;
|
|
2291
|
+
lastNote: string | null;
|
|
2292
|
+
latestPriceTarget: number | null;
|
|
2293
|
+
}
|
|
2294
|
+
/** One firm covering the ticker. */
|
|
2295
|
+
interface AnalystCoverageFirm {
|
|
2296
|
+
firm: string;
|
|
2297
|
+
/** Individuals we can name on this desk. Possibly empty: not every note names one. */
|
|
2298
|
+
analysts: AnalystCoverageAnalyst[];
|
|
2299
|
+
/** This firm's price target notes in the window. `0` on a rating-only firm. */
|
|
2300
|
+
noteCount: number;
|
|
2301
|
+
attributedNoteCount: number;
|
|
2302
|
+
unattributedNoteCount: number;
|
|
2303
|
+
/** ISO dates bounding this firm's notes. `null` on a rating-only firm. */
|
|
2304
|
+
firstNote: string | null;
|
|
2305
|
+
lastNote: string | null;
|
|
2306
|
+
/** The firm's most recent note. `null` on a rating-only firm, so read `noteCount` first. */
|
|
2307
|
+
latestNote: AnalystNote | null;
|
|
2308
|
+
firmRating: AnalystFirmRating | null;
|
|
2309
|
+
}
|
|
2310
|
+
/**
|
|
2311
|
+
* Covering firms counted by the tier of their current rating. Counted over the whole
|
|
2312
|
+
* book before the free truncation, so `buy + hold + sell + unrated === total` and a free
|
|
2313
|
+
* key reads the same numbers as a PRO one.
|
|
2314
|
+
*/
|
|
2315
|
+
interface AnalystRatingBuckets {
|
|
2316
|
+
/** Buy-tier grades: Buy, Overweight, Outperform, Strong Buy, Sector Outperform. */
|
|
2317
|
+
buy: number;
|
|
2318
|
+
/** Hold-tier grades: Hold, Neutral, Equal-Weight, Market Perform. */
|
|
2319
|
+
hold: number;
|
|
2320
|
+
/** Sell-tier grades. */
|
|
2321
|
+
sell: number;
|
|
2322
|
+
/** No current rating on record (a price-target-only desk), or a grade we do not recognise. */
|
|
2323
|
+
unrated: number;
|
|
2324
|
+
/** Every covering firm. Equals `firmCount`. */
|
|
2325
|
+
total: number;
|
|
2326
|
+
}
|
|
2327
|
+
interface AnalystCoverage {
|
|
2328
|
+
ticker: string;
|
|
2329
|
+
/** Window actually applied after clamping, in days. */
|
|
2330
|
+
windowDays: number;
|
|
2331
|
+
/** ISO date the response was built. */
|
|
2332
|
+
asOf: string;
|
|
2333
|
+
/** Firms with at least one note **or** one rating action in the window. */
|
|
2334
|
+
firmCount: number;
|
|
2335
|
+
/**
|
|
2336
|
+
* How many of `firmCount` appear on a rating action alone. Firms that published a
|
|
2337
|
+
* target are `firmCount - ratingOnlyFirmCount`.
|
|
2338
|
+
*/
|
|
2339
|
+
ratingOnlyFirmCount: number;
|
|
2340
|
+
/**
|
|
2341
|
+
* The same firms split by the tier of their current rating. A different population from
|
|
2342
|
+
* `strongBuy`..`strongSell` on the consensus endpoint, which report the provider's
|
|
2343
|
+
* analyst survey rather than the firms in this book, so do not reconcile the two.
|
|
2344
|
+
*/
|
|
2345
|
+
ratingBuckets?: AnalystRatingBuckets;
|
|
2346
|
+
namedAnalystCount: number;
|
|
2347
|
+
noteCount: number;
|
|
2348
|
+
/** Notes that name an individual. */
|
|
2349
|
+
attributedNoteCount: number;
|
|
2350
|
+
/** Notes that name no individual. */
|
|
2351
|
+
unattributedNoteCount: number;
|
|
2352
|
+
/** Plain-language statement of what an absent name means. */
|
|
2353
|
+
attributionNote: string;
|
|
2354
|
+
/** Firm rows, most recently active first. PRO: all. FREE: 5. */
|
|
2355
|
+
coverage: AnalystCoverageFirm[];
|
|
2356
|
+
}
|
|
2357
|
+
/** One firm an analyst has published under. */
|
|
2358
|
+
interface AnalystFirmTenure {
|
|
2359
|
+
firm: string;
|
|
2360
|
+
/** ISO date of the earliest note we hold from this analyst at this firm. */
|
|
2361
|
+
firstSeen: string;
|
|
2362
|
+
/** ISO date of the most recent one. */
|
|
2363
|
+
lastSeen: string;
|
|
2364
|
+
mostRecent: boolean;
|
|
2365
|
+
}
|
|
2366
|
+
/** One ticker in an analyst's coverage book. */
|
|
2367
|
+
interface AnalystCoverageBookEntry {
|
|
2368
|
+
ticker: string;
|
|
2369
|
+
noteCount: number;
|
|
2370
|
+
firstNote: string | null;
|
|
2371
|
+
lastNote: string | null;
|
|
2372
|
+
latestPriceTarget: number | null;
|
|
2373
|
+
latestFirm: string | null;
|
|
2374
|
+
}
|
|
2375
|
+
interface AnalystProfile {
|
|
2376
|
+
slug: string;
|
|
2377
|
+
name: string;
|
|
2378
|
+
/** `"sell_side_equity"` */
|
|
2379
|
+
role: string;
|
|
2380
|
+
/** Where this analyst last published, which is not necessarily where they work today. */
|
|
2381
|
+
mostRecentFirm: string | null;
|
|
2382
|
+
firms: AnalystFirmTenure[];
|
|
2383
|
+
firstSeen: string | null;
|
|
2384
|
+
lastSeen: string | null;
|
|
2385
|
+
/** Price target notes attributed to this analyst. */
|
|
2386
|
+
noteCount: number;
|
|
2387
|
+
/** Distinct tickers covered. */
|
|
2388
|
+
tickerCount: number;
|
|
2389
|
+
/** PRO: the full book. FREE: the 5 most recently covered tickers. */
|
|
2390
|
+
coverage: AnalystCoverageBookEntry[];
|
|
2391
|
+
}
|
|
2392
|
+
/** One row of an analyst's call history. */
|
|
2393
|
+
interface AnalystCall {
|
|
2394
|
+
/** ISO date the note was published, `"YYYY-MM-DD"`. Day granularity on purpose. */
|
|
2395
|
+
publishedDate: string;
|
|
2396
|
+
ticker: string;
|
|
2397
|
+
/** The firm this analyst published under at the time. */
|
|
2398
|
+
firm: string;
|
|
2399
|
+
priceTarget: number | null;
|
|
2400
|
+
adjPriceTarget: number | null;
|
|
2401
|
+
priceWhenPosted: number | null;
|
|
2402
|
+
newsTitle: string | null;
|
|
2403
|
+
newsUrl: string | null;
|
|
2404
|
+
newsPublisher: string | null;
|
|
2405
|
+
}
|
|
2406
|
+
interface GetAnalystCoverageOptions {
|
|
2407
|
+
/**
|
|
2408
|
+
* Coverage window in days, 1 to 1825. Omitted, the API applies its own default of
|
|
2409
|
+
* 365. Values above the cap are clamped rather than rejected, and `data.windowDays`
|
|
2410
|
+
* reports the window actually applied.
|
|
2411
|
+
*/
|
|
2412
|
+
lookbackDays?: number;
|
|
2413
|
+
}
|
|
2414
|
+
interface GetAnalystCallsOptions {
|
|
2415
|
+
/** Page size, 1 to 200. Omitted, the API applies its own default of 25. */
|
|
2416
|
+
limit?: number;
|
|
2417
|
+
/** Rows to skip. Omitted, the API starts at 0. */
|
|
2418
|
+
offset?: number;
|
|
2419
|
+
}
|
|
2121
2420
|
/**
|
|
2122
2421
|
* Wall Street analyst coverage: aggregate price targets, recommendation distribution,
|
|
2123
2422
|
* recent upgrade/downgrade actions, and forward EPS estimates with earnings surprise history.
|
|
@@ -2149,6 +2448,75 @@ declare class Analyst {
|
|
|
2149
2448
|
* Free users receive the 5 most recent.
|
|
2150
2449
|
*/
|
|
2151
2450
|
marketActivity(options?: GetAnalystMarketActivityOptions): Promise<PreviewResponse<AnalystAction[]>>;
|
|
2451
|
+
/**
|
|
2452
|
+
* Get who covers a ticker and what they most recently said, grouped by firm, most
|
|
2453
|
+
* recently active firm first.
|
|
2454
|
+
*
|
|
2455
|
+
* This is the one-call answer to "who covers AMD and what do they say". Each row in
|
|
2456
|
+
* `data.coverage` is a firm, the individual analysts we can name on that firm's desk,
|
|
2457
|
+
* that firm's most recent price target note, and that firm's most recent rating action.
|
|
2458
|
+
*
|
|
2459
|
+
* A PRO key receives every firm. A FREE key receives the 5 most recently active firms
|
|
2460
|
+
* with every response-level count intact, so the counts describe the full window even
|
|
2461
|
+
* when the rows do not.
|
|
2462
|
+
*
|
|
2463
|
+
* Two shapes to read rather than assume. **A firm can cover a stock without publishing
|
|
2464
|
+
* a price target**, because coverage means a note or a rating action in the window: that
|
|
2465
|
+
* row carries `noteCount: 0`, a `null` `latestNote` and a populated `firmRating`, so
|
|
2466
|
+
* read `noteCount` on the row instead of expecting a note. And **not every note names
|
|
2467
|
+
* its analyst**, at a rate that is a property of the publisher and varies enormously by
|
|
2468
|
+
* ticker, so a firm can appear with an empty `analysts` array and a non-zero
|
|
2469
|
+
* `noteCount`, and `latestNote.analyst` can be `null`. Read `attributedNoteCount` and
|
|
2470
|
+
* `unattributedNoteCount` off the response you received rather than hardcoding a rate.
|
|
2471
|
+
*
|
|
2472
|
+
* `firmRating` belongs to the firm, not to a person: rating actions are published at
|
|
2473
|
+
* firm level with no individual attached.
|
|
2474
|
+
*
|
|
2475
|
+
* Each named analyst carries the `slug` that addresses {@link profile} and
|
|
2476
|
+
* {@link calls}, so a coverage response is the natural entry point into a person.
|
|
2477
|
+
*/
|
|
2478
|
+
coverage(ticker: string, options?: GetAnalystCoverageOptions): Promise<PreviewResponse<AnalystCoverage>>;
|
|
2479
|
+
/**
|
|
2480
|
+
* Get one analyst: the firms they have published under, the window of notes we hold at
|
|
2481
|
+
* each, and the tickers they cover. Throws `NotFoundError` when the slug matches no
|
|
2482
|
+
* analyst.
|
|
2483
|
+
*
|
|
2484
|
+
* A PRO key receives the full book. A FREE key receives the profile with
|
|
2485
|
+
* `data.coverage` truncated to the 5 most recently covered tickers, and the envelope's
|
|
2486
|
+
* `totalCount` reporting how many there are in full.
|
|
2487
|
+
*
|
|
2488
|
+
* `firstSeen` and `lastSeen` are observation windows, not employment dates: they bound
|
|
2489
|
+
* the notes we hold from that analyst at that firm. `mostRecentFirm` says where they
|
|
2490
|
+
* last published, not where they work today. Do not render either as a hire or
|
|
2491
|
+
* departure date.
|
|
2492
|
+
*
|
|
2493
|
+
* This is call history, not a scorecard. There is no accuracy score, hit rate or
|
|
2494
|
+
* ranking here, and nothing in the response should be read as a rating of the person.
|
|
2495
|
+
*
|
|
2496
|
+
* @param slug Analyst slug, lowercased and hyphenated (e.g. `"dan-ives"`). You do not
|
|
2497
|
+
* have to guess one: every named analyst in a {@link coverage} response carries it.
|
|
2498
|
+
*/
|
|
2499
|
+
profile(slug: string): Promise<PreviewResponse<AnalystProfile>>;
|
|
2500
|
+
/**
|
|
2501
|
+
* Get one analyst's price target notes, newest first, paged. Throws `NotFoundError`
|
|
2502
|
+
* when the slug matches no analyst, which keeps "this analyst has published nothing we
|
|
2503
|
+
* hold" (an empty page) distinguishable from "this analyst does not exist".
|
|
2504
|
+
*
|
|
2505
|
+
* Ordered by published date descending with the row id as the final tie-break, a total
|
|
2506
|
+
* order, so walking the history with `offset` never drops or repeats a row. That
|
|
2507
|
+
* matters more than it looks: a single roundup article carries several of one analyst's
|
|
2508
|
+
* notes at an identical timestamp.
|
|
2509
|
+
*
|
|
2510
|
+
* A FREE key receives the first 25 rows as a complete response (`isPreview: false`);
|
|
2511
|
+
* asking for a larger `limit` or an `offset` past row 25 returns the free in-allowance
|
|
2512
|
+
* slice with `previewReason: "PRO_REQUIRED"`. A PRO key pages the whole history. The
|
|
2513
|
+
* envelope's `totalCount` is the analyst's whole attributed history rather than the page
|
|
2514
|
+
* size, so `offset + data.length < totalCount` tells you another page is available.
|
|
2515
|
+
*
|
|
2516
|
+
* Dates are day granularity on purpose. Publisher timestamps are not comparable across
|
|
2517
|
+
* sources, so a time of day would advertise precision the data does not have.
|
|
2518
|
+
*/
|
|
2519
|
+
calls(slug: string, options?: GetAnalystCallsOptions): Promise<PreviewResponse<AnalystCall[]>>;
|
|
2152
2520
|
}
|
|
2153
2521
|
|
|
2154
2522
|
declare class Calendar {
|
|
@@ -2267,6 +2635,12 @@ interface EtfInfo {
|
|
|
2267
2635
|
issuer: string | null;
|
|
2268
2636
|
trackedIndex: string | null;
|
|
2269
2637
|
assetClass: string | null;
|
|
2638
|
+
/**
|
|
2639
|
+
* Curated landscape card image for the fund, suitable for a list row or a
|
|
2640
|
+
* profile header. Distinct from a square logo mark. Null when the fund has no
|
|
2641
|
+
* curated image assigned.
|
|
2642
|
+
*/
|
|
2643
|
+
imageUrl: string | null;
|
|
2270
2644
|
}
|
|
2271
2645
|
interface EtfHolding {
|
|
2272
2646
|
ticker: string;
|
|
@@ -2972,6 +3346,36 @@ declare class Stocks {
|
|
|
2972
3346
|
* years, so it can answer with nearly the same series as `"2y"`.
|
|
2973
3347
|
*/
|
|
2974
3348
|
getOptionsHistory(ticker: string, options?: GetOptionsHistoryOptions): Promise<PreviewResponse<OptionsHistory>>;
|
|
3349
|
+
/**
|
|
3350
|
+
* Get the SentiSense Rating for one stock: where it ranks against the other stocks rated
|
|
3351
|
+
* that day, and the six dimensions the rank is blended from.
|
|
3352
|
+
*
|
|
3353
|
+
* The Rating is a *relative*, automatically generated research signal, for informational
|
|
3354
|
+
* and educational purposes only. It ranks a stock against its cross-section; it is not
|
|
3355
|
+
* financial, investment or trading advice and it is not a recommendation about any
|
|
3356
|
+
* security. `disclaimer` carries the wording to display alongside a grade. Methodology:
|
|
3357
|
+
* https://sentisense.ai/methodology/#sentisense-rating
|
|
3358
|
+
*
|
|
3359
|
+
* **A discriminated union on `rated`.** `if (rating.rated)` narrows to `letter`,
|
|
3360
|
+
* `percentile`, `composite`, `ratedCount` and `methodologyVersion`; the `else` branch
|
|
3361
|
+
* narrows to `reason`, `dimensionsPresent` and `presentDimensions`. Branch on the flag
|
|
3362
|
+
* rather than testing a field for `undefined`.
|
|
3363
|
+
*
|
|
3364
|
+
* **Having no grade is a normal 200, not a 404.** ETFs and tickers outside the swept
|
|
3365
|
+
* universe answer with `rated` false, and the composition still arrives so a card can
|
|
3366
|
+
* render. Only a ticker that resolves to nothing we track rejects with
|
|
3367
|
+
* {@link NotFoundError}; a request with no usable key rejects with
|
|
3368
|
+
* {@link AuthenticationError}.
|
|
3369
|
+
*
|
|
3370
|
+
* `dimensions` always holds all six rows in a fixed order, including the ones with no
|
|
3371
|
+
* data, which arrive with `present` false and a `null` percentile. Read `present` first
|
|
3372
|
+
* and never read a missing percentile as zero. `letter` is served as stored rather than
|
|
3373
|
+
* derived from `percentile`, so read it instead of computing your own bucket edges.
|
|
3374
|
+
*
|
|
3375
|
+
* For the daily history of a stock's percentile, ask `client.entityMetrics.getMetrics`
|
|
3376
|
+
* for the `sentisense_rating` metric.
|
|
3377
|
+
*/
|
|
3378
|
+
getRating(ticker: string): Promise<StockRating>;
|
|
2975
3379
|
}
|
|
2976
3380
|
|
|
2977
3381
|
/**
|
|
@@ -3128,6 +3532,6 @@ declare class APIError extends SentiSenseError {
|
|
|
3128
3532
|
constructor(message: string, status: number, code?: string);
|
|
3129
3533
|
}
|
|
3130
3534
|
|
|
3131
|
-
declare const VERSION = "0.
|
|
3535
|
+
declare const VERSION = "0.50.0";
|
|
3132
3536
|
|
|
3133
|
-
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 EarningsKpiHighlight, type EarningsQuarter, type EarningsSource, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRecentEarningsOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, 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 OptionsAggregate, type OptionsContext, type OptionsHistory, type OptionsHistoryWindow, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, RateLimitError, type RecentEarningsEntry, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, 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 StockSocialDominance, 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 };
|
|
3537
|
+
export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystConsensus, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, 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 EarningsKpiHighlight, type EarningsQuarter, type EarningsSource, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCallsOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRecentEarningsOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, 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 OptionsAggregate, type OptionsContext, type OptionsHistory, type OptionsHistoryWindow, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, RateLimitError, type RatedStockRating, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, 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 StockRating, type StockSocialDominance, 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, type UnratedStockRating, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
|