sentisense 0.81.0 → 0.82.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 +11 -4
- package/dist/cli.cjs +98 -1
- package/dist/index.cjs +98 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +300 -3
- package/dist/index.d.ts +300 -3
- package/dist/index.mjs +98 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1976,6 +1976,14 @@ interface HolderNotableChanges {
|
|
|
1976
1976
|
* alongside ticker-level totals like `holderCount`.
|
|
1977
1977
|
*/
|
|
1978
1978
|
interface TickerHolders {
|
|
1979
|
+
/**
|
|
1980
|
+
* The security this roster is for, per share class, in SentiSense's spelling. 13F filings
|
|
1981
|
+
* report each share class under its own CUSIP, so `GOOG` is Alphabet's Class C roster and
|
|
1982
|
+
* `GOOGL` its Class A roster. It can differ from the ticker you requested: `BRKB` gives
|
|
1983
|
+
* `BRK.B`, and a recognized former ticker gives the company's current one. It is not the raw
|
|
1984
|
+
* 13F key the filings are recorded under. The rosters of two share classes are separate and must not be
|
|
1985
|
+
* added together as the issuer's holders.
|
|
1986
|
+
*/
|
|
1979
1987
|
ticker: string;
|
|
1980
1988
|
companyName: string;
|
|
1981
1989
|
/** The quarter actually served (ISO date). */
|
|
@@ -2067,6 +2075,56 @@ type InstitutionalFlowsResponse = InstitutionalFlows;
|
|
|
2067
2075
|
interface GetFlowsOptions {
|
|
2068
2076
|
limit?: number;
|
|
2069
2077
|
}
|
|
2078
|
+
/**
|
|
2079
|
+
* One issuer's convertible bonds as institutions reported them on Form 13F for a quarter: a row
|
|
2080
|
+
* of `institutional.getBondFlows()`. Positions are grouped by the issuer's equity ticker.
|
|
2081
|
+
*/
|
|
2082
|
+
interface InstitutionalBondFlow {
|
|
2083
|
+
/** The equity ticker the issuer's bonds are grouped under, e.g. `"ABNB"`. */
|
|
2084
|
+
baseTicker: string;
|
|
2085
|
+
/** Company name; `null` when no name is on record for the issuer. */
|
|
2086
|
+
companyName: string | null;
|
|
2087
|
+
/** Institutional positions in this issuer's bonds. */
|
|
2088
|
+
positionCount: number;
|
|
2089
|
+
/** Total value of those positions, in US dollars. */
|
|
2090
|
+
totalValue: number;
|
|
2091
|
+
/** Net change in shares or units held, summed across the positions. */
|
|
2092
|
+
netSharesChange: number;
|
|
2093
|
+
/**
|
|
2094
|
+
* The bond notations held, as ONE comma-separated string on the wire, not an array: for
|
|
2095
|
+
* example `"ABNB 0 03/15/26, ABNB 0.5 06/15/27"`. Split it on `", "` for a list.
|
|
2096
|
+
*/
|
|
2097
|
+
bondTickers: string;
|
|
2098
|
+
/** Hedge funds holding this issuer's bonds. */
|
|
2099
|
+
hedgeFundCount: number;
|
|
2100
|
+
}
|
|
2101
|
+
/**
|
|
2102
|
+
* One stock's call and put positions as institutions reported them on Form 13F for a quarter: a
|
|
2103
|
+
* row of `institutional.getOptionFlows()`.
|
|
2104
|
+
*
|
|
2105
|
+
* These are quarter-end 13F holdings, not options market activity: for options volume, open
|
|
2106
|
+
* interest and implied volatility, use `client.options` and `stocks.getOptionsSummary()`.
|
|
2107
|
+
*/
|
|
2108
|
+
interface InstitutionalOptionFlow {
|
|
2109
|
+
/** Ticker of the stock the options are on. */
|
|
2110
|
+
ticker: string;
|
|
2111
|
+
/** Company name; `null` when no name is on record for the company. */
|
|
2112
|
+
companyName: string | null;
|
|
2113
|
+
/** Total value of the call option positions, in US dollars. */
|
|
2114
|
+
callValue: number;
|
|
2115
|
+
/** Total value of the put option positions, in US dollars. */
|
|
2116
|
+
putValue: number;
|
|
2117
|
+
/** Call option positions reported. */
|
|
2118
|
+
callPositions: number;
|
|
2119
|
+
/** Put option positions reported. */
|
|
2120
|
+
putPositions: number;
|
|
2121
|
+
/** Net change in call option shares, summed across the positions. */
|
|
2122
|
+
callNetChange: number;
|
|
2123
|
+
/** Net change in put option shares, summed across the positions. */
|
|
2124
|
+
putNetChange: number;
|
|
2125
|
+
/** Hedge funds holding options on this ticker. */
|
|
2126
|
+
hedgeFundCount: number;
|
|
2127
|
+
}
|
|
2070
2128
|
/**
|
|
2071
2129
|
* Paging and sort options for `institutional.getHolders`.
|
|
2072
2130
|
*
|
|
@@ -2174,7 +2232,14 @@ interface HoldersHistoryQuarter {
|
|
|
2174
2232
|
* no 13F coverage.
|
|
2175
2233
|
*/
|
|
2176
2234
|
interface HoldersHistory {
|
|
2177
|
-
/**
|
|
2235
|
+
/**
|
|
2236
|
+
* The security answered for, per share class, in SentiSense's spelling (`BRK.B`, `GOOG`).
|
|
2237
|
+
* 13F filings report each share class under its own CUSIP, so `GOOG` is Alphabet's Class C
|
|
2238
|
+
* and `GOOGL` its Class A. It can differ from the ticker you requested: `BRKB` gives `BRK.B`,
|
|
2239
|
+
* and a recognized former ticker gives the company's current one. It is not the raw 13F key the
|
|
2240
|
+
* filings are recorded under. The histories of two share classes are separate and must not be added
|
|
2241
|
+
* together as the issuer's holders.
|
|
2242
|
+
*/
|
|
2178
2243
|
ticker: string;
|
|
2179
2244
|
quarters: HoldersHistoryQuarter[];
|
|
2180
2245
|
}
|
|
@@ -2652,6 +2717,19 @@ interface GetPoliticianMemberOptions {
|
|
|
2652
2717
|
offset?: number;
|
|
2653
2718
|
}
|
|
2654
2719
|
/** Generic preview wrapper used by PRO-gated endpoints. */
|
|
2720
|
+
/** One calendar on `calendar.list()`. */
|
|
2721
|
+
interface CalendarListing {
|
|
2722
|
+
/** The calendar's type, e.g. `"earnings"`. */
|
|
2723
|
+
type: string;
|
|
2724
|
+
/** Its API path, e.g. `"/api/v1/calendar/earnings"`. */
|
|
2725
|
+
path: string;
|
|
2726
|
+
/** What the calendar holds, in one line. */
|
|
2727
|
+
description: string;
|
|
2728
|
+
}
|
|
2729
|
+
/** The calendars the API serves, returned by `calendar.list()`. */
|
|
2730
|
+
interface CalendarListResponse {
|
|
2731
|
+
calendars: CalendarListing[];
|
|
2732
|
+
}
|
|
2655
2733
|
interface EarningsEvent {
|
|
2656
2734
|
ticker: string;
|
|
2657
2735
|
companyName: string;
|
|
@@ -3235,6 +3313,17 @@ interface MetricDistribution {
|
|
|
3235
3313
|
valueType?: "SHARE_PERCENT" | "MEAN";
|
|
3236
3314
|
[key: string]: unknown;
|
|
3237
3315
|
}
|
|
3316
|
+
/** One dimension a metric can be broken down by, as listed by `entityMetrics.getSlices()`. */
|
|
3317
|
+
interface MetricSlice {
|
|
3318
|
+
/** The metric the slice applies to. */
|
|
3319
|
+
metricType: string;
|
|
3320
|
+
/** Dimension key, e.g. `"source"`. */
|
|
3321
|
+
dimension: string;
|
|
3322
|
+
/** The dimension's values present in the data. */
|
|
3323
|
+
values: string[];
|
|
3324
|
+
/** Human-readable label for the dimension. */
|
|
3325
|
+
displayName: string;
|
|
3326
|
+
}
|
|
3238
3327
|
interface MarketMood {
|
|
3239
3328
|
[key: string]: unknown;
|
|
3240
3329
|
}
|
|
@@ -3243,6 +3332,141 @@ interface MarketMoodOptions {
|
|
|
3243
3332
|
/** Days of history to return. Omit to get the API's default of 180. */
|
|
3244
3333
|
days?: number;
|
|
3245
3334
|
}
|
|
3335
|
+
/** A stock named on a {@link SentimentSectorRow}. */
|
|
3336
|
+
interface SentimentStockRef {
|
|
3337
|
+
/** Member stock ticker. */
|
|
3338
|
+
ticker?: string;
|
|
3339
|
+
/** That stock's sentiment polarity, from -1 (bearish) to 1 (bullish). */
|
|
3340
|
+
value?: number;
|
|
3341
|
+
}
|
|
3342
|
+
/**
|
|
3343
|
+
* One GICS sector on `marketMood.getSentimentSectors()`, read against the market's own
|
|
3344
|
+
* news-and-social tone. Compare sectors on `consensusVsMarket`: financial news reads positive as
|
|
3345
|
+
* a genre, so `meanSentiment` is bullish for most sectors on most days.
|
|
3346
|
+
*
|
|
3347
|
+
* The API omits a field rather than sending `null`, so every field is optional.
|
|
3348
|
+
*/
|
|
3349
|
+
interface SentimentSectorRow {
|
|
3350
|
+
/** GICS level-1 sector name, e.g. `"Information Technology"`. */
|
|
3351
|
+
sector?: string;
|
|
3352
|
+
/** Mean sentiment polarity across the sector's covered stocks, from -1 to 1. */
|
|
3353
|
+
meanSentiment?: number;
|
|
3354
|
+
/** Tone label for `meanSentiment`. */
|
|
3355
|
+
label?: "Bullish" | "Neutral" | "Bearish" | (string & {});
|
|
3356
|
+
/** Mean SentiSense Score across the sector's covered stocks: signed, conviction-weighted, with no fixed range. */
|
|
3357
|
+
meanScore?: number;
|
|
3358
|
+
/** Band label for `meanScore`. */
|
|
3359
|
+
scoreLabel?: string;
|
|
3360
|
+
/**
|
|
3361
|
+
* The sector's directional-consensus ratio over its stocks' summed bullish and bearish
|
|
3362
|
+
* mentions, between -1 and 1. A tone ratio on its own scale, not a SentiSense Score.
|
|
3363
|
+
*/
|
|
3364
|
+
consensusRatio?: number;
|
|
3365
|
+
/**
|
|
3366
|
+
* `consensusRatio` minus the snapshot's `marketConsensusRatio`. Positive means the sector runs
|
|
3367
|
+
* hotter than the market over the same window; negative means cooler than the market, which
|
|
3368
|
+
* is not the same as bearish.
|
|
3369
|
+
*/
|
|
3370
|
+
consensusVsMarket?: number;
|
|
3371
|
+
/** Band label for `consensusVsMarket`. */
|
|
3372
|
+
consensusLabel?: "Hotter than market" | "In line with market" | "Cooler than market" | (string & {});
|
|
3373
|
+
/** Summed bullish mentions of the sector's stocks over the window. */
|
|
3374
|
+
bullMentions?: number;
|
|
3375
|
+
/** Summed bearish mentions of the sector's stocks over the window. */
|
|
3376
|
+
bearMentions?: number;
|
|
3377
|
+
/** Member stocks that had a sentiment reading. */
|
|
3378
|
+
stockCount?: number;
|
|
3379
|
+
/** Summed mention volume across those stocks. */
|
|
3380
|
+
totalMentions?: number;
|
|
3381
|
+
/** The sector's most bullish member stock. */
|
|
3382
|
+
topStock?: SentimentStockRef;
|
|
3383
|
+
/** The sector's most bearish member stock. */
|
|
3384
|
+
bottomStock?: SentimentStockRef;
|
|
3385
|
+
}
|
|
3386
|
+
/**
|
|
3387
|
+
* The per-sector sentiment rollup returned by `marketMood.getSentimentSectors()`, a daily
|
|
3388
|
+
* precomputed snapshot. Before the first snapshot is built, `sectors` is empty and the other
|
|
3389
|
+
* fields are absent.
|
|
3390
|
+
*/
|
|
3391
|
+
interface SentimentSectors {
|
|
3392
|
+
/** Snapshot schema version, e.g. `"1.0"`. */
|
|
3393
|
+
schemaVersion?: string;
|
|
3394
|
+
/** When the rollup was computed, epoch seconds. */
|
|
3395
|
+
generatedAt?: number;
|
|
3396
|
+
/** New York calendar day the snapshot represents, ISO `YYYY-MM-DD`. */
|
|
3397
|
+
asOf?: string;
|
|
3398
|
+
/** One-line summary: the most and least bullish sector, and the covered stock count. */
|
|
3399
|
+
narrative?: string;
|
|
3400
|
+
/**
|
|
3401
|
+
* The whole covered universe's directional-consensus ratio for the window, between -1 and 1:
|
|
3402
|
+
* the market reading each row's `consensusVsMarket` is measured against.
|
|
3403
|
+
*/
|
|
3404
|
+
marketConsensusRatio?: number;
|
|
3405
|
+
/** One row per GICS sector. */
|
|
3406
|
+
sectors: SentimentSectorRow[];
|
|
3407
|
+
}
|
|
3408
|
+
/**
|
|
3409
|
+
* One day of sentiment breadth: how the covered stocks split between bullish, neutral and
|
|
3410
|
+
* bearish, each stock casting one vote by its mean sentiment.
|
|
3411
|
+
*
|
|
3412
|
+
* The `*Pct` fields count stocks; the `*MentionPct` fields weight the same votes by each stock's
|
|
3413
|
+
* mention volume. When the two disagree, a few heavily covered names are carrying the tone.
|
|
3414
|
+
* Shares are percentages from 0 to 100 (`51.5` means 51.5%). The API omits a field rather than
|
|
3415
|
+
* sending `null`, so every field is optional.
|
|
3416
|
+
*/
|
|
3417
|
+
interface SentimentBreadthBucket {
|
|
3418
|
+
/** New York calendar day of this bucket, ISO `YYYY-MM-DD`. */
|
|
3419
|
+
date?: string;
|
|
3420
|
+
/** Stocks with a reading that cleared the snapshot's `minMentions`: the breadth denominator. */
|
|
3421
|
+
coveredStocks?: number;
|
|
3422
|
+
/** Summed mention volume across those stocks. */
|
|
3423
|
+
totalMentions?: number;
|
|
3424
|
+
/** Covered stocks classified bullish. */
|
|
3425
|
+
bullish?: number;
|
|
3426
|
+
/** Covered stocks classified neutral. */
|
|
3427
|
+
neutral?: number;
|
|
3428
|
+
/** Covered stocks classified bearish. */
|
|
3429
|
+
bearish?: number;
|
|
3430
|
+
/** Bullish share of covered stocks, in percent. */
|
|
3431
|
+
bullishPct?: number;
|
|
3432
|
+
/** Neutral share of covered stocks, in percent. */
|
|
3433
|
+
neutralPct?: number;
|
|
3434
|
+
/** Bearish share of covered stocks, in percent. */
|
|
3435
|
+
bearishPct?: number;
|
|
3436
|
+
/** `bullishPct` minus `bearishPct`, in percentage points, from -100 to 100. */
|
|
3437
|
+
netBreadth?: number;
|
|
3438
|
+
/** Bullish share of mentions rather than of stocks, in percent. */
|
|
3439
|
+
bullishMentionPct?: number;
|
|
3440
|
+
/** Neutral share of mentions, in percent. */
|
|
3441
|
+
neutralMentionPct?: number;
|
|
3442
|
+
/** Bearish share of mentions, in percent. */
|
|
3443
|
+
bearishMentionPct?: number;
|
|
3444
|
+
/**
|
|
3445
|
+
* Population standard deviation of the covered stocks' sentiment polarity (each from -1 to 1):
|
|
3446
|
+
* high when stocks disagree with each other, low when they share one mood. Absent when fewer
|
|
3447
|
+
* than two stocks are covered.
|
|
3448
|
+
*/
|
|
3449
|
+
sentimentDispersion?: number;
|
|
3450
|
+
}
|
|
3451
|
+
/**
|
|
3452
|
+
* Market-wide sentiment breadth returned by `marketMood.getSentimentBreadth()`, a daily
|
|
3453
|
+
* precomputed snapshot. Before the first snapshot is built, `series` is empty and the other
|
|
3454
|
+
* fields are absent.
|
|
3455
|
+
*/
|
|
3456
|
+
interface SentimentBreadth {
|
|
3457
|
+
/** Snapshot schema version, e.g. `"1.0"`. */
|
|
3458
|
+
schemaVersion?: string;
|
|
3459
|
+
/** When the rollup was computed, epoch seconds. */
|
|
3460
|
+
generatedAt?: number;
|
|
3461
|
+
/** New York calendar day the snapshot represents, ISO `YYYY-MM-DD`. */
|
|
3462
|
+
asOf?: string;
|
|
3463
|
+
/** Minimum mention volume for a stock to count toward breadth. */
|
|
3464
|
+
minMentions?: number;
|
|
3465
|
+
/** The newest entry of `series`, also served on its own here. */
|
|
3466
|
+
latest?: SentimentBreadthBucket;
|
|
3467
|
+
/** Daily buckets, oldest to newest. */
|
|
3468
|
+
series: SentimentBreadthBucket[];
|
|
3469
|
+
}
|
|
3246
3470
|
/** AI-generated market summary with headline and analysis. */
|
|
3247
3471
|
interface MarketSummary {
|
|
3248
3472
|
/** Not populated by the API (always empty); retained for backward compatibility. */
|
|
@@ -4555,6 +4779,14 @@ declare class Analyst {
|
|
|
4555
4779
|
declare class Calendar {
|
|
4556
4780
|
private client;
|
|
4557
4781
|
constructor(client: APIClient);
|
|
4782
|
+
/**
|
|
4783
|
+
* List the calendars the API serves, with the path of each, so a client can find them
|
|
4784
|
+
* without hardcoding paths.
|
|
4785
|
+
*
|
|
4786
|
+
* Every tier receives the same list, and the call does not count against the monthly quota;
|
|
4787
|
+
* the per-minute rate limit still applies.
|
|
4788
|
+
*/
|
|
4789
|
+
list(): Promise<CalendarListResponse>;
|
|
4558
4790
|
/**
|
|
4559
4791
|
* Upcoming company earnings, sorted by date.
|
|
4560
4792
|
*
|
|
@@ -4727,6 +4959,19 @@ declare class EntityMetrics {
|
|
|
4727
4959
|
* epoch milliseconds. Without a window the API uses the last 7 days.
|
|
4728
4960
|
*/
|
|
4729
4961
|
getDistribution(symbol: string, metricType: MetricType, options?: MetricDistributionOptions): Promise<MetricDistribution>;
|
|
4962
|
+
/**
|
|
4963
|
+
* List the dimensions a metric can be broken down by for one entity, with the values present
|
|
4964
|
+
* in the data, so you can see what exists before calling `getDistribution()`.
|
|
4965
|
+
*
|
|
4966
|
+
* Returns a plain array, empty when the metric has no slices for this entity. Available on
|
|
4967
|
+
* every tier; each call counts against the monthly quota.
|
|
4968
|
+
*
|
|
4969
|
+
* @param symbol Ticker symbol (e.g. "AAPL") or entity urlSlug (e.g. "Nancy-Pelosi").
|
|
4970
|
+
* @param metricType The metric to look up (e.g. "mentions").
|
|
4971
|
+
* @throws {SentiSenseError} Before any request, when `symbol` or `metricType` is empty,
|
|
4972
|
+
* whitespace only, `"."` or `".."`.
|
|
4973
|
+
*/
|
|
4974
|
+
getSlices(symbol: string, metricType: MetricType): Promise<MetricSlice[]>;
|
|
4730
4975
|
}
|
|
4731
4976
|
|
|
4732
4977
|
interface EtfInfo {
|
|
@@ -5209,6 +5454,31 @@ declare class Institutional {
|
|
|
5209
5454
|
* Returns the preview envelope, so read the rows as `.data`.
|
|
5210
5455
|
*/
|
|
5211
5456
|
getActivists(reportDate: string): Promise<PreviewResponse<Holder[]>>;
|
|
5457
|
+
/**
|
|
5458
|
+
* Get convertible bond positions from 13F filings for one quarter, one row per issuer,
|
|
5459
|
+
* grouped by the issuer's equity ticker.
|
|
5460
|
+
*
|
|
5461
|
+
* `reportDate` is the quarter end as an ISO date (e.g. `"2026-06-30"`); the API requires it,
|
|
5462
|
+
* so take one from `getQuarters()`. Returns the preview envelope, so the rows are `.data`. A
|
|
5463
|
+
* FREE key receives the top three rows with `isPreview: true` and `totalCount` holding the full
|
|
5464
|
+
* row count; a PRO key receives the full list.
|
|
5465
|
+
*
|
|
5466
|
+
* Each row's `bondTickers` is one comma-separated string, not an array.
|
|
5467
|
+
*/
|
|
5468
|
+
getBondFlows(reportDate: string): Promise<PreviewResponse<InstitutionalBondFlow[]>>;
|
|
5469
|
+
/**
|
|
5470
|
+
* Get the call and put positions institutions reported on Form 13F for one quarter, one row
|
|
5471
|
+
* per stock.
|
|
5472
|
+
*
|
|
5473
|
+
* These are quarter-end 13F holdings, not options market activity: for options volume, open
|
|
5474
|
+
* interest and implied volatility, use `client.options` and `stocks.getOptionsSummary()`.
|
|
5475
|
+
*
|
|
5476
|
+
* `reportDate` is the quarter end as an ISO date (e.g. `"2026-06-30"`); the API requires it,
|
|
5477
|
+
* so take one from `getQuarters()`. Returns the preview envelope, so the rows are `.data`. A
|
|
5478
|
+
* FREE key receives the top three rows with `isPreview: true` and `totalCount` holding the full
|
|
5479
|
+
* row count; a PRO key receives the full list.
|
|
5480
|
+
*/
|
|
5481
|
+
getOptionFlows(reportDate: string): Promise<PreviewResponse<InstitutionalOptionFlow[]>>;
|
|
5212
5482
|
/**
|
|
5213
5483
|
* Discover institutions: a paginated, AUM-ranked list of filers (slug + metadata)
|
|
5214
5484
|
* so you can find what to query without knowing slugs upfront.
|
|
@@ -5338,6 +5608,33 @@ declare class MarketMoodResource {
|
|
|
5338
5608
|
*/
|
|
5339
5609
|
get(options?: MarketMoodOptions): Promise<MarketMood>;
|
|
5340
5610
|
get(): Promise<MarketMood>;
|
|
5611
|
+
/**
|
|
5612
|
+
* Get the per-sector sentiment rollup: the 11 GICS sectors, each measured against the
|
|
5613
|
+
* market's own news-and-social tone.
|
|
5614
|
+
*
|
|
5615
|
+
* Compare sectors on `consensusVsMarket`, the gap between a sector's bullish-versus-bearish
|
|
5616
|
+
* mention balance and the market's. Available on every tier with the same response; each
|
|
5617
|
+
* call counts against the monthly quota. It is a daily precomputed snapshot, so `generatedAt`
|
|
5618
|
+
* (epoch seconds) is its freshness.
|
|
5619
|
+
*
|
|
5620
|
+
* @example
|
|
5621
|
+
* const { sectors } = await client.marketMood.getSentimentSectors();
|
|
5622
|
+
* for (const s of sectors) console.log(s.sector, s.consensusVsMarket, s.consensusLabel);
|
|
5623
|
+
*/
|
|
5624
|
+
getSentimentSectors(): Promise<SentimentSectors>;
|
|
5625
|
+
/**
|
|
5626
|
+
* Get market-wide sentiment breadth: each day's share of the covered US stocks leaning
|
|
5627
|
+
* bullish, neutral or bearish, the tone analogue of an advance/decline line.
|
|
5628
|
+
*
|
|
5629
|
+
* `series` runs oldest to newest, and `latest` is the newest entry of `series`. Available on
|
|
5630
|
+
* every tier with the same response; each call counts against the monthly quota. It is a daily
|
|
5631
|
+
* precomputed snapshot, so `generatedAt` (epoch seconds) is its freshness.
|
|
5632
|
+
*
|
|
5633
|
+
* @example
|
|
5634
|
+
* const breadth = await client.marketMood.getSentimentBreadth();
|
|
5635
|
+
* console.log(breadth.latest?.date, breadth.latest?.netBreadth);
|
|
5636
|
+
*/
|
|
5637
|
+
getSentimentBreadth(): Promise<SentimentBreadth>;
|
|
5341
5638
|
}
|
|
5342
5639
|
|
|
5343
5640
|
declare class MarketSummaryResource {
|
|
@@ -6010,6 +6307,6 @@ declare class APIError extends SentiSenseError {
|
|
|
6010
6307
|
constructor(message: string, status: number, code?: string, body?: ErrorBody);
|
|
6011
6308
|
}
|
|
6012
6309
|
|
|
6013
|
-
declare const VERSION = "0.
|
|
6310
|
+
declare const VERSION = "0.82.0";
|
|
6014
6311
|
|
|
6015
|
-
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 DossierAllowance, 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 ErrorBody, 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 FundamentalsHistory, type FundamentalsLineSource, 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 GetFundamentalsHistoryOptions, 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 };
|
|
6312
|
+
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 CalendarListResponse, type CalendarListing, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type DossierAllowance, 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 ErrorBody, 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 FundamentalsHistory, type FundamentalsLineSource, 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 GetFundamentalsHistoryOptions, 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 InstitutionalBondFlow, type InstitutionalFlow, type InstitutionalFlows, type InstitutionalFlowsResponse, type InstitutionalOptionFlow, 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 MetricSlice, 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 SentimentBreadth, type SentimentBreadthBucket, type SentimentEntry, type SentimentSectorRow, type SentimentSectors, type SentimentStockRef, 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
|
@@ -218,6 +218,16 @@ var Calendar = class {
|
|
|
218
218
|
constructor(client) {
|
|
219
219
|
this.client = client;
|
|
220
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* List the calendars the API serves, with the path of each, so a client can find them
|
|
223
|
+
* without hardcoding paths.
|
|
224
|
+
*
|
|
225
|
+
* Every tier receives the same list, and the call does not count against the monthly quota;
|
|
226
|
+
* the per-minute rate limit still applies.
|
|
227
|
+
*/
|
|
228
|
+
async list() {
|
|
229
|
+
return this.client.get("/api/v1/calendar");
|
|
230
|
+
}
|
|
221
231
|
/**
|
|
222
232
|
* Upcoming company earnings, sorted by date.
|
|
223
233
|
*
|
|
@@ -399,6 +409,14 @@ var Earnings = class {
|
|
|
399
409
|
};
|
|
400
410
|
|
|
401
411
|
// src/resources/entityMetrics.ts
|
|
412
|
+
function requirePathSegment(method, name, value) {
|
|
413
|
+
if (typeof value !== "string" || value.trim() === "" || value === "." || value === "..") {
|
|
414
|
+
throw new SentiSenseError(
|
|
415
|
+
`${method}: ${name} must not be empty, "." or ".." (got ${JSON.stringify(value)})`
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
return value;
|
|
419
|
+
}
|
|
402
420
|
var EntityMetrics = class {
|
|
403
421
|
constructor(client) {
|
|
404
422
|
this.client = client;
|
|
@@ -449,6 +467,25 @@ var EntityMetrics = class {
|
|
|
449
467
|
}
|
|
450
468
|
);
|
|
451
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* List the dimensions a metric can be broken down by for one entity, with the values present
|
|
472
|
+
* in the data, so you can see what exists before calling `getDistribution()`.
|
|
473
|
+
*
|
|
474
|
+
* Returns a plain array, empty when the metric has no slices for this entity. Available on
|
|
475
|
+
* every tier; each call counts against the monthly quota.
|
|
476
|
+
*
|
|
477
|
+
* @param symbol Ticker symbol (e.g. "AAPL") or entity urlSlug (e.g. "Nancy-Pelosi").
|
|
478
|
+
* @param metricType The metric to look up (e.g. "mentions").
|
|
479
|
+
* @throws {SentiSenseError} Before any request, when `symbol` or `metricType` is empty,
|
|
480
|
+
* whitespace only, `"."` or `".."`.
|
|
481
|
+
*/
|
|
482
|
+
async getSlices(symbol, metricType) {
|
|
483
|
+
const entity = requirePathSegment("entityMetrics.getSlices", "symbol", symbol);
|
|
484
|
+
const metric = requirePathSegment("entityMetrics.getSlices", "metricType", metricType);
|
|
485
|
+
return this.client.get(
|
|
486
|
+
`/api/v2/metrics/entity/${encodeURIComponent(entity)}/metric/${encodeURIComponent(metric)}/slices`
|
|
487
|
+
);
|
|
488
|
+
}
|
|
452
489
|
};
|
|
453
490
|
|
|
454
491
|
// src/resources/etfs.ts
|
|
@@ -824,6 +861,35 @@ var Institutional = class {
|
|
|
824
861
|
async getActivists(reportDate) {
|
|
825
862
|
return this.client.get("/api/v1/institutional/activist", { reportDate });
|
|
826
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* Get convertible bond positions from 13F filings for one quarter, one row per issuer,
|
|
866
|
+
* grouped by the issuer's equity ticker.
|
|
867
|
+
*
|
|
868
|
+
* `reportDate` is the quarter end as an ISO date (e.g. `"2026-06-30"`); the API requires it,
|
|
869
|
+
* so take one from `getQuarters()`. Returns the preview envelope, so the rows are `.data`. A
|
|
870
|
+
* FREE key receives the top three rows with `isPreview: true` and `totalCount` holding the full
|
|
871
|
+
* row count; a PRO key receives the full list.
|
|
872
|
+
*
|
|
873
|
+
* Each row's `bondTickers` is one comma-separated string, not an array.
|
|
874
|
+
*/
|
|
875
|
+
async getBondFlows(reportDate) {
|
|
876
|
+
return this.client.get("/api/v1/institutional/bonds", { reportDate });
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Get the call and put positions institutions reported on Form 13F for one quarter, one row
|
|
880
|
+
* per stock.
|
|
881
|
+
*
|
|
882
|
+
* These are quarter-end 13F holdings, not options market activity: for options volume, open
|
|
883
|
+
* interest and implied volatility, use `client.options` and `stocks.getOptionsSummary()`.
|
|
884
|
+
*
|
|
885
|
+
* `reportDate` is the quarter end as an ISO date (e.g. `"2026-06-30"`); the API requires it,
|
|
886
|
+
* so take one from `getQuarters()`. Returns the preview envelope, so the rows are `.data`. A
|
|
887
|
+
* FREE key receives the top three rows with `isPreview: true` and `totalCount` holding the full
|
|
888
|
+
* row count; a PRO key receives the full list.
|
|
889
|
+
*/
|
|
890
|
+
async getOptionFlows(reportDate) {
|
|
891
|
+
return this.client.get("/api/v1/institutional/options", { reportDate });
|
|
892
|
+
}
|
|
827
893
|
/**
|
|
828
894
|
* Discover institutions: a paginated, AUM-ranked list of filers (slug + metadata)
|
|
829
895
|
* so you can find what to query without knowing slugs upfront.
|
|
@@ -965,6 +1031,37 @@ var MarketMoodResource = class {
|
|
|
965
1031
|
// index envelope alongside fed-sentiment and ai-sentiment. Use this resource when you want
|
|
966
1032
|
// the phase band, weekly change, per-signal breakdown and per-sector map; use `indexes`
|
|
967
1033
|
// when you want every index to answer the same shape. Both report the same headline number.
|
|
1034
|
+
/**
|
|
1035
|
+
* Get the per-sector sentiment rollup: the 11 GICS sectors, each measured against the
|
|
1036
|
+
* market's own news-and-social tone.
|
|
1037
|
+
*
|
|
1038
|
+
* Compare sectors on `consensusVsMarket`, the gap between a sector's bullish-versus-bearish
|
|
1039
|
+
* mention balance and the market's. Available on every tier with the same response; each
|
|
1040
|
+
* call counts against the monthly quota. It is a daily precomputed snapshot, so `generatedAt`
|
|
1041
|
+
* (epoch seconds) is its freshness.
|
|
1042
|
+
*
|
|
1043
|
+
* @example
|
|
1044
|
+
* const { sectors } = await client.marketMood.getSentimentSectors();
|
|
1045
|
+
* for (const s of sectors) console.log(s.sector, s.consensusVsMarket, s.consensusLabel);
|
|
1046
|
+
*/
|
|
1047
|
+
async getSentimentSectors() {
|
|
1048
|
+
return this.client.get("/api/v1/sentiment/sectors");
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Get market-wide sentiment breadth: each day's share of the covered US stocks leaning
|
|
1052
|
+
* bullish, neutral or bearish, the tone analogue of an advance/decline line.
|
|
1053
|
+
*
|
|
1054
|
+
* `series` runs oldest to newest, and `latest` is the newest entry of `series`. Available on
|
|
1055
|
+
* every tier with the same response; each call counts against the monthly quota. It is a daily
|
|
1056
|
+
* precomputed snapshot, so `generatedAt` (epoch seconds) is its freshness.
|
|
1057
|
+
*
|
|
1058
|
+
* @example
|
|
1059
|
+
* const breadth = await client.marketMood.getSentimentBreadth();
|
|
1060
|
+
* console.log(breadth.latest?.date, breadth.latest?.netBreadth);
|
|
1061
|
+
*/
|
|
1062
|
+
async getSentimentBreadth() {
|
|
1063
|
+
return this.client.get("/api/v1/sentiment/breadth");
|
|
1064
|
+
}
|
|
968
1065
|
};
|
|
969
1066
|
|
|
970
1067
|
// src/resources/marketSummary.ts
|
|
@@ -1562,7 +1659,7 @@ function serializeTrackerParams(params) {
|
|
|
1562
1659
|
}
|
|
1563
1660
|
|
|
1564
1661
|
// src/version.ts
|
|
1565
|
-
var VERSION = "0.
|
|
1662
|
+
var VERSION = "0.82.0";
|
|
1566
1663
|
|
|
1567
1664
|
// src/client.ts
|
|
1568
1665
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|