sentisense 0.47.2 → 0.49.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 +33 -0
- package/dist/cli.cjs +84 -1
- package/dist/index.cjs +84 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +225 -2
- package/dist/index.d.ts +225 -2
- package/dist/index.mjs +84 -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 {
|
|
@@ -2118,6 +2125,147 @@ interface GetAnalystMarketActivityOptions {
|
|
|
2118
2125
|
/** Days of history to return. Default 30. */
|
|
2119
2126
|
lookbackDays?: number;
|
|
2120
2127
|
}
|
|
2128
|
+
/** One price target note. */
|
|
2129
|
+
interface AnalystNote {
|
|
2130
|
+
/** ISO date the note was published, `"YYYY-MM-DD"`. */
|
|
2131
|
+
publishedDate: string;
|
|
2132
|
+
/**
|
|
2133
|
+
* The individual named on the note, or `null` when the report named nobody.
|
|
2134
|
+
* Absent means the report did not identify one, never that the note did not happen.
|
|
2135
|
+
*/
|
|
2136
|
+
analyst: string | null;
|
|
2137
|
+
priceTarget: number | null;
|
|
2138
|
+
adjPriceTarget: number | null;
|
|
2139
|
+
priceWhenPosted: number | null;
|
|
2140
|
+
newsTitle: string | null;
|
|
2141
|
+
newsUrl: string | null;
|
|
2142
|
+
newsPublisher: string | null;
|
|
2143
|
+
}
|
|
2144
|
+
/** A firm's most recent rating action. Published at firm level, with no individual attached. */
|
|
2145
|
+
interface AnalystFirmRating {
|
|
2146
|
+
rating: string | null;
|
|
2147
|
+
priorRating: string | null;
|
|
2148
|
+
/** UPGRADE, DOWNGRADE, INITIATE, REITERATE, OTHER */
|
|
2149
|
+
actionType: string | null;
|
|
2150
|
+
/** ISO date of the action, `"YYYY-MM-DD"`. */
|
|
2151
|
+
date: string | null;
|
|
2152
|
+
}
|
|
2153
|
+
/** A named analyst on a firm's desk, as it appears on a coverage row. */
|
|
2154
|
+
interface AnalystCoverageAnalyst {
|
|
2155
|
+
/**
|
|
2156
|
+
* Addresses `analyst.profile(slug)` and `analyst.calls(slug)`. `null` for a named
|
|
2157
|
+
* analyst we hold no profile for; the row keeps the `name` rather than being dropped.
|
|
2158
|
+
*/
|
|
2159
|
+
slug: string | null;
|
|
2160
|
+
name: string;
|
|
2161
|
+
noteCount: number;
|
|
2162
|
+
firstNote: string | null;
|
|
2163
|
+
lastNote: string | null;
|
|
2164
|
+
latestPriceTarget: number | null;
|
|
2165
|
+
}
|
|
2166
|
+
/** One firm covering the ticker. */
|
|
2167
|
+
interface AnalystCoverageFirm {
|
|
2168
|
+
firm: string;
|
|
2169
|
+
/** Individuals we can name on this desk. Possibly empty: not every note names one. */
|
|
2170
|
+
analysts: AnalystCoverageAnalyst[];
|
|
2171
|
+
/** This firm's price target notes in the window. `0` on a rating-only firm. */
|
|
2172
|
+
noteCount: number;
|
|
2173
|
+
attributedNoteCount: number;
|
|
2174
|
+
unattributedNoteCount: number;
|
|
2175
|
+
/** ISO dates bounding this firm's notes. `null` on a rating-only firm. */
|
|
2176
|
+
firstNote: string | null;
|
|
2177
|
+
lastNote: string | null;
|
|
2178
|
+
/** The firm's most recent note. `null` on a rating-only firm, so read `noteCount` first. */
|
|
2179
|
+
latestNote: AnalystNote | null;
|
|
2180
|
+
firmRating: AnalystFirmRating | null;
|
|
2181
|
+
}
|
|
2182
|
+
interface AnalystCoverage {
|
|
2183
|
+
ticker: string;
|
|
2184
|
+
/** Window actually applied after clamping, in days. */
|
|
2185
|
+
windowDays: number;
|
|
2186
|
+
/** ISO date the response was built. */
|
|
2187
|
+
asOf: string;
|
|
2188
|
+
/** Firms with at least one note **or** one rating action in the window. */
|
|
2189
|
+
firmCount: number;
|
|
2190
|
+
/**
|
|
2191
|
+
* How many of `firmCount` appear on a rating action alone. Firms that published a
|
|
2192
|
+
* target are `firmCount - ratingOnlyFirmCount`.
|
|
2193
|
+
*/
|
|
2194
|
+
ratingOnlyFirmCount: number;
|
|
2195
|
+
namedAnalystCount: number;
|
|
2196
|
+
noteCount: number;
|
|
2197
|
+
/** Notes that name an individual. */
|
|
2198
|
+
attributedNoteCount: number;
|
|
2199
|
+
/** Notes that name no individual. */
|
|
2200
|
+
unattributedNoteCount: number;
|
|
2201
|
+
/** Plain-language statement of what an absent name means. */
|
|
2202
|
+
attributionNote: string;
|
|
2203
|
+
/** Firm rows, most recently active first. PRO: all. FREE: 5. */
|
|
2204
|
+
coverage: AnalystCoverageFirm[];
|
|
2205
|
+
}
|
|
2206
|
+
/** One firm an analyst has published under. */
|
|
2207
|
+
interface AnalystFirmTenure {
|
|
2208
|
+
firm: string;
|
|
2209
|
+
/** ISO date of the earliest note we hold from this analyst at this firm. */
|
|
2210
|
+
firstSeen: string;
|
|
2211
|
+
/** ISO date of the most recent one. */
|
|
2212
|
+
lastSeen: string;
|
|
2213
|
+
mostRecent: boolean;
|
|
2214
|
+
}
|
|
2215
|
+
/** One ticker in an analyst's coverage book. */
|
|
2216
|
+
interface AnalystCoverageBookEntry {
|
|
2217
|
+
ticker: string;
|
|
2218
|
+
noteCount: number;
|
|
2219
|
+
firstNote: string | null;
|
|
2220
|
+
lastNote: string | null;
|
|
2221
|
+
latestPriceTarget: number | null;
|
|
2222
|
+
latestFirm: string | null;
|
|
2223
|
+
}
|
|
2224
|
+
interface AnalystProfile {
|
|
2225
|
+
slug: string;
|
|
2226
|
+
name: string;
|
|
2227
|
+
/** `"sell_side_equity"` */
|
|
2228
|
+
role: string;
|
|
2229
|
+
/** Where this analyst last published, which is not necessarily where they work today. */
|
|
2230
|
+
mostRecentFirm: string | null;
|
|
2231
|
+
firms: AnalystFirmTenure[];
|
|
2232
|
+
firstSeen: string | null;
|
|
2233
|
+
lastSeen: string | null;
|
|
2234
|
+
/** Price target notes attributed to this analyst. */
|
|
2235
|
+
noteCount: number;
|
|
2236
|
+
/** Distinct tickers covered. */
|
|
2237
|
+
tickerCount: number;
|
|
2238
|
+
/** PRO: the full book. FREE: the 5 most recently covered tickers. */
|
|
2239
|
+
coverage: AnalystCoverageBookEntry[];
|
|
2240
|
+
}
|
|
2241
|
+
/** One row of an analyst's call history. */
|
|
2242
|
+
interface AnalystCall {
|
|
2243
|
+
/** ISO date the note was published, `"YYYY-MM-DD"`. Day granularity on purpose. */
|
|
2244
|
+
publishedDate: string;
|
|
2245
|
+
ticker: string;
|
|
2246
|
+
/** The firm this analyst published under at the time. */
|
|
2247
|
+
firm: string;
|
|
2248
|
+
priceTarget: number | null;
|
|
2249
|
+
adjPriceTarget: number | null;
|
|
2250
|
+
priceWhenPosted: number | null;
|
|
2251
|
+
newsTitle: string | null;
|
|
2252
|
+
newsUrl: string | null;
|
|
2253
|
+
newsPublisher: string | null;
|
|
2254
|
+
}
|
|
2255
|
+
interface GetAnalystCoverageOptions {
|
|
2256
|
+
/**
|
|
2257
|
+
* Coverage window in days, 1 to 1825. Omitted, the API applies its own default of
|
|
2258
|
+
* 365. Values above the cap are clamped rather than rejected, and `data.windowDays`
|
|
2259
|
+
* reports the window actually applied.
|
|
2260
|
+
*/
|
|
2261
|
+
lookbackDays?: number;
|
|
2262
|
+
}
|
|
2263
|
+
interface GetAnalystCallsOptions {
|
|
2264
|
+
/** Page size, 1 to 200. Omitted, the API applies its own default of 25. */
|
|
2265
|
+
limit?: number;
|
|
2266
|
+
/** Rows to skip. Omitted, the API starts at 0. */
|
|
2267
|
+
offset?: number;
|
|
2268
|
+
}
|
|
2121
2269
|
/**
|
|
2122
2270
|
* Wall Street analyst coverage: aggregate price targets, recommendation distribution,
|
|
2123
2271
|
* recent upgrade/downgrade actions, and forward EPS estimates with earnings surprise history.
|
|
@@ -2149,6 +2297,75 @@ declare class Analyst {
|
|
|
2149
2297
|
* Free users receive the 5 most recent.
|
|
2150
2298
|
*/
|
|
2151
2299
|
marketActivity(options?: GetAnalystMarketActivityOptions): Promise<PreviewResponse<AnalystAction[]>>;
|
|
2300
|
+
/**
|
|
2301
|
+
* Get who covers a ticker and what they most recently said, grouped by firm, most
|
|
2302
|
+
* recently active firm first.
|
|
2303
|
+
*
|
|
2304
|
+
* This is the one-call answer to "who covers AMD and what do they say". Each row in
|
|
2305
|
+
* `data.coverage` is a firm, the individual analysts we can name on that firm's desk,
|
|
2306
|
+
* that firm's most recent price target note, and that firm's most recent rating action.
|
|
2307
|
+
*
|
|
2308
|
+
* A PRO key receives every firm. A FREE key receives the 5 most recently active firms
|
|
2309
|
+
* with every response-level count intact, so the counts describe the full window even
|
|
2310
|
+
* when the rows do not.
|
|
2311
|
+
*
|
|
2312
|
+
* Two shapes to read rather than assume. **A firm can cover a stock without publishing
|
|
2313
|
+
* a price target**, because coverage means a note or a rating action in the window: that
|
|
2314
|
+
* row carries `noteCount: 0`, a `null` `latestNote` and a populated `firmRating`, so
|
|
2315
|
+
* read `noteCount` on the row instead of expecting a note. And **not every note names
|
|
2316
|
+
* its analyst**, at a rate that is a property of the publisher and varies enormously by
|
|
2317
|
+
* ticker, so a firm can appear with an empty `analysts` array and a non-zero
|
|
2318
|
+
* `noteCount`, and `latestNote.analyst` can be `null`. Read `attributedNoteCount` and
|
|
2319
|
+
* `unattributedNoteCount` off the response you received rather than hardcoding a rate.
|
|
2320
|
+
*
|
|
2321
|
+
* `firmRating` belongs to the firm, not to a person: rating actions are published at
|
|
2322
|
+
* firm level with no individual attached.
|
|
2323
|
+
*
|
|
2324
|
+
* Each named analyst carries the `slug` that addresses {@link profile} and
|
|
2325
|
+
* {@link calls}, so a coverage response is the natural entry point into a person.
|
|
2326
|
+
*/
|
|
2327
|
+
coverage(ticker: string, options?: GetAnalystCoverageOptions): Promise<PreviewResponse<AnalystCoverage>>;
|
|
2328
|
+
/**
|
|
2329
|
+
* Get one analyst: the firms they have published under, the window of notes we hold at
|
|
2330
|
+
* each, and the tickers they cover. Throws `NotFoundError` when the slug matches no
|
|
2331
|
+
* analyst.
|
|
2332
|
+
*
|
|
2333
|
+
* A PRO key receives the full book. A FREE key receives the profile with
|
|
2334
|
+
* `data.coverage` truncated to the 5 most recently covered tickers, and the envelope's
|
|
2335
|
+
* `totalCount` reporting how many there are in full.
|
|
2336
|
+
*
|
|
2337
|
+
* `firstSeen` and `lastSeen` are observation windows, not employment dates: they bound
|
|
2338
|
+
* the notes we hold from that analyst at that firm. `mostRecentFirm` says where they
|
|
2339
|
+
* last published, not where they work today. Do not render either as a hire or
|
|
2340
|
+
* departure date.
|
|
2341
|
+
*
|
|
2342
|
+
* This is call history, not a scorecard. There is no accuracy score, hit rate or
|
|
2343
|
+
* ranking here, and nothing in the response should be read as a rating of the person.
|
|
2344
|
+
*
|
|
2345
|
+
* @param slug Analyst slug, lowercased and hyphenated (e.g. `"dan-ives"`). You do not
|
|
2346
|
+
* have to guess one: every named analyst in a {@link coverage} response carries it.
|
|
2347
|
+
*/
|
|
2348
|
+
profile(slug: string): Promise<PreviewResponse<AnalystProfile>>;
|
|
2349
|
+
/**
|
|
2350
|
+
* Get one analyst's price target notes, newest first, paged. Throws `NotFoundError`
|
|
2351
|
+
* when the slug matches no analyst, which keeps "this analyst has published nothing we
|
|
2352
|
+
* hold" (an empty page) distinguishable from "this analyst does not exist".
|
|
2353
|
+
*
|
|
2354
|
+
* Ordered by published date descending with the row id as the final tie-break, a total
|
|
2355
|
+
* order, so walking the history with `offset` never drops or repeats a row. That
|
|
2356
|
+
* matters more than it looks: a single roundup article carries several of one analyst's
|
|
2357
|
+
* notes at an identical timestamp.
|
|
2358
|
+
*
|
|
2359
|
+
* A FREE key receives the first 25 rows as a complete response (`isPreview: false`);
|
|
2360
|
+
* asking for a larger `limit` or an `offset` past row 25 returns the free in-allowance
|
|
2361
|
+
* slice with `previewReason: "PRO_REQUIRED"`. A PRO key pages the whole history. The
|
|
2362
|
+
* envelope's `totalCount` is the analyst's whole attributed history rather than the page
|
|
2363
|
+
* size, so `offset + data.length < totalCount` tells you another page is available.
|
|
2364
|
+
*
|
|
2365
|
+
* Dates are day granularity on purpose. Publisher timestamps are not comparable across
|
|
2366
|
+
* sources, so a time of day would advertise precision the data does not have.
|
|
2367
|
+
*/
|
|
2368
|
+
calls(slug: string, options?: GetAnalystCallsOptions): Promise<PreviewResponse<AnalystCall[]>>;
|
|
2152
2369
|
}
|
|
2153
2370
|
|
|
2154
2371
|
declare class Calendar {
|
|
@@ -2267,6 +2484,12 @@ interface EtfInfo {
|
|
|
2267
2484
|
issuer: string | null;
|
|
2268
2485
|
trackedIndex: string | null;
|
|
2269
2486
|
assetClass: string | null;
|
|
2487
|
+
/**
|
|
2488
|
+
* Curated landscape card image for the fund, suitable for a list row or a
|
|
2489
|
+
* profile header. Distinct from a square logo mark. Null when the fund has no
|
|
2490
|
+
* curated image assigned.
|
|
2491
|
+
*/
|
|
2492
|
+
imageUrl: string | null;
|
|
2270
2493
|
}
|
|
2271
2494
|
interface EtfHolding {
|
|
2272
2495
|
ticker: string;
|
|
@@ -3128,6 +3351,6 @@ declare class APIError extends SentiSenseError {
|
|
|
3128
3351
|
constructor(message: string, status: number, code?: string);
|
|
3129
3352
|
}
|
|
3130
3353
|
|
|
3131
|
-
declare const VERSION = "0.
|
|
3354
|
+
declare const VERSION = "0.49.0";
|
|
3132
3355
|
|
|
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 };
|
|
3356
|
+
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 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 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 };
|
package/dist/index.d.ts
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 {
|
|
@@ -2118,6 +2125,147 @@ interface GetAnalystMarketActivityOptions {
|
|
|
2118
2125
|
/** Days of history to return. Default 30. */
|
|
2119
2126
|
lookbackDays?: number;
|
|
2120
2127
|
}
|
|
2128
|
+
/** One price target note. */
|
|
2129
|
+
interface AnalystNote {
|
|
2130
|
+
/** ISO date the note was published, `"YYYY-MM-DD"`. */
|
|
2131
|
+
publishedDate: string;
|
|
2132
|
+
/**
|
|
2133
|
+
* The individual named on the note, or `null` when the report named nobody.
|
|
2134
|
+
* Absent means the report did not identify one, never that the note did not happen.
|
|
2135
|
+
*/
|
|
2136
|
+
analyst: string | null;
|
|
2137
|
+
priceTarget: number | null;
|
|
2138
|
+
adjPriceTarget: number | null;
|
|
2139
|
+
priceWhenPosted: number | null;
|
|
2140
|
+
newsTitle: string | null;
|
|
2141
|
+
newsUrl: string | null;
|
|
2142
|
+
newsPublisher: string | null;
|
|
2143
|
+
}
|
|
2144
|
+
/** A firm's most recent rating action. Published at firm level, with no individual attached. */
|
|
2145
|
+
interface AnalystFirmRating {
|
|
2146
|
+
rating: string | null;
|
|
2147
|
+
priorRating: string | null;
|
|
2148
|
+
/** UPGRADE, DOWNGRADE, INITIATE, REITERATE, OTHER */
|
|
2149
|
+
actionType: string | null;
|
|
2150
|
+
/** ISO date of the action, `"YYYY-MM-DD"`. */
|
|
2151
|
+
date: string | null;
|
|
2152
|
+
}
|
|
2153
|
+
/** A named analyst on a firm's desk, as it appears on a coverage row. */
|
|
2154
|
+
interface AnalystCoverageAnalyst {
|
|
2155
|
+
/**
|
|
2156
|
+
* Addresses `analyst.profile(slug)` and `analyst.calls(slug)`. `null` for a named
|
|
2157
|
+
* analyst we hold no profile for; the row keeps the `name` rather than being dropped.
|
|
2158
|
+
*/
|
|
2159
|
+
slug: string | null;
|
|
2160
|
+
name: string;
|
|
2161
|
+
noteCount: number;
|
|
2162
|
+
firstNote: string | null;
|
|
2163
|
+
lastNote: string | null;
|
|
2164
|
+
latestPriceTarget: number | null;
|
|
2165
|
+
}
|
|
2166
|
+
/** One firm covering the ticker. */
|
|
2167
|
+
interface AnalystCoverageFirm {
|
|
2168
|
+
firm: string;
|
|
2169
|
+
/** Individuals we can name on this desk. Possibly empty: not every note names one. */
|
|
2170
|
+
analysts: AnalystCoverageAnalyst[];
|
|
2171
|
+
/** This firm's price target notes in the window. `0` on a rating-only firm. */
|
|
2172
|
+
noteCount: number;
|
|
2173
|
+
attributedNoteCount: number;
|
|
2174
|
+
unattributedNoteCount: number;
|
|
2175
|
+
/** ISO dates bounding this firm's notes. `null` on a rating-only firm. */
|
|
2176
|
+
firstNote: string | null;
|
|
2177
|
+
lastNote: string | null;
|
|
2178
|
+
/** The firm's most recent note. `null` on a rating-only firm, so read `noteCount` first. */
|
|
2179
|
+
latestNote: AnalystNote | null;
|
|
2180
|
+
firmRating: AnalystFirmRating | null;
|
|
2181
|
+
}
|
|
2182
|
+
interface AnalystCoverage {
|
|
2183
|
+
ticker: string;
|
|
2184
|
+
/** Window actually applied after clamping, in days. */
|
|
2185
|
+
windowDays: number;
|
|
2186
|
+
/** ISO date the response was built. */
|
|
2187
|
+
asOf: string;
|
|
2188
|
+
/** Firms with at least one note **or** one rating action in the window. */
|
|
2189
|
+
firmCount: number;
|
|
2190
|
+
/**
|
|
2191
|
+
* How many of `firmCount` appear on a rating action alone. Firms that published a
|
|
2192
|
+
* target are `firmCount - ratingOnlyFirmCount`.
|
|
2193
|
+
*/
|
|
2194
|
+
ratingOnlyFirmCount: number;
|
|
2195
|
+
namedAnalystCount: number;
|
|
2196
|
+
noteCount: number;
|
|
2197
|
+
/** Notes that name an individual. */
|
|
2198
|
+
attributedNoteCount: number;
|
|
2199
|
+
/** Notes that name no individual. */
|
|
2200
|
+
unattributedNoteCount: number;
|
|
2201
|
+
/** Plain-language statement of what an absent name means. */
|
|
2202
|
+
attributionNote: string;
|
|
2203
|
+
/** Firm rows, most recently active first. PRO: all. FREE: 5. */
|
|
2204
|
+
coverage: AnalystCoverageFirm[];
|
|
2205
|
+
}
|
|
2206
|
+
/** One firm an analyst has published under. */
|
|
2207
|
+
interface AnalystFirmTenure {
|
|
2208
|
+
firm: string;
|
|
2209
|
+
/** ISO date of the earliest note we hold from this analyst at this firm. */
|
|
2210
|
+
firstSeen: string;
|
|
2211
|
+
/** ISO date of the most recent one. */
|
|
2212
|
+
lastSeen: string;
|
|
2213
|
+
mostRecent: boolean;
|
|
2214
|
+
}
|
|
2215
|
+
/** One ticker in an analyst's coverage book. */
|
|
2216
|
+
interface AnalystCoverageBookEntry {
|
|
2217
|
+
ticker: string;
|
|
2218
|
+
noteCount: number;
|
|
2219
|
+
firstNote: string | null;
|
|
2220
|
+
lastNote: string | null;
|
|
2221
|
+
latestPriceTarget: number | null;
|
|
2222
|
+
latestFirm: string | null;
|
|
2223
|
+
}
|
|
2224
|
+
interface AnalystProfile {
|
|
2225
|
+
slug: string;
|
|
2226
|
+
name: string;
|
|
2227
|
+
/** `"sell_side_equity"` */
|
|
2228
|
+
role: string;
|
|
2229
|
+
/** Where this analyst last published, which is not necessarily where they work today. */
|
|
2230
|
+
mostRecentFirm: string | null;
|
|
2231
|
+
firms: AnalystFirmTenure[];
|
|
2232
|
+
firstSeen: string | null;
|
|
2233
|
+
lastSeen: string | null;
|
|
2234
|
+
/** Price target notes attributed to this analyst. */
|
|
2235
|
+
noteCount: number;
|
|
2236
|
+
/** Distinct tickers covered. */
|
|
2237
|
+
tickerCount: number;
|
|
2238
|
+
/** PRO: the full book. FREE: the 5 most recently covered tickers. */
|
|
2239
|
+
coverage: AnalystCoverageBookEntry[];
|
|
2240
|
+
}
|
|
2241
|
+
/** One row of an analyst's call history. */
|
|
2242
|
+
interface AnalystCall {
|
|
2243
|
+
/** ISO date the note was published, `"YYYY-MM-DD"`. Day granularity on purpose. */
|
|
2244
|
+
publishedDate: string;
|
|
2245
|
+
ticker: string;
|
|
2246
|
+
/** The firm this analyst published under at the time. */
|
|
2247
|
+
firm: string;
|
|
2248
|
+
priceTarget: number | null;
|
|
2249
|
+
adjPriceTarget: number | null;
|
|
2250
|
+
priceWhenPosted: number | null;
|
|
2251
|
+
newsTitle: string | null;
|
|
2252
|
+
newsUrl: string | null;
|
|
2253
|
+
newsPublisher: string | null;
|
|
2254
|
+
}
|
|
2255
|
+
interface GetAnalystCoverageOptions {
|
|
2256
|
+
/**
|
|
2257
|
+
* Coverage window in days, 1 to 1825. Omitted, the API applies its own default of
|
|
2258
|
+
* 365. Values above the cap are clamped rather than rejected, and `data.windowDays`
|
|
2259
|
+
* reports the window actually applied.
|
|
2260
|
+
*/
|
|
2261
|
+
lookbackDays?: number;
|
|
2262
|
+
}
|
|
2263
|
+
interface GetAnalystCallsOptions {
|
|
2264
|
+
/** Page size, 1 to 200. Omitted, the API applies its own default of 25. */
|
|
2265
|
+
limit?: number;
|
|
2266
|
+
/** Rows to skip. Omitted, the API starts at 0. */
|
|
2267
|
+
offset?: number;
|
|
2268
|
+
}
|
|
2121
2269
|
/**
|
|
2122
2270
|
* Wall Street analyst coverage: aggregate price targets, recommendation distribution,
|
|
2123
2271
|
* recent upgrade/downgrade actions, and forward EPS estimates with earnings surprise history.
|
|
@@ -2149,6 +2297,75 @@ declare class Analyst {
|
|
|
2149
2297
|
* Free users receive the 5 most recent.
|
|
2150
2298
|
*/
|
|
2151
2299
|
marketActivity(options?: GetAnalystMarketActivityOptions): Promise<PreviewResponse<AnalystAction[]>>;
|
|
2300
|
+
/**
|
|
2301
|
+
* Get who covers a ticker and what they most recently said, grouped by firm, most
|
|
2302
|
+
* recently active firm first.
|
|
2303
|
+
*
|
|
2304
|
+
* This is the one-call answer to "who covers AMD and what do they say". Each row in
|
|
2305
|
+
* `data.coverage` is a firm, the individual analysts we can name on that firm's desk,
|
|
2306
|
+
* that firm's most recent price target note, and that firm's most recent rating action.
|
|
2307
|
+
*
|
|
2308
|
+
* A PRO key receives every firm. A FREE key receives the 5 most recently active firms
|
|
2309
|
+
* with every response-level count intact, so the counts describe the full window even
|
|
2310
|
+
* when the rows do not.
|
|
2311
|
+
*
|
|
2312
|
+
* Two shapes to read rather than assume. **A firm can cover a stock without publishing
|
|
2313
|
+
* a price target**, because coverage means a note or a rating action in the window: that
|
|
2314
|
+
* row carries `noteCount: 0`, a `null` `latestNote` and a populated `firmRating`, so
|
|
2315
|
+
* read `noteCount` on the row instead of expecting a note. And **not every note names
|
|
2316
|
+
* its analyst**, at a rate that is a property of the publisher and varies enormously by
|
|
2317
|
+
* ticker, so a firm can appear with an empty `analysts` array and a non-zero
|
|
2318
|
+
* `noteCount`, and `latestNote.analyst` can be `null`. Read `attributedNoteCount` and
|
|
2319
|
+
* `unattributedNoteCount` off the response you received rather than hardcoding a rate.
|
|
2320
|
+
*
|
|
2321
|
+
* `firmRating` belongs to the firm, not to a person: rating actions are published at
|
|
2322
|
+
* firm level with no individual attached.
|
|
2323
|
+
*
|
|
2324
|
+
* Each named analyst carries the `slug` that addresses {@link profile} and
|
|
2325
|
+
* {@link calls}, so a coverage response is the natural entry point into a person.
|
|
2326
|
+
*/
|
|
2327
|
+
coverage(ticker: string, options?: GetAnalystCoverageOptions): Promise<PreviewResponse<AnalystCoverage>>;
|
|
2328
|
+
/**
|
|
2329
|
+
* Get one analyst: the firms they have published under, the window of notes we hold at
|
|
2330
|
+
* each, and the tickers they cover. Throws `NotFoundError` when the slug matches no
|
|
2331
|
+
* analyst.
|
|
2332
|
+
*
|
|
2333
|
+
* A PRO key receives the full book. A FREE key receives the profile with
|
|
2334
|
+
* `data.coverage` truncated to the 5 most recently covered tickers, and the envelope's
|
|
2335
|
+
* `totalCount` reporting how many there are in full.
|
|
2336
|
+
*
|
|
2337
|
+
* `firstSeen` and `lastSeen` are observation windows, not employment dates: they bound
|
|
2338
|
+
* the notes we hold from that analyst at that firm. `mostRecentFirm` says where they
|
|
2339
|
+
* last published, not where they work today. Do not render either as a hire or
|
|
2340
|
+
* departure date.
|
|
2341
|
+
*
|
|
2342
|
+
* This is call history, not a scorecard. There is no accuracy score, hit rate or
|
|
2343
|
+
* ranking here, and nothing in the response should be read as a rating of the person.
|
|
2344
|
+
*
|
|
2345
|
+
* @param slug Analyst slug, lowercased and hyphenated (e.g. `"dan-ives"`). You do not
|
|
2346
|
+
* have to guess one: every named analyst in a {@link coverage} response carries it.
|
|
2347
|
+
*/
|
|
2348
|
+
profile(slug: string): Promise<PreviewResponse<AnalystProfile>>;
|
|
2349
|
+
/**
|
|
2350
|
+
* Get one analyst's price target notes, newest first, paged. Throws `NotFoundError`
|
|
2351
|
+
* when the slug matches no analyst, which keeps "this analyst has published nothing we
|
|
2352
|
+
* hold" (an empty page) distinguishable from "this analyst does not exist".
|
|
2353
|
+
*
|
|
2354
|
+
* Ordered by published date descending with the row id as the final tie-break, a total
|
|
2355
|
+
* order, so walking the history with `offset` never drops or repeats a row. That
|
|
2356
|
+
* matters more than it looks: a single roundup article carries several of one analyst's
|
|
2357
|
+
* notes at an identical timestamp.
|
|
2358
|
+
*
|
|
2359
|
+
* A FREE key receives the first 25 rows as a complete response (`isPreview: false`);
|
|
2360
|
+
* asking for a larger `limit` or an `offset` past row 25 returns the free in-allowance
|
|
2361
|
+
* slice with `previewReason: "PRO_REQUIRED"`. A PRO key pages the whole history. The
|
|
2362
|
+
* envelope's `totalCount` is the analyst's whole attributed history rather than the page
|
|
2363
|
+
* size, so `offset + data.length < totalCount` tells you another page is available.
|
|
2364
|
+
*
|
|
2365
|
+
* Dates are day granularity on purpose. Publisher timestamps are not comparable across
|
|
2366
|
+
* sources, so a time of day would advertise precision the data does not have.
|
|
2367
|
+
*/
|
|
2368
|
+
calls(slug: string, options?: GetAnalystCallsOptions): Promise<PreviewResponse<AnalystCall[]>>;
|
|
2152
2369
|
}
|
|
2153
2370
|
|
|
2154
2371
|
declare class Calendar {
|
|
@@ -2267,6 +2484,12 @@ interface EtfInfo {
|
|
|
2267
2484
|
issuer: string | null;
|
|
2268
2485
|
trackedIndex: string | null;
|
|
2269
2486
|
assetClass: string | null;
|
|
2487
|
+
/**
|
|
2488
|
+
* Curated landscape card image for the fund, suitable for a list row or a
|
|
2489
|
+
* profile header. Distinct from a square logo mark. Null when the fund has no
|
|
2490
|
+
* curated image assigned.
|
|
2491
|
+
*/
|
|
2492
|
+
imageUrl: string | null;
|
|
2270
2493
|
}
|
|
2271
2494
|
interface EtfHolding {
|
|
2272
2495
|
ticker: string;
|
|
@@ -3128,6 +3351,6 @@ declare class APIError extends SentiSenseError {
|
|
|
3128
3351
|
constructor(message: string, status: number, code?: string);
|
|
3129
3352
|
}
|
|
3130
3353
|
|
|
3131
|
-
declare const VERSION = "0.
|
|
3354
|
+
declare const VERSION = "0.49.0";
|
|
3132
3355
|
|
|
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 };
|
|
3356
|
+
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 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 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -80,6 +80,89 @@ var Analyst = class {
|
|
|
80
80
|
async marketActivity(options) {
|
|
81
81
|
return this.client.get("/api/v1/analyst/activity", options);
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Get who covers a ticker and what they most recently said, grouped by firm, most
|
|
85
|
+
* recently active firm first.
|
|
86
|
+
*
|
|
87
|
+
* This is the one-call answer to "who covers AMD and what do they say". Each row in
|
|
88
|
+
* `data.coverage` is a firm, the individual analysts we can name on that firm's desk,
|
|
89
|
+
* that firm's most recent price target note, and that firm's most recent rating action.
|
|
90
|
+
*
|
|
91
|
+
* A PRO key receives every firm. A FREE key receives the 5 most recently active firms
|
|
92
|
+
* with every response-level count intact, so the counts describe the full window even
|
|
93
|
+
* when the rows do not.
|
|
94
|
+
*
|
|
95
|
+
* Two shapes to read rather than assume. **A firm can cover a stock without publishing
|
|
96
|
+
* a price target**, because coverage means a note or a rating action in the window: that
|
|
97
|
+
* row carries `noteCount: 0`, a `null` `latestNote` and a populated `firmRating`, so
|
|
98
|
+
* read `noteCount` on the row instead of expecting a note. And **not every note names
|
|
99
|
+
* its analyst**, at a rate that is a property of the publisher and varies enormously by
|
|
100
|
+
* ticker, so a firm can appear with an empty `analysts` array and a non-zero
|
|
101
|
+
* `noteCount`, and `latestNote.analyst` can be `null`. Read `attributedNoteCount` and
|
|
102
|
+
* `unattributedNoteCount` off the response you received rather than hardcoding a rate.
|
|
103
|
+
*
|
|
104
|
+
* `firmRating` belongs to the firm, not to a person: rating actions are published at
|
|
105
|
+
* firm level with no individual attached.
|
|
106
|
+
*
|
|
107
|
+
* Each named analyst carries the `slug` that addresses {@link profile} and
|
|
108
|
+
* {@link calls}, so a coverage response is the natural entry point into a person.
|
|
109
|
+
*/
|
|
110
|
+
async coverage(ticker, options) {
|
|
111
|
+
return this.client.get(
|
|
112
|
+
`/api/v1/analyst/${encodeURIComponent(ticker.toUpperCase())}/coverage`,
|
|
113
|
+
options
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get one analyst: the firms they have published under, the window of notes we hold at
|
|
118
|
+
* each, and the tickers they cover. Throws `NotFoundError` when the slug matches no
|
|
119
|
+
* analyst.
|
|
120
|
+
*
|
|
121
|
+
* A PRO key receives the full book. A FREE key receives the profile with
|
|
122
|
+
* `data.coverage` truncated to the 5 most recently covered tickers, and the envelope's
|
|
123
|
+
* `totalCount` reporting how many there are in full.
|
|
124
|
+
*
|
|
125
|
+
* `firstSeen` and `lastSeen` are observation windows, not employment dates: they bound
|
|
126
|
+
* the notes we hold from that analyst at that firm. `mostRecentFirm` says where they
|
|
127
|
+
* last published, not where they work today. Do not render either as a hire or
|
|
128
|
+
* departure date.
|
|
129
|
+
*
|
|
130
|
+
* This is call history, not a scorecard. There is no accuracy score, hit rate or
|
|
131
|
+
* ranking here, and nothing in the response should be read as a rating of the person.
|
|
132
|
+
*
|
|
133
|
+
* @param slug Analyst slug, lowercased and hyphenated (e.g. `"dan-ives"`). You do not
|
|
134
|
+
* have to guess one: every named analyst in a {@link coverage} response carries it.
|
|
135
|
+
*/
|
|
136
|
+
async profile(slug) {
|
|
137
|
+
return this.client.get(
|
|
138
|
+
`/api/v1/analyst/people/${encodeURIComponent(slug)}`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Get one analyst's price target notes, newest first, paged. Throws `NotFoundError`
|
|
143
|
+
* when the slug matches no analyst, which keeps "this analyst has published nothing we
|
|
144
|
+
* hold" (an empty page) distinguishable from "this analyst does not exist".
|
|
145
|
+
*
|
|
146
|
+
* Ordered by published date descending with the row id as the final tie-break, a total
|
|
147
|
+
* order, so walking the history with `offset` never drops or repeats a row. That
|
|
148
|
+
* matters more than it looks: a single roundup article carries several of one analyst's
|
|
149
|
+
* notes at an identical timestamp.
|
|
150
|
+
*
|
|
151
|
+
* A FREE key receives the first 25 rows as a complete response (`isPreview: false`);
|
|
152
|
+
* asking for a larger `limit` or an `offset` past row 25 returns the free in-allowance
|
|
153
|
+
* slice with `previewReason: "PRO_REQUIRED"`. A PRO key pages the whole history. The
|
|
154
|
+
* envelope's `totalCount` is the analyst's whole attributed history rather than the page
|
|
155
|
+
* size, so `offset + data.length < totalCount` tells you another page is available.
|
|
156
|
+
*
|
|
157
|
+
* Dates are day granularity on purpose. Publisher timestamps are not comparable across
|
|
158
|
+
* sources, so a time of day would advertise precision the data does not have.
|
|
159
|
+
*/
|
|
160
|
+
async calls(slug, options) {
|
|
161
|
+
return this.client.get(
|
|
162
|
+
`/api/v1/analyst/people/${encodeURIComponent(slug)}/calls`,
|
|
163
|
+
options
|
|
164
|
+
);
|
|
165
|
+
}
|
|
83
166
|
};
|
|
84
167
|
|
|
85
168
|
// src/resources/calendar.ts
|
|
@@ -1066,7 +1149,7 @@ var Trackers = class {
|
|
|
1066
1149
|
};
|
|
1067
1150
|
|
|
1068
1151
|
// src/version.ts
|
|
1069
|
-
var VERSION = "0.
|
|
1152
|
+
var VERSION = "0.49.0";
|
|
1070
1153
|
|
|
1071
1154
|
// src/client.ts
|
|
1072
1155
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|