sentisense 0.74.0 → 0.76.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.mts CHANGED
@@ -181,6 +181,24 @@ interface SimilarStock {
181
181
  price: number | null;
182
182
  changePercent: number | null;
183
183
  }
184
+ /** One ETF that holds a given stock. Returned by `stocks.getEtfs`. */
185
+ interface EtfMembership {
186
+ /** The fund's ticker. */
187
+ etfTicker: string;
188
+ /** The fund's name; the fund ticker when no name is known. */
189
+ etfName: string;
190
+ /**
191
+ * The stock's weight in the fund as a percentage (0 to 100, so `7.1` means 7.1%). For a
192
+ * company with several listed share classes (GOOGL and GOOG, BRK.B and BRK.A) it is the
193
+ * combined weight of all the classes in that fund, and every class returns the same rows.
194
+ */
195
+ weightPct: number;
196
+ /**
197
+ * ISO date `YYYY-MM-DD` of this fund's holdings file. It is per fund, so rows in one
198
+ * response can carry different dates. May be absent.
199
+ */
200
+ asOfDate?: string;
201
+ }
184
202
  interface StockImage {
185
203
  iconUrl: string | null;
186
204
  logoUrl: string | null;
@@ -688,6 +706,10 @@ interface GetDescriptionsOptions {
688
706
  interface GetSimilarOptions {
689
707
  limit?: number;
690
708
  }
709
+ interface GetStockEtfsOptions {
710
+ /** Return at most this many rows. Omitted, 0 or negative returns every row. */
711
+ limit?: number;
712
+ }
691
713
  interface GetProfileOptions {
692
714
  forced?: boolean;
693
715
  }
@@ -3151,6 +3173,42 @@ interface TrackerListing {
3151
3173
  refreshIntervalSeconds: number;
3152
3174
  /** Canonical detail URL (e.g. `"/api/v1/trackers/institution-concentration"`). */
3153
3175
  canonicalUrl: string;
3176
+ /**
3177
+ * What this tracker accepts through `client.trackers.get(id, { filter })`: one entry per
3178
+ * key, each with the complete list of accepted values. Absent on a tracker with no filters.
3179
+ */
3180
+ filters?: TrackerFilter[];
3181
+ }
3182
+ /** One filter a tracker accepts, as listed by `client.trackers.list()`. */
3183
+ interface TrackerFilter {
3184
+ /** Filter name, e.g. `"state"`. */
3185
+ key: string;
3186
+ /** The complete list of accepted values, e.g. `["AZ", "FEDERAL", "TX"]`. */
3187
+ values: string[];
3188
+ }
3189
+ /**
3190
+ * Query parameters for `client.trackers.get()`. Each is optional and provider-specific;
3191
+ * other keys are passed through as query parameters.
3192
+ */
3193
+ interface TrackerGetParams {
3194
+ /**
3195
+ * Which universe a scoped tracker returns, e.g. `"nasdaq100"` for `market-heatmap`.
3196
+ * A value the tracker does not serve throws `APIError` with `code: "invalid_scope"`.
3197
+ */
3198
+ scope?: string;
3199
+ /**
3200
+ * For the institution rankings: overrides the default filer-category filter. Pass `""`
3201
+ * to open the universe across all categories.
3202
+ */
3203
+ category?: string;
3204
+ /**
3205
+ * Narrows a tracker that declares `filters`. An object such as
3206
+ * `{ state: "TX", category: "local" }` or the wire string `"state:TX,category:local"`.
3207
+ * An unknown key or value, or a filter on a tracker with none, throws `APIError` with
3208
+ * `status: 400` and `code: "invalid_filter"`.
3209
+ */
3210
+ filter?: string | Record<string, string>;
3211
+ [param: string]: string | number | boolean | Record<string, string> | undefined;
3154
3212
  }
3155
3213
  /** Discovery envelope returned by `client.trackers.list()`. */
3156
3214
  interface TrackerListResponse {
@@ -3170,6 +3228,20 @@ interface TrackerTableRow {
3170
3228
  url: string | null;
3171
3229
  /** Per-cell metric values; each carries its own label and unit. */
3172
3230
  metrics: TrackerMetricValue[];
3231
+ /** The stock symbol the row is about, when it is about one company. Absent otherwise. */
3232
+ ticker?: string;
3233
+ /** ISO calendar day (`YYYY-MM-DD`) a row's stated term ends. Absent when it has none. */
3234
+ endsDate?: string;
3235
+ /**
3236
+ * Two-letter state codes a record names (`data-center-moratoriums` company filings). A row
3237
+ * appears under a `state` filter for each of them. Absent when it names none.
3238
+ */
3239
+ statesNamed?: string[];
3240
+ /**
3241
+ * Any other named cell a tracker writes on the row, such as the `market-heatmap` columns
3242
+ * (`marketCap`, `changePercent`, ...).
3243
+ */
3244
+ [field: string]: unknown;
3173
3245
  }
3174
3246
  /**
3175
3247
  * A labeled quantitative reading attached to a row, geo region, or
@@ -5178,6 +5250,17 @@ declare class Stocks {
5178
5250
  getDescriptions(tickers: string[], options?: GetDescriptionsOptions): Promise<Record<string, StockProfile>>;
5179
5251
  /** Get peer/similar stocks. */
5180
5252
  getSimilar(ticker: string, options?: GetSimilarOptions): Promise<SimilarStock[]>;
5253
+ /**
5254
+ * List the ETFs that hold a stock, heaviest weight first.
5255
+ *
5256
+ * Resolves to a bare array (no preview envelope) on every tier, sorted by `weightPct`
5257
+ * descending, then `etfTicker` ascending. A ticker no tracked fund holds, or an unknown
5258
+ * ticker, resolves to `[]` rather than throwing. Only funds SentiSense tracks with a
5259
+ * holdings file are searched, and some funds' holdings are partial, so the list is not
5260
+ * every fund in the market. `ticker` is case-insensitive. Counts against the monthly
5261
+ * quota like other data endpoints.
5262
+ */
5263
+ getEtfs(ticker: string, options?: GetStockEtfsOptions): Promise<EtfMembership[]>;
5181
5264
  /** Get company profile (CEO, sector, industry, market data). */
5182
5265
  getProfile(ticker: string, options?: GetProfileOptions): Promise<StockProfile>;
5183
5266
  /**
@@ -5465,10 +5548,11 @@ declare class Trackers {
5465
5548
  * in your renderer.
5466
5549
  *
5467
5550
  * @param trackerId slug from {@link list}, e.g. `"institution-concentration"`.
5468
- * @param params provider-specific query params (e.g. `{ scope: "us" }` for
5469
- * geographically-scoped trackers like hantavirus). Unknown keys are ignored.
5551
+ * @param params provider-specific query params, e.g. `{ scope: "nasdaq100" }` for
5552
+ * `market-heatmap`, or `{ filter: { state: "TX" } }` for a tracker that lists
5553
+ * `filters`. A bad `filter` throws `APIError` with `code: "invalid_filter"`.
5470
5554
  */
5471
- get(trackerId: string, params?: Record<string, string | number | boolean>): Promise<TrackerSnapshotResponse>;
5555
+ get(trackerId: string, params?: TrackerGetParams): Promise<TrackerSnapshotResponse>;
5472
5556
  }
5473
5557
 
5474
5558
  /** @internal HTTP interface exposed to resource classes. */
@@ -5568,6 +5652,6 @@ declare class APIError extends SentiSenseError {
5568
5652
  constructor(message: string, status: number, code?: string);
5569
5653
  }
5570
5654
 
5571
- declare const VERSION = "0.74.0";
5655
+ declare const VERSION = "0.76.0";
5572
5656
 
5573
- export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystCalledItCall, type AnalystCalledItMove, type AnalystConsensus, type AnalystConsensusHistory, type AnalystConsensusHistoryPoint, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatePeriodType, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AnalystRef, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarlyFilers, type EarningsCalendarResponse, type EarningsEvent, type EarningsKpiHighlight, type EarningsOutcomeStatistics, type EarningsQuarter, type EarningsReaction, type EarningsReactionsResponse, type EarningsSource, type EarningsStatistics, type EarningsStatisticsBaseline, type EarningsStatisticsDeviation, type EarningsStatisticsThresholds, type EarningsStatisticsWindow, type EarningsSummariesResponse, type EntitySearchResult, type EntitySearchType, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfQuote, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type ExtendedHoursInfo, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCalledItOptions, type GetAnalystCallsOptions, type GetAnalystConsensusHistoryOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsStatisticsOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersHistoryOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetInstitutionDetailOptions, type GetInstitutionHistoryOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetOptionsIntradayHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetShortInterestOptions, type GetShortVolumeOptions, type GetStockGraphOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type GraphCounts, type GraphEdge, type GraphGroups, type GraphNode, type GraphProductFamily, type Holder, type HolderComparisonStatus, type HolderNotableChanges, type HoldersHistory, type HoldersHistoryQuarter, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionChangeFilter, type InstitutionChangeType, type InstitutionDetail, type InstitutionHistory, type InstitutionHistoryQuarter, type InstitutionHolding, type InstitutionList, type InstitutionListResponse, type InstitutionMatchTotals, type InstitutionPositionPoint, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type NotableHolder, type OptionsAggregate, type OptionsCapabilities, type OptionsContext, type OptionsHighlight, type OptionsHistory, type OptionsHistoryWindow, type OptionsIntradayBoardCapability, type OptionsIntradayFlow, type OptionsIntradayHistory, type OptionsIntradayPoint, type OptionsOiFollowUp, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type OwnershipSelection, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, type RankedEarnings, type RankedEarningsSection, type RankedReportedEarnings, type RankedUpcomingEarnings, RateLimitError, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type RiskAdjustment, type RiskCondition, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, type SearchEntitiesOptions, type SearchStoriesOptions, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShareClass, type ShortInterest, type ShortInterestDataPoint, type ShortVolume, type ShortVolumeDataPoint, type SimilarStock, type StockDetail, type StockEntity, type StockGraph, type StockImage, type StockNotRated, type StockPrice, type StockProfile, type StockQuote, type StockRating, type StockRatingResponse, type StockSocialDominance, type Story, type StoryCluster, type StoryTimelineEntry, TemporarilyUnavailableError, 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 };
5657
+ export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystCalledItCall, type AnalystCalledItMove, type AnalystConsensus, type AnalystConsensusHistory, type AnalystConsensusHistoryPoint, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatePeriodType, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AnalystRef, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarlyFilers, type EarningsCalendarResponse, type EarningsEvent, type EarningsKpiHighlight, type EarningsOutcomeStatistics, type EarningsQuarter, type EarningsReaction, type EarningsReactionsResponse, type EarningsSource, type EarningsStatistics, type EarningsStatisticsBaseline, type EarningsStatisticsDeviation, type EarningsStatisticsThresholds, type EarningsStatisticsWindow, type EarningsSummariesResponse, type EntitySearchResult, type EntitySearchType, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfMembership, type EtfQuote, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type ExtendedHoursInfo, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCalledItOptions, type GetAnalystCallsOptions, type GetAnalystConsensusHistoryOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsStatisticsOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersHistoryOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetInstitutionDetailOptions, type GetInstitutionHistoryOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetOptionsIntradayHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetShortInterestOptions, type GetShortVolumeOptions, type GetStockEtfsOptions, type GetStockGraphOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type GraphCounts, type GraphEdge, type GraphGroups, type GraphNode, type GraphProductFamily, type Holder, type HolderComparisonStatus, type HolderNotableChanges, type HoldersHistory, type HoldersHistoryQuarter, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionChangeFilter, type InstitutionChangeType, type InstitutionDetail, type InstitutionHistory, type InstitutionHistoryQuarter, type InstitutionHolding, type InstitutionList, type InstitutionListResponse, type InstitutionMatchTotals, type InstitutionPositionPoint, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type NotableHolder, type OptionsAggregate, type OptionsCapabilities, type OptionsContext, type OptionsHighlight, type OptionsHistory, type OptionsHistoryWindow, type OptionsIntradayBoardCapability, type OptionsIntradayFlow, type OptionsIntradayHistory, type OptionsIntradayPoint, type OptionsOiFollowUp, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type OwnershipSelection, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, type RankedEarnings, type RankedEarningsSection, type RankedReportedEarnings, type RankedUpcomingEarnings, RateLimitError, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type RiskAdjustment, type RiskCondition, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, type SearchEntitiesOptions, type SearchStoriesOptions, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShareClass, type ShortInterest, type ShortInterestDataPoint, type ShortVolume, type ShortVolumeDataPoint, type SimilarStock, type StockDetail, type StockEntity, type StockGraph, type StockImage, type StockNotRated, type StockPrice, type StockProfile, type StockQuote, type StockRating, type StockRatingResponse, type StockSocialDominance, type Story, type StoryCluster, type StoryTimelineEntry, TemporarilyUnavailableError, type TickerHolders, type TrackerEvent, type TrackerFilter, type TrackerGeoEntry, type TrackerGetParams, 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
@@ -181,6 +181,24 @@ interface SimilarStock {
181
181
  price: number | null;
182
182
  changePercent: number | null;
183
183
  }
184
+ /** One ETF that holds a given stock. Returned by `stocks.getEtfs`. */
185
+ interface EtfMembership {
186
+ /** The fund's ticker. */
187
+ etfTicker: string;
188
+ /** The fund's name; the fund ticker when no name is known. */
189
+ etfName: string;
190
+ /**
191
+ * The stock's weight in the fund as a percentage (0 to 100, so `7.1` means 7.1%). For a
192
+ * company with several listed share classes (GOOGL and GOOG, BRK.B and BRK.A) it is the
193
+ * combined weight of all the classes in that fund, and every class returns the same rows.
194
+ */
195
+ weightPct: number;
196
+ /**
197
+ * ISO date `YYYY-MM-DD` of this fund's holdings file. It is per fund, so rows in one
198
+ * response can carry different dates. May be absent.
199
+ */
200
+ asOfDate?: string;
201
+ }
184
202
  interface StockImage {
185
203
  iconUrl: string | null;
186
204
  logoUrl: string | null;
@@ -688,6 +706,10 @@ interface GetDescriptionsOptions {
688
706
  interface GetSimilarOptions {
689
707
  limit?: number;
690
708
  }
709
+ interface GetStockEtfsOptions {
710
+ /** Return at most this many rows. Omitted, 0 or negative returns every row. */
711
+ limit?: number;
712
+ }
691
713
  interface GetProfileOptions {
692
714
  forced?: boolean;
693
715
  }
@@ -3151,6 +3173,42 @@ interface TrackerListing {
3151
3173
  refreshIntervalSeconds: number;
3152
3174
  /** Canonical detail URL (e.g. `"/api/v1/trackers/institution-concentration"`). */
3153
3175
  canonicalUrl: string;
3176
+ /**
3177
+ * What this tracker accepts through `client.trackers.get(id, { filter })`: one entry per
3178
+ * key, each with the complete list of accepted values. Absent on a tracker with no filters.
3179
+ */
3180
+ filters?: TrackerFilter[];
3181
+ }
3182
+ /** One filter a tracker accepts, as listed by `client.trackers.list()`. */
3183
+ interface TrackerFilter {
3184
+ /** Filter name, e.g. `"state"`. */
3185
+ key: string;
3186
+ /** The complete list of accepted values, e.g. `["AZ", "FEDERAL", "TX"]`. */
3187
+ values: string[];
3188
+ }
3189
+ /**
3190
+ * Query parameters for `client.trackers.get()`. Each is optional and provider-specific;
3191
+ * other keys are passed through as query parameters.
3192
+ */
3193
+ interface TrackerGetParams {
3194
+ /**
3195
+ * Which universe a scoped tracker returns, e.g. `"nasdaq100"` for `market-heatmap`.
3196
+ * A value the tracker does not serve throws `APIError` with `code: "invalid_scope"`.
3197
+ */
3198
+ scope?: string;
3199
+ /**
3200
+ * For the institution rankings: overrides the default filer-category filter. Pass `""`
3201
+ * to open the universe across all categories.
3202
+ */
3203
+ category?: string;
3204
+ /**
3205
+ * Narrows a tracker that declares `filters`. An object such as
3206
+ * `{ state: "TX", category: "local" }` or the wire string `"state:TX,category:local"`.
3207
+ * An unknown key or value, or a filter on a tracker with none, throws `APIError` with
3208
+ * `status: 400` and `code: "invalid_filter"`.
3209
+ */
3210
+ filter?: string | Record<string, string>;
3211
+ [param: string]: string | number | boolean | Record<string, string> | undefined;
3154
3212
  }
3155
3213
  /** Discovery envelope returned by `client.trackers.list()`. */
3156
3214
  interface TrackerListResponse {
@@ -3170,6 +3228,20 @@ interface TrackerTableRow {
3170
3228
  url: string | null;
3171
3229
  /** Per-cell metric values; each carries its own label and unit. */
3172
3230
  metrics: TrackerMetricValue[];
3231
+ /** The stock symbol the row is about, when it is about one company. Absent otherwise. */
3232
+ ticker?: string;
3233
+ /** ISO calendar day (`YYYY-MM-DD`) a row's stated term ends. Absent when it has none. */
3234
+ endsDate?: string;
3235
+ /**
3236
+ * Two-letter state codes a record names (`data-center-moratoriums` company filings). A row
3237
+ * appears under a `state` filter for each of them. Absent when it names none.
3238
+ */
3239
+ statesNamed?: string[];
3240
+ /**
3241
+ * Any other named cell a tracker writes on the row, such as the `market-heatmap` columns
3242
+ * (`marketCap`, `changePercent`, ...).
3243
+ */
3244
+ [field: string]: unknown;
3173
3245
  }
3174
3246
  /**
3175
3247
  * A labeled quantitative reading attached to a row, geo region, or
@@ -5178,6 +5250,17 @@ declare class Stocks {
5178
5250
  getDescriptions(tickers: string[], options?: GetDescriptionsOptions): Promise<Record<string, StockProfile>>;
5179
5251
  /** Get peer/similar stocks. */
5180
5252
  getSimilar(ticker: string, options?: GetSimilarOptions): Promise<SimilarStock[]>;
5253
+ /**
5254
+ * List the ETFs that hold a stock, heaviest weight first.
5255
+ *
5256
+ * Resolves to a bare array (no preview envelope) on every tier, sorted by `weightPct`
5257
+ * descending, then `etfTicker` ascending. A ticker no tracked fund holds, or an unknown
5258
+ * ticker, resolves to `[]` rather than throwing. Only funds SentiSense tracks with a
5259
+ * holdings file are searched, and some funds' holdings are partial, so the list is not
5260
+ * every fund in the market. `ticker` is case-insensitive. Counts against the monthly
5261
+ * quota like other data endpoints.
5262
+ */
5263
+ getEtfs(ticker: string, options?: GetStockEtfsOptions): Promise<EtfMembership[]>;
5181
5264
  /** Get company profile (CEO, sector, industry, market data). */
5182
5265
  getProfile(ticker: string, options?: GetProfileOptions): Promise<StockProfile>;
5183
5266
  /**
@@ -5465,10 +5548,11 @@ declare class Trackers {
5465
5548
  * in your renderer.
5466
5549
  *
5467
5550
  * @param trackerId slug from {@link list}, e.g. `"institution-concentration"`.
5468
- * @param params provider-specific query params (e.g. `{ scope: "us" }` for
5469
- * geographically-scoped trackers like hantavirus). Unknown keys are ignored.
5551
+ * @param params provider-specific query params, e.g. `{ scope: "nasdaq100" }` for
5552
+ * `market-heatmap`, or `{ filter: { state: "TX" } }` for a tracker that lists
5553
+ * `filters`. A bad `filter` throws `APIError` with `code: "invalid_filter"`.
5470
5554
  */
5471
- get(trackerId: string, params?: Record<string, string | number | boolean>): Promise<TrackerSnapshotResponse>;
5555
+ get(trackerId: string, params?: TrackerGetParams): Promise<TrackerSnapshotResponse>;
5472
5556
  }
5473
5557
 
5474
5558
  /** @internal HTTP interface exposed to resource classes. */
@@ -5568,6 +5652,6 @@ declare class APIError extends SentiSenseError {
5568
5652
  constructor(message: string, status: number, code?: string);
5569
5653
  }
5570
5654
 
5571
- declare const VERSION = "0.74.0";
5655
+ declare const VERSION = "0.76.0";
5572
5656
 
5573
- export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystCalledItCall, type AnalystCalledItMove, type AnalystConsensus, type AnalystConsensusHistory, type AnalystConsensusHistoryPoint, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatePeriodType, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AnalystRef, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarlyFilers, type EarningsCalendarResponse, type EarningsEvent, type EarningsKpiHighlight, type EarningsOutcomeStatistics, type EarningsQuarter, type EarningsReaction, type EarningsReactionsResponse, type EarningsSource, type EarningsStatistics, type EarningsStatisticsBaseline, type EarningsStatisticsDeviation, type EarningsStatisticsThresholds, type EarningsStatisticsWindow, type EarningsSummariesResponse, type EntitySearchResult, type EntitySearchType, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfQuote, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type ExtendedHoursInfo, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCalledItOptions, type GetAnalystCallsOptions, type GetAnalystConsensusHistoryOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsStatisticsOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersHistoryOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetInstitutionDetailOptions, type GetInstitutionHistoryOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetOptionsIntradayHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetShortInterestOptions, type GetShortVolumeOptions, type GetStockGraphOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type GraphCounts, type GraphEdge, type GraphGroups, type GraphNode, type GraphProductFamily, type Holder, type HolderComparisonStatus, type HolderNotableChanges, type HoldersHistory, type HoldersHistoryQuarter, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionChangeFilter, type InstitutionChangeType, type InstitutionDetail, type InstitutionHistory, type InstitutionHistoryQuarter, type InstitutionHolding, type InstitutionList, type InstitutionListResponse, type InstitutionMatchTotals, type InstitutionPositionPoint, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type NotableHolder, type OptionsAggregate, type OptionsCapabilities, type OptionsContext, type OptionsHighlight, type OptionsHistory, type OptionsHistoryWindow, type OptionsIntradayBoardCapability, type OptionsIntradayFlow, type OptionsIntradayHistory, type OptionsIntradayPoint, type OptionsOiFollowUp, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type OwnershipSelection, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, type RankedEarnings, type RankedEarningsSection, type RankedReportedEarnings, type RankedUpcomingEarnings, RateLimitError, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type RiskAdjustment, type RiskCondition, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, type SearchEntitiesOptions, type SearchStoriesOptions, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShareClass, type ShortInterest, type ShortInterestDataPoint, type ShortVolume, type ShortVolumeDataPoint, type SimilarStock, type StockDetail, type StockEntity, type StockGraph, type StockImage, type StockNotRated, type StockPrice, type StockProfile, type StockQuote, type StockRating, type StockRatingResponse, type StockSocialDominance, type Story, type StoryCluster, type StoryTimelineEntry, TemporarilyUnavailableError, 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 };
5657
+ export { type AISummary, APIError, type AnalystAction, type AnalystCall, type AnalystCalledItCall, type AnalystCalledItMove, type AnalystConsensus, type AnalystConsensusHistory, type AnalystConsensusHistoryPoint, type AnalystCoverage, type AnalystCoverageAnalyst, type AnalystCoverageBookEntry, type AnalystCoverageFirm, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatePeriodType, type AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AnalystRef, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarlyFilers, type EarningsCalendarResponse, type EarningsEvent, type EarningsKpiHighlight, type EarningsOutcomeStatistics, type EarningsQuarter, type EarningsReaction, type EarningsReactionsResponse, type EarningsSource, type EarningsStatistics, type EarningsStatisticsBaseline, type EarningsStatisticsDeviation, type EarningsStatisticsThresholds, type EarningsStatisticsWindow, type EarningsSummariesResponse, type EntitySearchResult, type EntitySearchType, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfMembership, type EtfQuote, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type ExtendedHoursInfo, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystCalledItOptions, type GetAnalystCallsOptions, type GetAnalystConsensusHistoryOptions, type GetAnalystCoverageOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsStatisticsOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersHistoryOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetInstitutionDetailOptions, type GetInstitutionHistoryOptions, type GetLatestInsightsOptions, type GetOptionsHistoryOptions, type GetOptionsIntradayHistoryOptions, type GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetShortInterestOptions, type GetShortVolumeOptions, type GetStockEtfsOptions, type GetStockGraphOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type GraphCounts, type GraphEdge, type GraphGroups, type GraphNode, type GraphProductFamily, type Holder, type HolderComparisonStatus, type HolderNotableChanges, type HoldersHistory, type HoldersHistoryQuarter, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionChangeFilter, type InstitutionChangeType, type InstitutionDetail, type InstitutionHistory, type InstitutionHistoryQuarter, type InstitutionHolding, type InstitutionList, type InstitutionListResponse, type InstitutionMatchTotals, type InstitutionPositionPoint, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type NotableHolder, type OptionsAggregate, type OptionsCapabilities, type OptionsContext, type OptionsHighlight, type OptionsHistory, type OptionsHistoryWindow, type OptionsIntradayBoardCapability, type OptionsIntradayFlow, type OptionsIntradayHistory, type OptionsIntradayPoint, type OptionsOiFollowUp, type OptionsOiWalls, type OptionsOverview, type OptionsOverviewRow, type OptionsSummary, type OptionsUnusualContract, type OptionsWall, type OwnershipSelection, type PoliticianDetail, type PoliticianDirectory, type PoliticianDirectoryEntry, type PoliticianDirectoryResponse, type PoliticianSummary, type PreviewResponse, type Quarter, type RankedEarnings, type RankedEarningsSection, type RankedReportedEarnings, type RankedUpcomingEarnings, RateLimitError, type RatingBase, type RatingDimension, type RatingDimensionKey, type RatingFlag, type RatingNotRatedReason, type RatingSubLeg, type RecentEarningsEntry, type RiskAdjustment, type RiskCondition, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, type SearchEntitiesOptions, type SearchStoriesOptions, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShareClass, type ShortInterest, type ShortInterestDataPoint, type ShortVolume, type ShortVolumeDataPoint, type SimilarStock, type StockDetail, type StockEntity, type StockGraph, type StockImage, type StockNotRated, type StockPrice, type StockProfile, type StockQuote, type StockRating, type StockRatingResponse, type StockSocialDominance, type Story, type StoryCluster, type StoryTimelineEntry, TemporarilyUnavailableError, type TickerHolders, type TrackerEvent, type TrackerFilter, type TrackerGeoEntry, type TrackerGetParams, 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
@@ -1142,6 +1142,19 @@ var Stocks = class {
1142
1142
  async getSimilar(ticker, options) {
1143
1143
  return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/similar`, options);
1144
1144
  }
1145
+ /**
1146
+ * List the ETFs that hold a stock, heaviest weight first.
1147
+ *
1148
+ * Resolves to a bare array (no preview envelope) on every tier, sorted by `weightPct`
1149
+ * descending, then `etfTicker` ascending. A ticker no tracked fund holds, or an unknown
1150
+ * ticker, resolves to `[]` rather than throwing. Only funds SentiSense tracks with a
1151
+ * holdings file are searched, and some funds' holdings are partial, so the list is not
1152
+ * every fund in the market. `ticker` is case-insensitive. Counts against the monthly
1153
+ * quota like other data endpoints.
1154
+ */
1155
+ async getEtfs(ticker, options) {
1156
+ return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/etfs`, options);
1157
+ }
1145
1158
  /** Get company profile (CEO, sector, industry, market data). */
1146
1159
  async getProfile(ticker, options) {
1147
1160
  return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/profile`, options);
@@ -1492,16 +1505,30 @@ var Trackers = class {
1492
1505
  * in your renderer.
1493
1506
  *
1494
1507
  * @param trackerId slug from {@link list}, e.g. `"institution-concentration"`.
1495
- * @param params provider-specific query params (e.g. `{ scope: "us" }` for
1496
- * geographically-scoped trackers like hantavirus). Unknown keys are ignored.
1508
+ * @param params provider-specific query params, e.g. `{ scope: "nasdaq100" }` for
1509
+ * `market-heatmap`, or `{ filter: { state: "TX" } }` for a tracker that lists
1510
+ * `filters`. A bad `filter` throws `APIError` with `code: "invalid_filter"`.
1497
1511
  */
1498
1512
  async get(trackerId, params) {
1499
- return this.client.get(`/api/v1/trackers/${trackerId}`, params);
1513
+ return this.client.get(`/api/v1/trackers/${trackerId}`, serializeTrackerParams(params));
1500
1514
  }
1501
1515
  };
1516
+ function serializeTrackerFilter(filter) {
1517
+ if (typeof filter === "string") return filter;
1518
+ return Object.entries(filter).map(([key, value]) => `${key}:${value}`).join(",");
1519
+ }
1520
+ function serializeTrackerParams(params) {
1521
+ if (!params) return void 0;
1522
+ const out = {};
1523
+ for (const [key, value] of Object.entries(params)) {
1524
+ if (value === void 0 || value === null) continue;
1525
+ out[key] = key === "filter" ? serializeTrackerFilter(value) : value;
1526
+ }
1527
+ return out;
1528
+ }
1502
1529
 
1503
1530
  // src/version.ts
1504
- var VERSION = "0.74.0";
1531
+ var VERSION = "0.76.0";
1505
1532
 
1506
1533
  // src/client.ts
1507
1534
  var DEFAULT_BASE_URL = "https://app.sentisense.ai";