sentisense 0.61.0 → 0.62.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 +8 -2
- package/dist/cli.cjs +113 -36
- package/dist/index.cjs +41 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +319 -10
- package/dist/index.d.ts +319 -10
- package/dist/index.mjs +41 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -191,12 +191,120 @@ interface StockProfile {
|
|
|
191
191
|
imageUrl?: string | null;
|
|
192
192
|
[key: string]: unknown;
|
|
193
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* A knowledge-base entity related to a stock (a person, product, partner and so on), as
|
|
196
|
+
* returned by `stocks.getEntities()`.
|
|
197
|
+
*
|
|
198
|
+
* Address the entity by `urlSlug` (the handle the metric and document endpoints take) and
|
|
199
|
+
* label it with `displayName`.
|
|
200
|
+
*/
|
|
194
201
|
interface StockEntity {
|
|
202
|
+
/**
|
|
203
|
+
* Entity id as sent by the API.
|
|
204
|
+
* @deprecated Not a stable public identifier. Use `urlSlug` to refer to an entity.
|
|
205
|
+
*/
|
|
206
|
+
id: string;
|
|
207
|
+
/** Human-readable name, e.g. `"Tim Cook"`. */
|
|
208
|
+
displayName: string;
|
|
209
|
+
/** Entity type, e.g. `"PERSON"`, `"COMPANY"`, `"PRODUCT_OR_SERVICE"`. */
|
|
210
|
+
type: string;
|
|
211
|
+
/** Ticker of the stock this entity is related to. */
|
|
212
|
+
relatedStock?: string | null;
|
|
213
|
+
/** Handle the metric and document endpoints address this entity by. `null` when it has none. */
|
|
214
|
+
urlSlug?: string | null;
|
|
215
|
+
/** A person's title, e.g. `"Executive Chairman"`. `null` for non-people. */
|
|
216
|
+
title?: string | null;
|
|
217
|
+
/** A product's category. `null` for non-products. */
|
|
218
|
+
category?: string | null;
|
|
219
|
+
/** Icon image URL, or `null` when none is assigned. */
|
|
220
|
+
iconUrl?: string | null;
|
|
221
|
+
/** App Store id when the product has a tracked companion app. Omitted otherwise. */
|
|
222
|
+
appId?: string | null;
|
|
223
|
+
/** @deprecated Never sent by the API. To refer to the entity, use `urlSlug`. */
|
|
195
224
|
entityId: string;
|
|
225
|
+
/** @deprecated Never sent by the API; read `displayName`. */
|
|
196
226
|
name: string;
|
|
197
|
-
type: string;
|
|
198
227
|
[key: string]: unknown;
|
|
199
228
|
}
|
|
229
|
+
/** Options for `stocks.getGraph()`. */
|
|
230
|
+
interface GetStockGraphOptions {
|
|
231
|
+
/** Hops from the stock's own company node: `1` (default) or `2`. */
|
|
232
|
+
depth?: 1 | 2;
|
|
233
|
+
/** Maximum nodes in the response, 1 to 200. Omitted, the API uses 75. */
|
|
234
|
+
cap?: number;
|
|
235
|
+
}
|
|
236
|
+
/** One node in a {@link StockGraph}. Every identifier in the graph is a `slug`. */
|
|
237
|
+
interface GraphNode {
|
|
238
|
+
/** Handle for this entity, the same one the metric and document endpoints take. */
|
|
239
|
+
slug: string;
|
|
240
|
+
displayName: string;
|
|
241
|
+
/** `"COMPANY"`, `"PERSON"`, `"PRODUCT_OR_SERVICE"`, `"ORGANIZATION"`, `"PUBLISHER"`, `"TOPIC"`, ... */
|
|
242
|
+
type: string;
|
|
243
|
+
}
|
|
244
|
+
/** One typed relationship in a {@link StockGraph}, between two node slugs. */
|
|
245
|
+
interface GraphEdge {
|
|
246
|
+
/** Slug of the node the relationship starts from. */
|
|
247
|
+
source: string;
|
|
248
|
+
/** Slug of the node the relationship points to. */
|
|
249
|
+
target: string;
|
|
250
|
+
/** Relationship type, e.g. `"LEADS"`, `"FOUNDED"`, `"PRODUCT_OF"`, `"VARIANT_OF"`, `"PEER"`. */
|
|
251
|
+
type: string;
|
|
252
|
+
/** `"DIRECTED"` (source to target) or `"BIDIRECTIONAL"` (for example peers). */
|
|
253
|
+
direction: string;
|
|
254
|
+
/**
|
|
255
|
+
* Extra facts about the relationship, all values as strings. Keys depend on the edge
|
|
256
|
+
* type, for example `role` and `since` on `LEADS`, `year` on `FOUNDED`. Empty when the
|
|
257
|
+
* edge carries none.
|
|
258
|
+
*/
|
|
259
|
+
properties: Record<string, string>;
|
|
260
|
+
}
|
|
261
|
+
/** A product family and the slugs of its member products. */
|
|
262
|
+
interface GraphProductFamily {
|
|
263
|
+
/** Family name, e.g. `"iPhone"`. */
|
|
264
|
+
family: string;
|
|
265
|
+
/** Slugs of the products in the family. */
|
|
266
|
+
members: string[];
|
|
267
|
+
}
|
|
268
|
+
/** Node slugs in a {@link StockGraph}, grouped by role relative to the stock. */
|
|
269
|
+
interface GraphGroups {
|
|
270
|
+
people: string[];
|
|
271
|
+
products: string[];
|
|
272
|
+
productFamilies: GraphProductFamily[];
|
|
273
|
+
/** Peer companies. */
|
|
274
|
+
peers: string[];
|
|
275
|
+
organizations: string[];
|
|
276
|
+
publishers: string[];
|
|
277
|
+
topics: string[];
|
|
278
|
+
}
|
|
279
|
+
/** Size of a {@link StockGraph}. */
|
|
280
|
+
interface GraphCounts {
|
|
281
|
+
nodes: number;
|
|
282
|
+
edges: number;
|
|
283
|
+
/** Node count per node `type`, e.g. `{ PERSON: 6, PRODUCT_OR_SERVICE: 23 }`. */
|
|
284
|
+
byType: Record<string, number>;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* The company knowledge graph around one stock, from `GET /api/v1/stocks/{ticker}/graph`:
|
|
288
|
+
* the people, products, peers and other entities linked to the company, and the typed
|
|
289
|
+
* relationships between them. Every identifier is a slug.
|
|
290
|
+
*/
|
|
291
|
+
interface StockGraph {
|
|
292
|
+
ticker: string;
|
|
293
|
+
/** Slug of the stock's own company node, the graph's starting point. */
|
|
294
|
+
root: string;
|
|
295
|
+
/** Depth the graph was walked to (1 or 2). */
|
|
296
|
+
depth: number;
|
|
297
|
+
/** Node cap applied to this response. */
|
|
298
|
+
cap: number;
|
|
299
|
+
/** True when the cap cut the graph short. */
|
|
300
|
+
truncated: boolean;
|
|
301
|
+
/** Nodes left out because they carry no slug. */
|
|
302
|
+
omitted: number;
|
|
303
|
+
counts: GraphCounts;
|
|
304
|
+
groups: GraphGroups;
|
|
305
|
+
nodes: GraphNode[];
|
|
306
|
+
edges: GraphEdge[];
|
|
307
|
+
}
|
|
200
308
|
/** Per-source tone for a stock: where the conversation is, and how it leans. */
|
|
201
309
|
interface SentimentSourceTone {
|
|
202
310
|
/** "News", "Reddit", "X", "YouTube", "Substack". */
|
|
@@ -446,18 +554,81 @@ interface FundamentalsPeriodsResponse {
|
|
|
446
554
|
/** Populated when no periods are available, explaining why. */
|
|
447
555
|
reason?: string | null;
|
|
448
556
|
}
|
|
557
|
+
/** One settlement-date reading in {@link ShortInterest}. */
|
|
558
|
+
interface ShortInterestDataPoint {
|
|
559
|
+
/** Shares sold short and not yet covered as of `settlementDate`. */
|
|
560
|
+
shortInterest: number | null;
|
|
561
|
+
/** `shortInterest` divided by `avgDailyVolume`: trading days to cover at average volume. */
|
|
562
|
+
daysToCover: number | null;
|
|
563
|
+
/** Average daily trading volume, in shares. */
|
|
564
|
+
avgDailyVolume: number | null;
|
|
565
|
+
/** ISO date `"YYYY-MM-DD"` of the settlement this reading is for. */
|
|
566
|
+
settlementDate: string | null;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Short interest history from `stocks.getShortInterest()`, newest first. An unknown
|
|
570
|
+
* ticker returns an empty `dataPoints` array and `count: 0`, not an error.
|
|
571
|
+
*/
|
|
449
572
|
interface ShortInterest {
|
|
450
573
|
ticker: string;
|
|
574
|
+
dataPoints: ShortInterestDataPoint[];
|
|
575
|
+
/** Number of entries in `dataPoints`. */
|
|
576
|
+
count: number;
|
|
451
577
|
[key: string]: unknown;
|
|
452
578
|
}
|
|
579
|
+
/**
|
|
580
|
+
* Free float from `stocks.getFloat()`. An unknown ticker returns every field other than
|
|
581
|
+
* `ticker` as `null`, not an error.
|
|
582
|
+
*/
|
|
453
583
|
interface FloatInfo {
|
|
454
584
|
ticker: string;
|
|
585
|
+
/**
|
|
586
|
+
* Shares available to trade publicly. `0` means the symbol has no free float, as with
|
|
587
|
+
* funds such as SPY or QQQ. Shares outstanding is not on this response; read it from
|
|
588
|
+
* the fundamentals endpoints.
|
|
589
|
+
*/
|
|
590
|
+
freeFloat: number | null;
|
|
591
|
+
/** Free float as percentage points of shares outstanding: `92.1` means 92.1%. */
|
|
592
|
+
freeFloatPercent: number | null;
|
|
593
|
+
/**
|
|
594
|
+
* Date the float figure is effective: `"YYYY-MM-DD"` or `"YYYY-MM-DD HH:mm:ss"`
|
|
595
|
+
* depending on the data source, so parse it leniently.
|
|
596
|
+
*/
|
|
597
|
+
effectiveDate: string | null;
|
|
455
598
|
[key: string]: unknown;
|
|
456
599
|
}
|
|
600
|
+
/** One trading day in {@link ShortVolume}. */
|
|
601
|
+
interface ShortVolumeDataPoint {
|
|
602
|
+
/** Shares sold short that day on the reporting venues. */
|
|
603
|
+
shortVolume: number | null;
|
|
604
|
+
/** Total shares traded that day on the same reporting venues, not consolidated volume. */
|
|
605
|
+
totalVolume: number | null;
|
|
606
|
+
/** `shortVolume` as percentage points of `totalVolume`: `41.04` means 41.04%. */
|
|
607
|
+
shortVolumeRatio: number | null;
|
|
608
|
+
/** ISO date `"YYYY-MM-DD"` of the trading day. */
|
|
609
|
+
date: string | null;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Daily short volume from `stocks.getShortVolume()`, newest first. An unknown ticker
|
|
613
|
+
* returns an empty `dataPoints` array and `count: 0`, not an error.
|
|
614
|
+
*/
|
|
457
615
|
interface ShortVolume {
|
|
458
616
|
ticker: string;
|
|
617
|
+
dataPoints: ShortVolumeDataPoint[];
|
|
618
|
+
/** Number of entries in `dataPoints`. */
|
|
619
|
+
count: number;
|
|
459
620
|
[key: string]: unknown;
|
|
460
621
|
}
|
|
622
|
+
/** Options for `stocks.getShortInterest()`. */
|
|
623
|
+
interface GetShortInterestOptions {
|
|
624
|
+
/** Settlement dates to return. Omitted, the API returns 24. */
|
|
625
|
+
limit?: number;
|
|
626
|
+
}
|
|
627
|
+
/** Options for `stocks.getShortVolume()`. */
|
|
628
|
+
interface GetShortVolumeOptions {
|
|
629
|
+
/** Trading days to return. Omitted, the API returns 90. */
|
|
630
|
+
limit?: number;
|
|
631
|
+
}
|
|
461
632
|
interface MetricsBreakdown {
|
|
462
633
|
[key: string]: unknown;
|
|
463
634
|
}
|
|
@@ -2286,8 +2457,35 @@ interface KpiTypeEntry {
|
|
|
2286
2457
|
category: string;
|
|
2287
2458
|
chartType: string;
|
|
2288
2459
|
}
|
|
2460
|
+
/**
|
|
2461
|
+
* A knowledge-base entity, as returned by `kb.getPopularEntities()`. Address it by
|
|
2462
|
+
* `urlSlug` and label it with `displayName`.
|
|
2463
|
+
*/
|
|
2289
2464
|
interface KBEntity {
|
|
2465
|
+
/**
|
|
2466
|
+
* Entity id as sent by the API.
|
|
2467
|
+
* @deprecated Not a stable public identifier. Use `urlSlug` to refer to an entity.
|
|
2468
|
+
*/
|
|
2469
|
+
id: string;
|
|
2470
|
+
/** Human-readable name, e.g. `"Elon Musk"`. */
|
|
2471
|
+
displayName: string;
|
|
2472
|
+
/** Entity type, e.g. `"PERSON"`, `"COMPANY"`, `"PRODUCT_OR_SERVICE"`. */
|
|
2473
|
+
type: string;
|
|
2474
|
+
/** Ticker of the stock this entity is most closely related to, when it has one. */
|
|
2475
|
+
relatedStock?: string | null;
|
|
2476
|
+
/** Handle the metric and document endpoints address this entity by. `null` when it has none. */
|
|
2477
|
+
urlSlug?: string | null;
|
|
2478
|
+
/** A person's title. `null` for non-people. */
|
|
2479
|
+
title?: string | null;
|
|
2480
|
+
/** A product's category. `null` for non-products. */
|
|
2481
|
+
category?: string | null;
|
|
2482
|
+
/** Icon image URL, or `null` when none is assigned. */
|
|
2483
|
+
iconUrl?: string | null;
|
|
2484
|
+
/** App Store id when the product has a tracked companion app. Omitted otherwise. */
|
|
2485
|
+
appId?: string | null;
|
|
2486
|
+
/** @deprecated Never sent by the API. To refer to the entity, use `urlSlug`. */
|
|
2290
2487
|
entityId: string;
|
|
2488
|
+
/** @deprecated Never sent by the API; read `displayName`. */
|
|
2291
2489
|
name: string;
|
|
2292
2490
|
[key: string]: unknown;
|
|
2293
2491
|
}
|
|
@@ -2928,12 +3126,42 @@ interface AnalystAction {
|
|
|
2928
3126
|
fromGrade: string | null;
|
|
2929
3127
|
toGrade: string | null;
|
|
2930
3128
|
}
|
|
3129
|
+
/** Which forward period an {@link AnalystEstimate} covers. */
|
|
3130
|
+
type AnalystEstimatePeriodType = "CURRENT_QUARTER" | "NEXT_QUARTER" | "CURRENT_YEAR" | "NEXT_YEAR";
|
|
3131
|
+
/** Consensus EPS estimate for one forward period. */
|
|
2931
3132
|
interface AnalystEstimate {
|
|
2932
|
-
/**
|
|
3133
|
+
/**
|
|
3134
|
+
* Period label as sent by the API: usually a date such as `"2026-10-29"` for the
|
|
3135
|
+
* current quarter (a relative code such as `"0q"` when no date is known yet), a
|
|
3136
|
+
* relative code such as `"+1q"`, `"0y"` or `"+1y"` otherwise. Use
|
|
3137
|
+
* `periodType` to tell periods apart.
|
|
3138
|
+
*/
|
|
3139
|
+
periodLabel: string | null;
|
|
3140
|
+
periodType: AnalystEstimatePeriodType | null;
|
|
3141
|
+
/** Lowest analyst EPS estimate for the period. */
|
|
3142
|
+
estimateLow: number | null;
|
|
3143
|
+
/** Mean analyst EPS estimate for the period. */
|
|
3144
|
+
estimateMean: number | null;
|
|
3145
|
+
/** Highest analyst EPS estimate for the period. */
|
|
3146
|
+
estimateHigh: number | null;
|
|
3147
|
+
/** Analysts contributing to the estimate. */
|
|
3148
|
+
numberOfAnalysts: number | null;
|
|
2933
3149
|
[key: string]: unknown;
|
|
2934
3150
|
}
|
|
3151
|
+
/** Reported EPS against the consensus estimate for one past report. */
|
|
2935
3152
|
interface AnalystEarningsSurprise {
|
|
2936
|
-
/**
|
|
3153
|
+
/** Period label as sent by the API, e.g. `"2026-07-30"`. */
|
|
3154
|
+
periodLabel: string | null;
|
|
3155
|
+
/** ISO date `"YYYY-MM-DD"` the results were reported. */
|
|
3156
|
+
reportDate: string | null;
|
|
3157
|
+
/** Consensus EPS estimate going into the report. */
|
|
3158
|
+
estimateEps: number | null;
|
|
3159
|
+
/** Reported EPS. */
|
|
3160
|
+
actualEps: number | null;
|
|
3161
|
+
/**
|
|
3162
|
+
* As sent by the API: a fraction rounded to 2 decimals (0.07 = 7%), despite the name.
|
|
3163
|
+
*/
|
|
3164
|
+
surprisePercent: number | null;
|
|
2937
3165
|
[key: string]: unknown;
|
|
2938
3166
|
}
|
|
2939
3167
|
interface AnalystEstimatesResponse {
|
|
@@ -2956,6 +3184,15 @@ interface GetAnalystMarketActivityOptions {
|
|
|
2956
3184
|
/** Days of history to return. Default 30. */
|
|
2957
3185
|
lookbackDays?: number;
|
|
2958
3186
|
}
|
|
3187
|
+
/** A named analyst, as referenced from a note. */
|
|
3188
|
+
interface AnalystRef {
|
|
3189
|
+
/**
|
|
3190
|
+
* Addresses `analyst.profile(slug)` and `analyst.calls(slug)`. `null` when we hold no
|
|
3191
|
+
* profile for the named analyst; the `name` is still returned.
|
|
3192
|
+
*/
|
|
3193
|
+
slug: string | null;
|
|
3194
|
+
name: string;
|
|
3195
|
+
}
|
|
2959
3196
|
/** One price target note. */
|
|
2960
3197
|
interface AnalystNote {
|
|
2961
3198
|
/** ISO date the note was published, `"YYYY-MM-DD"`. */
|
|
@@ -2964,7 +3201,7 @@ interface AnalystNote {
|
|
|
2964
3201
|
* The individual named on the note, or `null` when the report named nobody.
|
|
2965
3202
|
* Absent means the report did not identify one, never that the note did not happen.
|
|
2966
3203
|
*/
|
|
2967
|
-
analyst:
|
|
3204
|
+
analyst: AnalystRef | null;
|
|
2968
3205
|
priceTarget: number | null;
|
|
2969
3206
|
adjPriceTarget: number | null;
|
|
2970
3207
|
priceWhenPosted: number | null;
|
|
@@ -3431,6 +3668,53 @@ interface EtfInfo {
|
|
|
3431
3668
|
*/
|
|
3432
3669
|
imageUrl: string | null;
|
|
3433
3670
|
}
|
|
3671
|
+
/**
|
|
3672
|
+
* Quote snapshot for an ETF from `GET /api/v1/etfs/{ticker}/quote`: the same price-side
|
|
3673
|
+
* fields as the stock quote, with fund facts (AUM, expense ratio, NAV, inception date) in
|
|
3674
|
+
* place of market cap, P/E and EPS.
|
|
3675
|
+
*
|
|
3676
|
+
* Every field except `ticker` and `timestamp` is left out of the response when unknown
|
|
3677
|
+
* rather than sent as `null`, so check for presence before rendering.
|
|
3678
|
+
*/
|
|
3679
|
+
interface EtfQuote {
|
|
3680
|
+
ticker: string;
|
|
3681
|
+
/** Regular-session price, delayed. During regular hours: the most recent regular-session value. Otherwise: the most recent regular-session close. */
|
|
3682
|
+
currentPrice?: number | null;
|
|
3683
|
+
change?: number | null;
|
|
3684
|
+
/** Change in percentage points: `-0.21` means -0.21%. */
|
|
3685
|
+
changePercent?: number | null;
|
|
3686
|
+
/** Shares traded in the session. */
|
|
3687
|
+
volume?: number | null;
|
|
3688
|
+
open?: number | null;
|
|
3689
|
+
dayHigh?: number | null;
|
|
3690
|
+
dayLow?: number | null;
|
|
3691
|
+
previousClose?: number | null;
|
|
3692
|
+
week52High?: number | null;
|
|
3693
|
+
week52Low?: number | null;
|
|
3694
|
+
/**
|
|
3695
|
+
* Trailing-12-month dividend yield as a fraction, not percentage points: `0.0099` is a
|
|
3696
|
+
* 0.99% yield.
|
|
3697
|
+
*/
|
|
3698
|
+
dividendYield?: number | null;
|
|
3699
|
+
/** Assets under management, in USD. The fund analogue of a stock's market cap. */
|
|
3700
|
+
aum?: number | null;
|
|
3701
|
+
/** Annual expense ratio as a fraction: `0.0009` is 0.09%. */
|
|
3702
|
+
expenseRatio?: number | null;
|
|
3703
|
+
/** Net asset value per share, in USD. */
|
|
3704
|
+
nav?: number | null;
|
|
3705
|
+
/** Fund inception date, ISO `"YYYY-MM-DD"`. */
|
|
3706
|
+
inceptionDate?: string | null;
|
|
3707
|
+
/** Unix timestamp in MILLISECONDS of when this response was served. Not the age of the price. */
|
|
3708
|
+
timestamp: number;
|
|
3709
|
+
/**
|
|
3710
|
+
* Unix timestamp in MILLISECONDS of the market data behind `currentPrice`. Read this for
|
|
3711
|
+
* freshness rather than `timestamp`. Absent when the price cannot be dated, so treat an
|
|
3712
|
+
* absent value as unknown age, not as fresh.
|
|
3713
|
+
*/
|
|
3714
|
+
priceAsOf?: number | null;
|
|
3715
|
+
/** Pre-market or after-hours view. Absent during regular hours, overnight and weekends. */
|
|
3716
|
+
extendedHours?: ExtendedHoursInfo | null;
|
|
3717
|
+
}
|
|
3434
3718
|
interface EtfHolding {
|
|
3435
3719
|
/** The symbol as the issuer filed it. For an international fund this is the local exchange code, not a US ticker, so resolve stocks with `linkedTicker` instead. */
|
|
3436
3720
|
ticker: string;
|
|
@@ -3570,6 +3854,15 @@ declare class Etfs {
|
|
|
3570
3854
|
* List every ETF tracked by SentiSense, sorted by ticker.
|
|
3571
3855
|
*/
|
|
3572
3856
|
list(): Promise<EtfInfo[]>;
|
|
3857
|
+
/**
|
|
3858
|
+
* Get the quote snapshot for an ETF: price, day and 52-week range, volume, dividend
|
|
3859
|
+
* yield, AUM, expense ratio, NAV and inception date.
|
|
3860
|
+
*
|
|
3861
|
+
* Fails with a 400 `APIError` whose `code` is `"ticker_is_not_etf"` when the symbol is a
|
|
3862
|
+
* stock (use `stocks.getQuote()` for those), and a `NotFoundError` when there is no
|
|
3863
|
+
* price data for the fund.
|
|
3864
|
+
*/
|
|
3865
|
+
quote(ticker: string): Promise<EtfQuote>;
|
|
3573
3866
|
/**
|
|
3574
3867
|
* Get the full holdings composition for an ETF, including per-holding weights
|
|
3575
3868
|
* and freshness metadata. Returns 404 for unknown ETFs or commodity-only funds.
|
|
@@ -4072,6 +4365,16 @@ declare class Stocks {
|
|
|
4072
4365
|
getSentiment(ticker: string): Promise<PreviewResponse<StockSentiment>>;
|
|
4073
4366
|
/** Get related KB entities (people, products, partners). */
|
|
4074
4367
|
getEntities(ticker: string): Promise<StockEntity[]>;
|
|
4368
|
+
/**
|
|
4369
|
+
* Get the company knowledge graph around a stock: the people, products, peers and other
|
|
4370
|
+
* entities linked to the company, and the typed relationships between them.
|
|
4371
|
+
*
|
|
4372
|
+
* Every identifier in the response is a slug, the same handle the metric and document
|
|
4373
|
+
* endpoints take, so a node can be passed straight to them. `depth` is 1 (default) or 2,
|
|
4374
|
+
* `cap` limits the node count (1 to 200, default 75); out-of-range values are rejected
|
|
4375
|
+
* with a 400. A ticker with no graph returns a `NotFoundError`.
|
|
4376
|
+
*/
|
|
4377
|
+
getGraph(ticker: string, options?: GetStockGraphOptions): Promise<StockGraph>;
|
|
4075
4378
|
/**
|
|
4076
4379
|
* Get AI-generated stock analysis report. Requires PRO tier.
|
|
4077
4380
|
*
|
|
@@ -4110,12 +4413,18 @@ declare class Stocks {
|
|
|
4110
4413
|
getCurrentFundamentals(ticker: string): Promise<TtmFundamentals>;
|
|
4111
4414
|
/** Get historical revenue data. */
|
|
4112
4415
|
getHistoricalRevenue(ticker: string): Promise<unknown>;
|
|
4113
|
-
/**
|
|
4114
|
-
|
|
4416
|
+
/**
|
|
4417
|
+
* Get short interest history (FINRA), newest first: shares short, days to cover and
|
|
4418
|
+
* average daily volume per settlement date. `limit` defaults to 24 settlement dates.
|
|
4419
|
+
*/
|
|
4420
|
+
getShortInterest(ticker: string, options?: GetShortInterestOptions): Promise<ShortInterest>;
|
|
4115
4421
|
/** Get float information. */
|
|
4116
4422
|
getFloat(ticker: string): Promise<FloatInfo>;
|
|
4117
|
-
/**
|
|
4118
|
-
|
|
4423
|
+
/**
|
|
4424
|
+
* Get daily short volume, newest first: shares sold short against total volume on the
|
|
4425
|
+
* reporting venues. `limit` defaults to 90 trading days.
|
|
4426
|
+
*/
|
|
4427
|
+
getShortVolume(ticker: string, options?: GetShortVolumeOptions): Promise<ShortVolume>;
|
|
4119
4428
|
/**
|
|
4120
4429
|
* Get company-specific KPI time-series for a ticker. Returns curated GAAP and
|
|
4121
4430
|
* non-GAAP metrics from earnings filings (e.g. iPhone unit sales, Tesla deliveries,
|
|
@@ -4395,6 +4704,6 @@ declare class APIError extends SentiSenseError {
|
|
|
4395
4704
|
constructor(message: string, status: number, code?: string);
|
|
4396
4705
|
}
|
|
4397
4706
|
|
|
4398
|
-
declare const VERSION = "0.
|
|
4707
|
+
declare const VERSION = "0.62.0";
|
|
4399
4708
|
|
|
4400
|
-
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 AnalystEstimatesResponse, type AnalystFirmRating, type AnalystFirmTenure, type AnalystNote, type AnalystProfile, type AnalystRatingBuckets, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarningsCalendarResponse, type EarningsEvent, type EarningsKpiHighlight, type 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 EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, 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 GetPoliticianActivityOptions, type GetPoliticianDirectoryOptions, type GetPoliticianMemberOptions, type GetPoliticiansOptions, type GetRankedEarningsOptions, type GetRecentEarningsOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, type InstitutionalFlows, type InstitutionalFlowsResponse, type KBEntity, type KpiCoverageEntry, type KpiCoverageResponse, type KpiDataPoint, type KpiSeries, type KpiTypeEntry, type ListInstitutionsOptions, type LockedInsight, type MarketMood, type 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 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 ShortVolume, type SimilarStock, type StockDetail, type StockEntity, 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 };
|
|
4709
|
+
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 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 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 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -440,6 +440,19 @@ var Etfs = class {
|
|
|
440
440
|
async list() {
|
|
441
441
|
return this.client.get("/api/v1/etfs");
|
|
442
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* Get the quote snapshot for an ETF: price, day and 52-week range, volume, dividend
|
|
445
|
+
* yield, AUM, expense ratio, NAV and inception date.
|
|
446
|
+
*
|
|
447
|
+
* Fails with a 400 `APIError` whose `code` is `"ticker_is_not_etf"` when the symbol is a
|
|
448
|
+
* stock (use `stocks.getQuote()` for those), and a `NotFoundError` when there is no
|
|
449
|
+
* price data for the fund.
|
|
450
|
+
*/
|
|
451
|
+
async quote(ticker) {
|
|
452
|
+
return this.client.get(
|
|
453
|
+
`/api/v1/etfs/${encodeURIComponent(ticker.toUpperCase())}/quote`
|
|
454
|
+
);
|
|
455
|
+
}
|
|
443
456
|
/**
|
|
444
457
|
* Get the full holdings composition for an ETF, including per-holding weights
|
|
445
458
|
* and freshness metadata. Returns 404 for unknown ETFs or commodity-only funds.
|
|
@@ -1034,6 +1047,21 @@ var Stocks = class {
|
|
|
1034
1047
|
async getEntities(ticker) {
|
|
1035
1048
|
return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/entities`);
|
|
1036
1049
|
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Get the company knowledge graph around a stock: the people, products, peers and other
|
|
1052
|
+
* entities linked to the company, and the typed relationships between them.
|
|
1053
|
+
*
|
|
1054
|
+
* Every identifier in the response is a slug, the same handle the metric and document
|
|
1055
|
+
* endpoints take, so a node can be passed straight to them. `depth` is 1 (default) or 2,
|
|
1056
|
+
* `cap` limits the node count (1 to 200, default 75); out-of-range values are rejected
|
|
1057
|
+
* with a 400. A ticker with no graph returns a `NotFoundError`.
|
|
1058
|
+
*/
|
|
1059
|
+
async getGraph(ticker, options) {
|
|
1060
|
+
return this.client.get(
|
|
1061
|
+
`/api/v1/stocks/${encodeURIComponent(ticker.toUpperCase())}/graph`,
|
|
1062
|
+
options
|
|
1063
|
+
);
|
|
1064
|
+
}
|
|
1037
1065
|
/**
|
|
1038
1066
|
* Get AI-generated stock analysis report. Requires PRO tier.
|
|
1039
1067
|
*
|
|
@@ -1096,17 +1124,23 @@ var Stocks = class {
|
|
|
1096
1124
|
async getHistoricalRevenue(ticker) {
|
|
1097
1125
|
return this.client.get("/api/v1/stocks/fundamentals/historical/revenue", { ticker });
|
|
1098
1126
|
}
|
|
1099
|
-
/**
|
|
1100
|
-
|
|
1101
|
-
|
|
1127
|
+
/**
|
|
1128
|
+
* Get short interest history (FINRA), newest first: shares short, days to cover and
|
|
1129
|
+
* average daily volume per settlement date. `limit` defaults to 24 settlement dates.
|
|
1130
|
+
*/
|
|
1131
|
+
async getShortInterest(ticker, options) {
|
|
1132
|
+
return this.client.get("/api/v1/stocks/short-interest", { ticker, ...options });
|
|
1102
1133
|
}
|
|
1103
1134
|
/** Get float information. */
|
|
1104
1135
|
async getFloat(ticker) {
|
|
1105
1136
|
return this.client.get("/api/v1/stocks/float", { ticker });
|
|
1106
1137
|
}
|
|
1107
|
-
/**
|
|
1108
|
-
|
|
1109
|
-
|
|
1138
|
+
/**
|
|
1139
|
+
* Get daily short volume, newest first: shares sold short against total volume on the
|
|
1140
|
+
* reporting venues. `limit` defaults to 90 trading days.
|
|
1141
|
+
*/
|
|
1142
|
+
async getShortVolume(ticker, options) {
|
|
1143
|
+
return this.client.get("/api/v1/stocks/short-volume", { ticker, ...options });
|
|
1110
1144
|
}
|
|
1111
1145
|
/**
|
|
1112
1146
|
* Get company-specific KPI time-series for a ticker. Returns curated GAAP and
|
|
@@ -1318,7 +1352,7 @@ var Trackers = class {
|
|
|
1318
1352
|
};
|
|
1319
1353
|
|
|
1320
1354
|
// src/version.ts
|
|
1321
|
-
var VERSION = "0.
|
|
1355
|
+
var VERSION = "0.62.0";
|
|
1322
1356
|
|
|
1323
1357
|
// src/client.ts
|
|
1324
1358
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|