sentisense 0.66.0 → 0.68.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 +16 -2
- package/dist/cli.cjs +41 -5
- package/dist/index.cjs +39 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +172 -7
- package/dist/index.d.ts +172 -7
- package/dist/index.mjs +39 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
interface SentiSenseOptions {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Sent as `X-SentiSense-API-Key`. When omitted or empty, the `SENTISENSE_API_KEY`
|
|
4
|
+
* environment variable is used where a process environment exists. Pass `null` to send no key.
|
|
5
|
+
*/
|
|
6
|
+
apiKey?: string | null;
|
|
3
7
|
baseUrl?: string;
|
|
4
8
|
timeout?: number;
|
|
5
9
|
maxRetries?: number;
|
|
@@ -796,6 +800,28 @@ interface OptionsOiWalls {
|
|
|
796
800
|
maxPain?: number;
|
|
797
801
|
callWalls?: OptionsWall[];
|
|
798
802
|
putWalls?: OptionsWall[];
|
|
803
|
+
/**
|
|
804
|
+
* Call open interest summed across every strike of the expiry, when present. Omitted on
|
|
805
|
+
* snapshots built before the field existed.
|
|
806
|
+
*/
|
|
807
|
+
totalCallOi?: number;
|
|
808
|
+
/**
|
|
809
|
+
* Put open interest summed across every strike of the expiry, when present. Omitted on
|
|
810
|
+
* snapshots built before the field existed.
|
|
811
|
+
*/
|
|
812
|
+
totalPutOi?: number;
|
|
813
|
+
/**
|
|
814
|
+
* Call open interest at the `maxPain` strike, when present, even when that strike is not
|
|
815
|
+
* one of the walls. `0` when no calls are open there; omitted on snapshots built before
|
|
816
|
+
* the field existed.
|
|
817
|
+
*/
|
|
818
|
+
maxPainCallOi?: number;
|
|
819
|
+
/**
|
|
820
|
+
* Put open interest at the `maxPain` strike, when present, even when that strike is not
|
|
821
|
+
* one of the walls. `0` when no puts are open there; omitted on snapshots built before
|
|
822
|
+
* the field existed.
|
|
823
|
+
*/
|
|
824
|
+
maxPainPutOi?: number;
|
|
799
825
|
}
|
|
800
826
|
/** A contract whose session volume far exceeds its open interest: fresh positioning. */
|
|
801
827
|
interface OptionsUnusualContract {
|
|
@@ -1565,8 +1591,9 @@ interface Quarter {
|
|
|
1565
1591
|
label: string;
|
|
1566
1592
|
reportDate: string;
|
|
1567
1593
|
/**
|
|
1568
|
-
* True while this quarter's 13F filing window is still open
|
|
1569
|
-
* quarter end
|
|
1594
|
+
* True while this quarter's 13F filing window is still open: through the effective SEC
|
|
1595
|
+
* filing deadline day in New York, which is 45 days after quarter end rolled past
|
|
1596
|
+
* weekends and federal holidays.
|
|
1570
1597
|
*
|
|
1571
1598
|
* Read it before you pick a quarter to query. The list leads with the current quarter, so
|
|
1572
1599
|
* the newest entry is pending for six weeks of every quarter, and a holders request against
|
|
@@ -1578,6 +1605,19 @@ interface Quarter {
|
|
|
1578
1605
|
* every row.
|
|
1579
1606
|
*/
|
|
1580
1607
|
pending?: boolean;
|
|
1608
|
+
/**
|
|
1609
|
+
* True from the New York calendar day after the effective SEC filing deadline. It does
|
|
1610
|
+
* not certify that every institution filed.
|
|
1611
|
+
*
|
|
1612
|
+
* Typed optional so existing object literals keep compiling; the API sends the key on
|
|
1613
|
+
* every row.
|
|
1614
|
+
*/
|
|
1615
|
+
ownershipEligible?: boolean;
|
|
1616
|
+
/**
|
|
1617
|
+
* ISO date (New York calendar day) on which the quarter becomes eligible: the day after
|
|
1618
|
+
* the effective filing deadline.
|
|
1619
|
+
*/
|
|
1620
|
+
ownershipEligibleAt?: string;
|
|
1581
1621
|
}
|
|
1582
1622
|
interface InstitutionalFlow {
|
|
1583
1623
|
ticker: string;
|
|
@@ -1637,6 +1677,82 @@ interface Holder {
|
|
|
1637
1677
|
* read it as "1 or unknown" rather than zero.
|
|
1638
1678
|
*/
|
|
1639
1679
|
cikCount?: number | null;
|
|
1680
|
+
/**
|
|
1681
|
+
* Whether this row's quarter-over-quarter change is backed by a complete comparison.
|
|
1682
|
+
* Only `AVAILABLE` supports a change claim for this holder; the legacy change fields
|
|
1683
|
+
* (`changeType`, `sharesChange`, `sharesChangePct`) can still be present under the other
|
|
1684
|
+
* statuses. Check it per row: a holder can be `AVAILABLE` while the response-level
|
|
1685
|
+
* {@link TickerHolders.comparisonStatus} summary reads incomplete.
|
|
1686
|
+
*/
|
|
1687
|
+
comparisonStatus?: HolderComparisonStatus;
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1690
|
+
* Comparison status for quarter-over-quarter share changes, on the holders response and on
|
|
1691
|
+
* each holder row. Only `AVAILABLE` supports a change claim.
|
|
1692
|
+
*/
|
|
1693
|
+
type HolderComparisonStatus = "AVAILABLE" | "PRIOR_QUARTER_UNAVAILABLE" | "INCOMPLETE_INPUT" | "INCOMPLETE_FAMILY_COVERAGE" | "UNAVAILABLE" | (string & {});
|
|
1694
|
+
/**
|
|
1695
|
+
* How `institutional.getHolders()` chose the quarter it answered.
|
|
1696
|
+
*/
|
|
1697
|
+
interface OwnershipSelection {
|
|
1698
|
+
/** `EXPLICIT` when the request named a `reportDate`, `DEFAULT` when the server chose. */
|
|
1699
|
+
mode: "DEFAULT" | "EXPLICIT" | (string & {});
|
|
1700
|
+
/** `settled` once the quarter's filing deadline has passed, `filing` before that. */
|
|
1701
|
+
status: "settled" | "filing" | (string & {});
|
|
1702
|
+
/** Identifier of the quarter-selection rule, e.g. `"v2-sec-deadline-next-day"`. */
|
|
1703
|
+
policyVersion: string;
|
|
1704
|
+
/** The newest eligible quarter across the market (ISO date). */
|
|
1705
|
+
marketDefaultReportDate?: string;
|
|
1706
|
+
/**
|
|
1707
|
+
* True when this response is for an older quarter than `marketDefaultReportDate`. An
|
|
1708
|
+
* explicit `reportDate` is still the quarter you asked for.
|
|
1709
|
+
*/
|
|
1710
|
+
isStaleForMarket: boolean;
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* A newer quarter that is still filing for this ticker, reported beside the selected
|
|
1714
|
+
* quarter rather than mixed into its holder rows.
|
|
1715
|
+
*/
|
|
1716
|
+
interface EarlyFilers {
|
|
1717
|
+
/** Quarter end of the filing quarter (ISO date). */
|
|
1718
|
+
reportDate: string;
|
|
1719
|
+
/** Always `filing`. */
|
|
1720
|
+
status: "filing" | (string & {});
|
|
1721
|
+
/** Holder families with a positive position in this ticker so far. */
|
|
1722
|
+
holderCount: number;
|
|
1723
|
+
/** Distinct filers that have reported for the newer quarter, market-wide. */
|
|
1724
|
+
distinctFilerCount: number;
|
|
1725
|
+
/** Distinct filers in the selected settled quarter, market-wide, as a baseline. */
|
|
1726
|
+
baselineFilerCount: number;
|
|
1727
|
+
/**
|
|
1728
|
+
* Share of this ticker's selected-quarter institutional value held by filers confirmed
|
|
1729
|
+
* to have filed for the newer quarter, including filers that have since exited the
|
|
1730
|
+
* ticker, as a percentage. Omitted when filing presence or the baseline value is
|
|
1731
|
+
* unavailable or does not reconcile.
|
|
1732
|
+
*/
|
|
1733
|
+
coveragePct?: number;
|
|
1734
|
+
}
|
|
1735
|
+
/**
|
|
1736
|
+
* A well-known institution matched against the selected quarter's full roster. Free keys
|
|
1737
|
+
* receive identifiers only; PRO also receives the position and change fields.
|
|
1738
|
+
*/
|
|
1739
|
+
interface NotableHolder {
|
|
1740
|
+
filerCik: string;
|
|
1741
|
+
filerName: string;
|
|
1742
|
+
/** URL slug for `institutional.getInstitutionDetail()`, or null when unmapped. */
|
|
1743
|
+
entitySlug?: string | null;
|
|
1744
|
+
/** PRO only. */
|
|
1745
|
+
shares?: number;
|
|
1746
|
+
/** PRO only. */
|
|
1747
|
+
valueUsd?: number;
|
|
1748
|
+
/** PRO only. */
|
|
1749
|
+
changeType?: "NEW" | "INCREASED" | "DECREASED" | "SOLD_OUT" | "UNCHANGED";
|
|
1750
|
+
/** PRO only. */
|
|
1751
|
+
sharesChange?: number;
|
|
1752
|
+
/** PRO only. Omitted on a `NEW` position, which has no prior-position baseline. */
|
|
1753
|
+
sharesChangePct?: number;
|
|
1754
|
+
/** PRO only. Only `AVAILABLE` supports a quarter-change claim for this holder. */
|
|
1755
|
+
comparisonStatus?: HolderComparisonStatus;
|
|
1640
1756
|
}
|
|
1641
1757
|
/**
|
|
1642
1758
|
* A server-side shortlist of the quarter's significant position changes, so a caller
|
|
@@ -1662,7 +1778,18 @@ interface HolderNotableChanges {
|
|
|
1662
1778
|
interface TickerHolders {
|
|
1663
1779
|
ticker: string;
|
|
1664
1780
|
companyName: string;
|
|
1781
|
+
/** The quarter actually served (ISO date). */
|
|
1665
1782
|
reportDate: string;
|
|
1783
|
+
/** How the quarter was chosen, and whether it trails the market's newest eligible one. */
|
|
1784
|
+
selection?: OwnershipSelection;
|
|
1785
|
+
/**
|
|
1786
|
+
* `AVAILABLE` when `earlyFilers` is present, `NONE` when no newer filing quarter is
|
|
1787
|
+
* observed, `UNAVAILABLE` when that supplementary read failed. The selected quarter's
|
|
1788
|
+
* holders are served either way.
|
|
1789
|
+
*/
|
|
1790
|
+
earlyFilersStatus?: "AVAILABLE" | "NONE" | "UNAVAILABLE" | (string & {});
|
|
1791
|
+
/** A newer quarter still filing for this ticker. Sent only when `earlyFilersStatus` is `AVAILABLE`. */
|
|
1792
|
+
earlyFilers?: EarlyFilers;
|
|
1666
1793
|
totalInstitutionalShares: number;
|
|
1667
1794
|
totalInstitutionalValue: number;
|
|
1668
1795
|
/** Every institutional holder of this ticker for the quarter, ignoring any paging. */
|
|
@@ -1684,6 +1811,26 @@ interface TickerHolders {
|
|
|
1684
1811
|
* passed `limit`, since it exists to spare a paging caller a full scan.
|
|
1685
1812
|
*/
|
|
1686
1813
|
notableChanges?: HolderNotableChanges;
|
|
1814
|
+
/**
|
|
1815
|
+
* Well-known institutions holding a positive position, matched against the selected
|
|
1816
|
+
* quarter's full roster rather than the returned page. Free keys get up to five names
|
|
1817
|
+
* and identifiers; it does not expand the `holders` preview. Omitted when the
|
|
1818
|
+
* full-roster lookup is unavailable; an empty array means a verified search found none.
|
|
1819
|
+
*/
|
|
1820
|
+
notableHolders?: NotableHolder[];
|
|
1821
|
+
/** `full_roster` when `notableHolders` was checked against the quarter's full roster. */
|
|
1822
|
+
notableHoldersScope?: "full_roster" | (string & {});
|
|
1823
|
+
/**
|
|
1824
|
+
* The immediately preceding calendar quarter targeted for share-change comparisons (ISO
|
|
1825
|
+
* date). Can be present while `comparisonStatus` reads unavailable or incomplete.
|
|
1826
|
+
*/
|
|
1827
|
+
comparisonReportDate?: string;
|
|
1828
|
+
/**
|
|
1829
|
+
* Conservative summary across the whole response. A holder can still carry valid
|
|
1830
|
+
* changes while this reads incomplete, so check each row's
|
|
1831
|
+
* {@link Holder.comparisonStatus}.
|
|
1832
|
+
*/
|
|
1833
|
+
comparisonStatus?: HolderComparisonStatus;
|
|
1687
1834
|
}
|
|
1688
1835
|
/**
|
|
1689
1836
|
* The flows payload inside the response envelope: `institutional.getFlows()` returns
|
|
@@ -4275,7 +4422,13 @@ declare class Insights {
|
|
|
4275
4422
|
declare class Institutional {
|
|
4276
4423
|
private client;
|
|
4277
4424
|
constructor(client: APIClient);
|
|
4278
|
-
/**
|
|
4425
|
+
/**
|
|
4426
|
+
* Get available 13F reporting quarters, newest first.
|
|
4427
|
+
*
|
|
4428
|
+
* The first entry is usually the quarter that is still filing, so pick by the flag rather
|
|
4429
|
+
* than by position: `quarters.find((q) => !q.pending)?.reportDate`. Each row also carries
|
|
4430
|
+
* `ownershipEligible` and `ownershipEligibleAt`.
|
|
4431
|
+
*/
|
|
4279
4432
|
getQuarters(): Promise<Quarter[]>;
|
|
4280
4433
|
/**
|
|
4281
4434
|
* Get aggregate institutional activity per ticker for a quarter.
|
|
@@ -4291,6 +4444,11 @@ declare class Institutional {
|
|
|
4291
4444
|
/**
|
|
4292
4445
|
* Get institutional holders for a specific stock.
|
|
4293
4446
|
*
|
|
4447
|
+
* `reportDate` is optional: omit it (or pass `undefined` ahead of `options`) and the
|
|
4448
|
+
* request carries no date, so the server serves this ticker's latest settled quarter,
|
|
4449
|
+
* echoes it in `data.reportDate` with `data.selection.mode` set to `DEFAULT`, and reports
|
|
4450
|
+
* any newer still-filing quarter separately in `data.earlyFilers`.
|
|
4451
|
+
*
|
|
4294
4452
|
* Returns the preview envelope wrapping a {@link TickerHolders} object, so the rows
|
|
4295
4453
|
* are two levels down: `(await getHolders(t, d)).data.holders`, alongside ticker-level
|
|
4296
4454
|
* totals like `holderCount`. Free callers get a truncated `holders` array with
|
|
@@ -4304,8 +4462,15 @@ declare class Institutional {
|
|
|
4304
4462
|
* `returnedCount`, `offset`, and a `notableChanges` summary, so you can walk the list
|
|
4305
4463
|
* without re-counting it. Without it, `offset` / `sortBy` / `sortDir` are ignored by the
|
|
4306
4464
|
* server and you get the full unsorted list back with a 200.
|
|
4465
|
+
*
|
|
4466
|
+
* The payload also says how its quarter was chosen (`selection`), reports a newer
|
|
4467
|
+
* still-filing quarter separately (`earlyFilersStatus`, `earlyFilers`), lists well-known
|
|
4468
|
+
* institutions matched against the full roster (`notableHolders`), and summarizes the
|
|
4469
|
+
* quarter-over-quarter comparison (`comparisonReportDate`, `comparisonStatus`). Each
|
|
4470
|
+
* holder row has its own `comparisonStatus`; only `AVAILABLE` on that row supports its
|
|
4471
|
+
* change figures.
|
|
4307
4472
|
*/
|
|
4308
|
-
getHolders(ticker: string, reportDate
|
|
4473
|
+
getHolders(ticker: string, reportDate?: string, options?: GetHoldersOptions): Promise<PreviewResponse<TickerHolders>>;
|
|
4309
4474
|
/**
|
|
4310
4475
|
* Get activist investor positions (NEW or INCREASED).
|
|
4311
4476
|
*
|
|
@@ -4968,6 +5133,6 @@ declare class APIError extends SentiSenseError {
|
|
|
4968
5133
|
constructor(message: string, status: number, code?: string);
|
|
4969
5134
|
}
|
|
4970
5135
|
|
|
4971
|
-
declare const VERSION = "0.
|
|
5136
|
+
declare const VERSION = "0.68.0";
|
|
4972
5137
|
|
|
4973
|
-
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 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 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 GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, 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 HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionDetail, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, 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 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 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 };
|
|
5138
|
+
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 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 GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, 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 IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionDetail, 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 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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
interface SentiSenseOptions {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Sent as `X-SentiSense-API-Key`. When omitted or empty, the `SENTISENSE_API_KEY`
|
|
4
|
+
* environment variable is used where a process environment exists. Pass `null` to send no key.
|
|
5
|
+
*/
|
|
6
|
+
apiKey?: string | null;
|
|
3
7
|
baseUrl?: string;
|
|
4
8
|
timeout?: number;
|
|
5
9
|
maxRetries?: number;
|
|
@@ -796,6 +800,28 @@ interface OptionsOiWalls {
|
|
|
796
800
|
maxPain?: number;
|
|
797
801
|
callWalls?: OptionsWall[];
|
|
798
802
|
putWalls?: OptionsWall[];
|
|
803
|
+
/**
|
|
804
|
+
* Call open interest summed across every strike of the expiry, when present. Omitted on
|
|
805
|
+
* snapshots built before the field existed.
|
|
806
|
+
*/
|
|
807
|
+
totalCallOi?: number;
|
|
808
|
+
/**
|
|
809
|
+
* Put open interest summed across every strike of the expiry, when present. Omitted on
|
|
810
|
+
* snapshots built before the field existed.
|
|
811
|
+
*/
|
|
812
|
+
totalPutOi?: number;
|
|
813
|
+
/**
|
|
814
|
+
* Call open interest at the `maxPain` strike, when present, even when that strike is not
|
|
815
|
+
* one of the walls. `0` when no calls are open there; omitted on snapshots built before
|
|
816
|
+
* the field existed.
|
|
817
|
+
*/
|
|
818
|
+
maxPainCallOi?: number;
|
|
819
|
+
/**
|
|
820
|
+
* Put open interest at the `maxPain` strike, when present, even when that strike is not
|
|
821
|
+
* one of the walls. `0` when no puts are open there; omitted on snapshots built before
|
|
822
|
+
* the field existed.
|
|
823
|
+
*/
|
|
824
|
+
maxPainPutOi?: number;
|
|
799
825
|
}
|
|
800
826
|
/** A contract whose session volume far exceeds its open interest: fresh positioning. */
|
|
801
827
|
interface OptionsUnusualContract {
|
|
@@ -1565,8 +1591,9 @@ interface Quarter {
|
|
|
1565
1591
|
label: string;
|
|
1566
1592
|
reportDate: string;
|
|
1567
1593
|
/**
|
|
1568
|
-
* True while this quarter's 13F filing window is still open
|
|
1569
|
-
* quarter end
|
|
1594
|
+
* True while this quarter's 13F filing window is still open: through the effective SEC
|
|
1595
|
+
* filing deadline day in New York, which is 45 days after quarter end rolled past
|
|
1596
|
+
* weekends and federal holidays.
|
|
1570
1597
|
*
|
|
1571
1598
|
* Read it before you pick a quarter to query. The list leads with the current quarter, so
|
|
1572
1599
|
* the newest entry is pending for six weeks of every quarter, and a holders request against
|
|
@@ -1578,6 +1605,19 @@ interface Quarter {
|
|
|
1578
1605
|
* every row.
|
|
1579
1606
|
*/
|
|
1580
1607
|
pending?: boolean;
|
|
1608
|
+
/**
|
|
1609
|
+
* True from the New York calendar day after the effective SEC filing deadline. It does
|
|
1610
|
+
* not certify that every institution filed.
|
|
1611
|
+
*
|
|
1612
|
+
* Typed optional so existing object literals keep compiling; the API sends the key on
|
|
1613
|
+
* every row.
|
|
1614
|
+
*/
|
|
1615
|
+
ownershipEligible?: boolean;
|
|
1616
|
+
/**
|
|
1617
|
+
* ISO date (New York calendar day) on which the quarter becomes eligible: the day after
|
|
1618
|
+
* the effective filing deadline.
|
|
1619
|
+
*/
|
|
1620
|
+
ownershipEligibleAt?: string;
|
|
1581
1621
|
}
|
|
1582
1622
|
interface InstitutionalFlow {
|
|
1583
1623
|
ticker: string;
|
|
@@ -1637,6 +1677,82 @@ interface Holder {
|
|
|
1637
1677
|
* read it as "1 or unknown" rather than zero.
|
|
1638
1678
|
*/
|
|
1639
1679
|
cikCount?: number | null;
|
|
1680
|
+
/**
|
|
1681
|
+
* Whether this row's quarter-over-quarter change is backed by a complete comparison.
|
|
1682
|
+
* Only `AVAILABLE` supports a change claim for this holder; the legacy change fields
|
|
1683
|
+
* (`changeType`, `sharesChange`, `sharesChangePct`) can still be present under the other
|
|
1684
|
+
* statuses. Check it per row: a holder can be `AVAILABLE` while the response-level
|
|
1685
|
+
* {@link TickerHolders.comparisonStatus} summary reads incomplete.
|
|
1686
|
+
*/
|
|
1687
|
+
comparisonStatus?: HolderComparisonStatus;
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1690
|
+
* Comparison status for quarter-over-quarter share changes, on the holders response and on
|
|
1691
|
+
* each holder row. Only `AVAILABLE` supports a change claim.
|
|
1692
|
+
*/
|
|
1693
|
+
type HolderComparisonStatus = "AVAILABLE" | "PRIOR_QUARTER_UNAVAILABLE" | "INCOMPLETE_INPUT" | "INCOMPLETE_FAMILY_COVERAGE" | "UNAVAILABLE" | (string & {});
|
|
1694
|
+
/**
|
|
1695
|
+
* How `institutional.getHolders()` chose the quarter it answered.
|
|
1696
|
+
*/
|
|
1697
|
+
interface OwnershipSelection {
|
|
1698
|
+
/** `EXPLICIT` when the request named a `reportDate`, `DEFAULT` when the server chose. */
|
|
1699
|
+
mode: "DEFAULT" | "EXPLICIT" | (string & {});
|
|
1700
|
+
/** `settled` once the quarter's filing deadline has passed, `filing` before that. */
|
|
1701
|
+
status: "settled" | "filing" | (string & {});
|
|
1702
|
+
/** Identifier of the quarter-selection rule, e.g. `"v2-sec-deadline-next-day"`. */
|
|
1703
|
+
policyVersion: string;
|
|
1704
|
+
/** The newest eligible quarter across the market (ISO date). */
|
|
1705
|
+
marketDefaultReportDate?: string;
|
|
1706
|
+
/**
|
|
1707
|
+
* True when this response is for an older quarter than `marketDefaultReportDate`. An
|
|
1708
|
+
* explicit `reportDate` is still the quarter you asked for.
|
|
1709
|
+
*/
|
|
1710
|
+
isStaleForMarket: boolean;
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* A newer quarter that is still filing for this ticker, reported beside the selected
|
|
1714
|
+
* quarter rather than mixed into its holder rows.
|
|
1715
|
+
*/
|
|
1716
|
+
interface EarlyFilers {
|
|
1717
|
+
/** Quarter end of the filing quarter (ISO date). */
|
|
1718
|
+
reportDate: string;
|
|
1719
|
+
/** Always `filing`. */
|
|
1720
|
+
status: "filing" | (string & {});
|
|
1721
|
+
/** Holder families with a positive position in this ticker so far. */
|
|
1722
|
+
holderCount: number;
|
|
1723
|
+
/** Distinct filers that have reported for the newer quarter, market-wide. */
|
|
1724
|
+
distinctFilerCount: number;
|
|
1725
|
+
/** Distinct filers in the selected settled quarter, market-wide, as a baseline. */
|
|
1726
|
+
baselineFilerCount: number;
|
|
1727
|
+
/**
|
|
1728
|
+
* Share of this ticker's selected-quarter institutional value held by filers confirmed
|
|
1729
|
+
* to have filed for the newer quarter, including filers that have since exited the
|
|
1730
|
+
* ticker, as a percentage. Omitted when filing presence or the baseline value is
|
|
1731
|
+
* unavailable or does not reconcile.
|
|
1732
|
+
*/
|
|
1733
|
+
coveragePct?: number;
|
|
1734
|
+
}
|
|
1735
|
+
/**
|
|
1736
|
+
* A well-known institution matched against the selected quarter's full roster. Free keys
|
|
1737
|
+
* receive identifiers only; PRO also receives the position and change fields.
|
|
1738
|
+
*/
|
|
1739
|
+
interface NotableHolder {
|
|
1740
|
+
filerCik: string;
|
|
1741
|
+
filerName: string;
|
|
1742
|
+
/** URL slug for `institutional.getInstitutionDetail()`, or null when unmapped. */
|
|
1743
|
+
entitySlug?: string | null;
|
|
1744
|
+
/** PRO only. */
|
|
1745
|
+
shares?: number;
|
|
1746
|
+
/** PRO only. */
|
|
1747
|
+
valueUsd?: number;
|
|
1748
|
+
/** PRO only. */
|
|
1749
|
+
changeType?: "NEW" | "INCREASED" | "DECREASED" | "SOLD_OUT" | "UNCHANGED";
|
|
1750
|
+
/** PRO only. */
|
|
1751
|
+
sharesChange?: number;
|
|
1752
|
+
/** PRO only. Omitted on a `NEW` position, which has no prior-position baseline. */
|
|
1753
|
+
sharesChangePct?: number;
|
|
1754
|
+
/** PRO only. Only `AVAILABLE` supports a quarter-change claim for this holder. */
|
|
1755
|
+
comparisonStatus?: HolderComparisonStatus;
|
|
1640
1756
|
}
|
|
1641
1757
|
/**
|
|
1642
1758
|
* A server-side shortlist of the quarter's significant position changes, so a caller
|
|
@@ -1662,7 +1778,18 @@ interface HolderNotableChanges {
|
|
|
1662
1778
|
interface TickerHolders {
|
|
1663
1779
|
ticker: string;
|
|
1664
1780
|
companyName: string;
|
|
1781
|
+
/** The quarter actually served (ISO date). */
|
|
1665
1782
|
reportDate: string;
|
|
1783
|
+
/** How the quarter was chosen, and whether it trails the market's newest eligible one. */
|
|
1784
|
+
selection?: OwnershipSelection;
|
|
1785
|
+
/**
|
|
1786
|
+
* `AVAILABLE` when `earlyFilers` is present, `NONE` when no newer filing quarter is
|
|
1787
|
+
* observed, `UNAVAILABLE` when that supplementary read failed. The selected quarter's
|
|
1788
|
+
* holders are served either way.
|
|
1789
|
+
*/
|
|
1790
|
+
earlyFilersStatus?: "AVAILABLE" | "NONE" | "UNAVAILABLE" | (string & {});
|
|
1791
|
+
/** A newer quarter still filing for this ticker. Sent only when `earlyFilersStatus` is `AVAILABLE`. */
|
|
1792
|
+
earlyFilers?: EarlyFilers;
|
|
1666
1793
|
totalInstitutionalShares: number;
|
|
1667
1794
|
totalInstitutionalValue: number;
|
|
1668
1795
|
/** Every institutional holder of this ticker for the quarter, ignoring any paging. */
|
|
@@ -1684,6 +1811,26 @@ interface TickerHolders {
|
|
|
1684
1811
|
* passed `limit`, since it exists to spare a paging caller a full scan.
|
|
1685
1812
|
*/
|
|
1686
1813
|
notableChanges?: HolderNotableChanges;
|
|
1814
|
+
/**
|
|
1815
|
+
* Well-known institutions holding a positive position, matched against the selected
|
|
1816
|
+
* quarter's full roster rather than the returned page. Free keys get up to five names
|
|
1817
|
+
* and identifiers; it does not expand the `holders` preview. Omitted when the
|
|
1818
|
+
* full-roster lookup is unavailable; an empty array means a verified search found none.
|
|
1819
|
+
*/
|
|
1820
|
+
notableHolders?: NotableHolder[];
|
|
1821
|
+
/** `full_roster` when `notableHolders` was checked against the quarter's full roster. */
|
|
1822
|
+
notableHoldersScope?: "full_roster" | (string & {});
|
|
1823
|
+
/**
|
|
1824
|
+
* The immediately preceding calendar quarter targeted for share-change comparisons (ISO
|
|
1825
|
+
* date). Can be present while `comparisonStatus` reads unavailable or incomplete.
|
|
1826
|
+
*/
|
|
1827
|
+
comparisonReportDate?: string;
|
|
1828
|
+
/**
|
|
1829
|
+
* Conservative summary across the whole response. A holder can still carry valid
|
|
1830
|
+
* changes while this reads incomplete, so check each row's
|
|
1831
|
+
* {@link Holder.comparisonStatus}.
|
|
1832
|
+
*/
|
|
1833
|
+
comparisonStatus?: HolderComparisonStatus;
|
|
1687
1834
|
}
|
|
1688
1835
|
/**
|
|
1689
1836
|
* The flows payload inside the response envelope: `institutional.getFlows()` returns
|
|
@@ -4275,7 +4422,13 @@ declare class Insights {
|
|
|
4275
4422
|
declare class Institutional {
|
|
4276
4423
|
private client;
|
|
4277
4424
|
constructor(client: APIClient);
|
|
4278
|
-
/**
|
|
4425
|
+
/**
|
|
4426
|
+
* Get available 13F reporting quarters, newest first.
|
|
4427
|
+
*
|
|
4428
|
+
* The first entry is usually the quarter that is still filing, so pick by the flag rather
|
|
4429
|
+
* than by position: `quarters.find((q) => !q.pending)?.reportDate`. Each row also carries
|
|
4430
|
+
* `ownershipEligible` and `ownershipEligibleAt`.
|
|
4431
|
+
*/
|
|
4279
4432
|
getQuarters(): Promise<Quarter[]>;
|
|
4280
4433
|
/**
|
|
4281
4434
|
* Get aggregate institutional activity per ticker for a quarter.
|
|
@@ -4291,6 +4444,11 @@ declare class Institutional {
|
|
|
4291
4444
|
/**
|
|
4292
4445
|
* Get institutional holders for a specific stock.
|
|
4293
4446
|
*
|
|
4447
|
+
* `reportDate` is optional: omit it (or pass `undefined` ahead of `options`) and the
|
|
4448
|
+
* request carries no date, so the server serves this ticker's latest settled quarter,
|
|
4449
|
+
* echoes it in `data.reportDate` with `data.selection.mode` set to `DEFAULT`, and reports
|
|
4450
|
+
* any newer still-filing quarter separately in `data.earlyFilers`.
|
|
4451
|
+
*
|
|
4294
4452
|
* Returns the preview envelope wrapping a {@link TickerHolders} object, so the rows
|
|
4295
4453
|
* are two levels down: `(await getHolders(t, d)).data.holders`, alongside ticker-level
|
|
4296
4454
|
* totals like `holderCount`. Free callers get a truncated `holders` array with
|
|
@@ -4304,8 +4462,15 @@ declare class Institutional {
|
|
|
4304
4462
|
* `returnedCount`, `offset`, and a `notableChanges` summary, so you can walk the list
|
|
4305
4463
|
* without re-counting it. Without it, `offset` / `sortBy` / `sortDir` are ignored by the
|
|
4306
4464
|
* server and you get the full unsorted list back with a 200.
|
|
4465
|
+
*
|
|
4466
|
+
* The payload also says how its quarter was chosen (`selection`), reports a newer
|
|
4467
|
+
* still-filing quarter separately (`earlyFilersStatus`, `earlyFilers`), lists well-known
|
|
4468
|
+
* institutions matched against the full roster (`notableHolders`), and summarizes the
|
|
4469
|
+
* quarter-over-quarter comparison (`comparisonReportDate`, `comparisonStatus`). Each
|
|
4470
|
+
* holder row has its own `comparisonStatus`; only `AVAILABLE` on that row supports its
|
|
4471
|
+
* change figures.
|
|
4307
4472
|
*/
|
|
4308
|
-
getHolders(ticker: string, reportDate
|
|
4473
|
+
getHolders(ticker: string, reportDate?: string, options?: GetHoldersOptions): Promise<PreviewResponse<TickerHolders>>;
|
|
4309
4474
|
/**
|
|
4310
4475
|
* Get activist investor positions (NEW or INCREASED).
|
|
4311
4476
|
*
|
|
@@ -4968,6 +5133,6 @@ declare class APIError extends SentiSenseError {
|
|
|
4968
5133
|
constructor(message: string, status: number, code?: string);
|
|
4969
5134
|
}
|
|
4970
5135
|
|
|
4971
|
-
declare const VERSION = "0.
|
|
5136
|
+
declare const VERSION = "0.68.0";
|
|
4972
5137
|
|
|
4973
|
-
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 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 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 GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, 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 HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionDetail, 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 MarketMoodOptions, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, 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 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 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 };
|
|
5138
|
+
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 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 GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, 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 IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionDetail, 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 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 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -707,7 +707,13 @@ var Institutional = class {
|
|
|
707
707
|
constructor(client) {
|
|
708
708
|
this.client = client;
|
|
709
709
|
}
|
|
710
|
-
/**
|
|
710
|
+
/**
|
|
711
|
+
* Get available 13F reporting quarters, newest first.
|
|
712
|
+
*
|
|
713
|
+
* The first entry is usually the quarter that is still filing, so pick by the flag rather
|
|
714
|
+
* than by position: `quarters.find((q) => !q.pending)?.reportDate`. Each row also carries
|
|
715
|
+
* `ownershipEligible` and `ownershipEligibleAt`.
|
|
716
|
+
*/
|
|
711
717
|
async getQuarters() {
|
|
712
718
|
return this.client.get("/api/v1/institutional/quarters");
|
|
713
719
|
}
|
|
@@ -730,6 +736,11 @@ var Institutional = class {
|
|
|
730
736
|
/**
|
|
731
737
|
* Get institutional holders for a specific stock.
|
|
732
738
|
*
|
|
739
|
+
* `reportDate` is optional: omit it (or pass `undefined` ahead of `options`) and the
|
|
740
|
+
* request carries no date, so the server serves this ticker's latest settled quarter,
|
|
741
|
+
* echoes it in `data.reportDate` with `data.selection.mode` set to `DEFAULT`, and reports
|
|
742
|
+
* any newer still-filing quarter separately in `data.earlyFilers`.
|
|
743
|
+
*
|
|
733
744
|
* Returns the preview envelope wrapping a {@link TickerHolders} object, so the rows
|
|
734
745
|
* are two levels down: `(await getHolders(t, d)).data.holders`, alongside ticker-level
|
|
735
746
|
* totals like `holderCount`. Free callers get a truncated `holders` array with
|
|
@@ -743,6 +754,13 @@ var Institutional = class {
|
|
|
743
754
|
* `returnedCount`, `offset`, and a `notableChanges` summary, so you can walk the list
|
|
744
755
|
* without re-counting it. Without it, `offset` / `sortBy` / `sortDir` are ignored by the
|
|
745
756
|
* server and you get the full unsorted list back with a 200.
|
|
757
|
+
*
|
|
758
|
+
* The payload also says how its quarter was chosen (`selection`), reports a newer
|
|
759
|
+
* still-filing quarter separately (`earlyFilersStatus`, `earlyFilers`), lists well-known
|
|
760
|
+
* institutions matched against the full roster (`notableHolders`), and summarizes the
|
|
761
|
+
* quarter-over-quarter comparison (`comparisonReportDate`, `comparisonStatus`). Each
|
|
762
|
+
* holder row has its own `comparisonStatus`; only `AVAILABLE` on that row supports its
|
|
763
|
+
* change figures.
|
|
746
764
|
*/
|
|
747
765
|
async getHolders(ticker, reportDate, options) {
|
|
748
766
|
return this.client.get(
|
|
@@ -1388,7 +1406,7 @@ var Trackers = class {
|
|
|
1388
1406
|
};
|
|
1389
1407
|
|
|
1390
1408
|
// src/version.ts
|
|
1391
|
-
var VERSION = "0.
|
|
1409
|
+
var VERSION = "0.68.0";
|
|
1392
1410
|
|
|
1393
1411
|
// src/client.ts
|
|
1394
1412
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|
|
@@ -1421,9 +1439,22 @@ function retryAfterSeconds(raw, defaultS, maxWaitS) {
|
|
|
1421
1439
|
function sleep(ms) {
|
|
1422
1440
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1423
1441
|
}
|
|
1442
|
+
var MISSING_KEY_HINT = "(No API key was sent. Set the SENTISENSE_API_KEY environment variable or pass apiKey; get a free key at https://app.sentisense.ai/get-api-key)";
|
|
1443
|
+
function resolveApiKey(explicit) {
|
|
1444
|
+
if (explicit === null) return void 0;
|
|
1445
|
+
if (explicit) return explicit;
|
|
1446
|
+
try {
|
|
1447
|
+
if (typeof process !== "undefined" && process.env) {
|
|
1448
|
+
const fromEnv = process.env.SENTISENSE_API_KEY?.trim();
|
|
1449
|
+
if (fromEnv) return fromEnv;
|
|
1450
|
+
}
|
|
1451
|
+
} catch {
|
|
1452
|
+
}
|
|
1453
|
+
return void 0;
|
|
1454
|
+
}
|
|
1424
1455
|
var SentiSense = class {
|
|
1425
1456
|
constructor(options = {}) {
|
|
1426
|
-
this.apiKey = options.apiKey;
|
|
1457
|
+
this.apiKey = resolveApiKey(options.apiKey);
|
|
1427
1458
|
this.baseUrl = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
|
|
1428
1459
|
this.timeout = options.timeout ?? DEFAULT_TIMEOUT;
|
|
1429
1460
|
this.maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;
|
|
@@ -1603,7 +1634,11 @@ var SentiSense = class {
|
|
|
1603
1634
|
switch (response.status) {
|
|
1604
1635
|
case 401:
|
|
1605
1636
|
case 403:
|
|
1606
|
-
throw new AuthenticationError(
|
|
1637
|
+
throw new AuthenticationError(
|
|
1638
|
+
this.apiKey ? message : `${message} ${MISSING_KEY_HINT}`,
|
|
1639
|
+
response.status,
|
|
1640
|
+
code
|
|
1641
|
+
);
|
|
1607
1642
|
case 404:
|
|
1608
1643
|
throw new NotFoundError(message, code);
|
|
1609
1644
|
case 429: {
|