sentisense 0.75.1 → 0.77.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 +17 -2
- package/dist/cli.cjs +41 -3
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +58 -2
- package/dist/index.d.ts +58 -2
- package/dist/index.mjs +22 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ npx -y sentisense@latest health
|
|
|
72
72
|
| `quote <ticker>...` | Price, day range, 52-week range, market cap, P/E. One request per ticker; ETFs show AUM, expense ratio and NAV |
|
|
73
73
|
| `sentiment <ticker>` | SentiSense Score, tone, attention, per-source breakdown, `--days N` history |
|
|
74
74
|
| `mood` | Composite market sentiment, the signals behind it, and the sector map |
|
|
75
|
-
| `analysts <ticker>` | Consensus, price target band, recent upgrades and downgrades. `--coverage` for who covers it, by firm |
|
|
75
|
+
| `analysts <ticker>` | Consensus, price target band, recent upgrades and downgrades with each firm's target move. `--coverage` for who covers it, by firm |
|
|
76
76
|
| `analyst <slug>` | One analyst: their firms, their coverage book, and `--calls` for their price target notes |
|
|
77
77
|
| `earnings [ticker]` | Forward calendar with no ticker, per-quarter analysis with one (`earnings AAPL`) |
|
|
78
78
|
| `kpis <ticker>` | Company KPIs from earnings filings: latest value and year-over-year change per series, `--series ID` for one series' history, `--types` for the series list, `--coverage` for the covered tickers |
|
|
@@ -263,6 +263,7 @@ client.stocks.getShortInterest("GME", { limit: 12 }) // Short interest by set
|
|
|
263
263
|
client.stocks.getShortVolume("GME") // Daily short volume
|
|
264
264
|
client.stocks.getFloat("GME") // Free float
|
|
265
265
|
client.stocks.getGraph("AAPL", { depth: 1 }) // Company knowledge graph: people, products, peers
|
|
266
|
+
client.stocks.getEtfs("NVDA", { limit: 5 }) // ETFs that hold the stock, heaviest weight first
|
|
266
267
|
client.stocks.getOptionsSummary("NVDA") // End-of-day options dossier
|
|
267
268
|
client.stocks.getOptionsHistory("NVDA", { window: "2y" }) // Daily options aggregates over time
|
|
268
269
|
client.stocks.getOptionsIntradayHistory("NVDA") // One session's intraday options series (PRO)
|
|
@@ -272,6 +273,8 @@ client.stocks.getAISummary("AAPL", { depth: "deep" }) // AI report (PRO)
|
|
|
272
273
|
|
|
273
274
|
Price fields carry `priceAsOf` (Unix milliseconds) for the age of the market data; read that for freshness rather than `timestamp`, which is when the response was served.
|
|
274
275
|
|
|
276
|
+
`stocks.getEtfs` resolves to a bare array (no preview envelope) on every tier. Each row has `etfTicker`, `etfName`, `weightPct` (the stock's weight in the fund as a percentage from 0 to 100, combined across share classes for a company with several) and `asOfDate` (that fund's own holdings date, so it can differ between rows; may be absent). It searches only the funds SentiSense tracks with a holdings file, some of which are partial, so it is not every fund in the market. A ticker no tracked fund holds resolves to `[]`. See the [API reference](https://sentisense.ai/docs/api/stocks/#get-stock-etfs).
|
|
277
|
+
|
|
275
278
|
Short interest and short volume come back newest first, and an unknown ticker returns an empty `dataPoints` array rather than an error. Every identifier in `getGraph` is a slug, the same handle the metric and document endpoints take. An ETF symbol is refused by `getQuote` with an `APIError` whose `code` is `"ticker_is_etf"`; use `etfs.quote()` for funds.
|
|
276
279
|
|
|
277
280
|
Product nodes (`type === "PRODUCT_OR_SERVICE"`) in `stocks.getGraph` now carry optional `category` when known. Other nodes and products without a category omit it.
|
|
@@ -466,11 +469,23 @@ The price target cone (mean, high, low, upside %) and consensus are free for eve
|
|
|
466
469
|
client.analyst.consensus("AAPL") // Price target cone + consensus. Free, full data.
|
|
467
470
|
client.analyst.consensusHistory("AAPL", { limit: 90 }) // Daily history. Free: last 30 days; distribution fields null.
|
|
468
471
|
client.analyst.calledIt("AAPL", { limit: 10 }) // Recorded calls for 20% moves over five sessions. Free: newest move, up to 5 calls, move counts intact.
|
|
469
|
-
client.analyst.actions("AAPL", { lookbackDays: 30 }) // Upgrade/downgrade feed. Free: 3 most recent.
|
|
472
|
+
client.analyst.actions("AAPL", { lookbackDays: 30 }) // Upgrade/downgrade feed with price targets (PRO). Free: 3 most recent, targets null.
|
|
470
473
|
client.analyst.estimates("AAPL") // Forward EPS + surprises. Free: 1 quarter. data.ticker: the listing per-share figures are for (BRK-A answers BRK.B).
|
|
471
474
|
client.analyst.marketActivity({ lookbackDays: 7 }) // Market-wide analyst actions (PRO).
|
|
472
475
|
```
|
|
473
476
|
|
|
477
|
+
Action rows carry `priceTarget`, the target the firm stated with the action, and `priorPriceTarget`, the target it moved from. Each is `null` when the firm stated none or we do not hold it, never zero; `priorPriceTarget` is also `null` when the firm kept its target unchanged, and always `null` when `priceTarget` is. Both are PRO (and sample companies): free preview rows carry `null` for both. Firms do not restate old targets after a stock split, so `actions` rows dated before a split carry `null` for both; `marketActivity` skips that check, so read a stock that split from `actions`. Both fields are optional on `AnalystAction`, since older responses lack them.
|
|
478
|
+
|
|
479
|
+
```typescript
|
|
480
|
+
const { data: rows } = await client.analyst.actions("NVDA", { lookbackDays: 7 });
|
|
481
|
+
for (const row of rows) {
|
|
482
|
+
const { priceTarget: target, priorPriceTarget: prior } = row;
|
|
483
|
+
if (target != null && prior != null && target < prior) {
|
|
484
|
+
console.log(`${row.actionDate} ${row.firm} cut its target from ${prior} to ${target}`);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
```
|
|
488
|
+
|
|
474
489
|
Coverage answers "who covers this stock and what did they say" in one call, and it is the entry point into the per-analyst surfaces: every named analyst carries the slug that addresses their profile and their calls.
|
|
475
490
|
|
|
476
491
|
```typescript
|
package/dist/cli.cjs
CHANGED
|
@@ -594,6 +594,19 @@ function actionTone(actionType) {
|
|
|
594
594
|
if (actionType === "DOWNGRADE") return "down";
|
|
595
595
|
return void 0;
|
|
596
596
|
}
|
|
597
|
+
function isTarget(value) {
|
|
598
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
599
|
+
}
|
|
600
|
+
function targetText(value) {
|
|
601
|
+
return Number.isInteger(value) ? `$${value}` : money(value);
|
|
602
|
+
}
|
|
603
|
+
function targetMove(action) {
|
|
604
|
+
const target = action.priceTarget;
|
|
605
|
+
if (!isTarget(target)) return cell("");
|
|
606
|
+
const prior = action.priorPriceTarget;
|
|
607
|
+
if (!isTarget(prior)) return cell(targetText(target));
|
|
608
|
+
return cell(`${targetText(prior)} to ${targetText(target)}`, direction(target - prior));
|
|
609
|
+
}
|
|
597
610
|
function primaryAnalyst(row) {
|
|
598
611
|
const named = row.latestNote?.analyst ?? null;
|
|
599
612
|
const match = (named ? row.analysts.find(
|
|
@@ -624,6 +637,9 @@ var analystsCommand = {
|
|
|
624
637
|
'on a row is what "sentisense analyst <slug>" takes.',
|
|
625
638
|
"A firm can cover a ticker on a rating action alone, so a blank target is a real reading",
|
|
626
639
|
"rather than missing data, and a blank analyst means the note named nobody.",
|
|
640
|
+
"TARGET on a rating change is the price target the firm stated with it, shown as",
|
|
641
|
+
'"$400 to $200" when it moved from a prior target. It is blank when the firm stated',
|
|
642
|
+
"none, and blank on a free key outside the sample companies.",
|
|
627
643
|
"--limit trims the rows printed under --coverage; the API returns the whole book either",
|
|
628
644
|
"way, and --full prints all of it."
|
|
629
645
|
],
|
|
@@ -690,13 +706,14 @@ var analystsCommand = {
|
|
|
690
706
|
blocks.push({ kind: "blank" });
|
|
691
707
|
blocks.push({
|
|
692
708
|
kind: "table",
|
|
693
|
-
head: ["DATE", "FIRM", "ACTION", "FROM", "TO"],
|
|
709
|
+
head: ["DATE", "FIRM", "ACTION", "FROM", "TO", "TARGET"],
|
|
694
710
|
rows: shown.map((action) => [
|
|
695
711
|
cell(action.actionDate),
|
|
696
712
|
cell(action.firm),
|
|
697
713
|
cell(action.actionType, actionTone(action.actionType)),
|
|
698
714
|
cell(action.fromGrade ?? ""),
|
|
699
|
-
cell(action.toGrade ?? "")
|
|
715
|
+
cell(action.toGrade ?? ""),
|
|
716
|
+
targetMove(action)
|
|
700
717
|
])
|
|
701
718
|
});
|
|
702
719
|
if (!full && rows.length > shown.length) {
|
|
@@ -1432,7 +1449,7 @@ var flowsCommand = {
|
|
|
1432
1449
|
};
|
|
1433
1450
|
|
|
1434
1451
|
// src/version.ts
|
|
1435
|
-
var VERSION = "0.
|
|
1452
|
+
var VERSION = "0.77.0";
|
|
1436
1453
|
|
|
1437
1454
|
// src/resources/analyst.ts
|
|
1438
1455
|
var Analyst = class {
|
|
@@ -1483,6 +1500,10 @@ var Analyst = class {
|
|
|
1483
1500
|
/**
|
|
1484
1501
|
* Get recent analyst upgrade/downgrade actions for a ticker, newest first.
|
|
1485
1502
|
* Free users receive the 3 most recent.
|
|
1503
|
+
*
|
|
1504
|
+
* Each row carries `priceTarget`, the target the firm stated with the action, and
|
|
1505
|
+
* `priorPriceTarget`, the target it moved from (PRO; `null` on free preview rows,
|
|
1506
|
+
* `null` when the firm stated none or kept its target unchanged).
|
|
1486
1507
|
*/
|
|
1487
1508
|
async actions(ticker, options) {
|
|
1488
1509
|
return this.client.get(
|
|
@@ -1502,6 +1523,10 @@ var Analyst = class {
|
|
|
1502
1523
|
/**
|
|
1503
1524
|
* Get market-wide recent analyst actions across all covered tickers, newest first.
|
|
1504
1525
|
* Free users receive the 5 most recent.
|
|
1526
|
+
*
|
|
1527
|
+
* Rows carry the same `priceTarget` and `priorPriceTarget` as {@link actions} (PRO;
|
|
1528
|
+
* `null` on free preview rows). This feed does not check for stock splits, so for a
|
|
1529
|
+
* stock that split inside the window, read its targets from {@link actions}.
|
|
1505
1530
|
*/
|
|
1506
1531
|
async marketActivity(options) {
|
|
1507
1532
|
return this.client.get("/api/v1/analyst/activity", options);
|
|
@@ -2529,6 +2554,19 @@ var Stocks = class {
|
|
|
2529
2554
|
async getSimilar(ticker, options) {
|
|
2530
2555
|
return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/similar`, options);
|
|
2531
2556
|
}
|
|
2557
|
+
/**
|
|
2558
|
+
* List the ETFs that hold a stock, heaviest weight first.
|
|
2559
|
+
*
|
|
2560
|
+
* Resolves to a bare array (no preview envelope) on every tier, sorted by `weightPct`
|
|
2561
|
+
* descending, then `etfTicker` ascending. A ticker no tracked fund holds, or an unknown
|
|
2562
|
+
* ticker, resolves to `[]` rather than throwing. Only funds SentiSense tracks with a
|
|
2563
|
+
* holdings file are searched, and some funds' holdings are partial, so the list is not
|
|
2564
|
+
* every fund in the market. `ticker` is case-insensitive. Counts against the monthly
|
|
2565
|
+
* quota like other data endpoints.
|
|
2566
|
+
*/
|
|
2567
|
+
async getEtfs(ticker, options) {
|
|
2568
|
+
return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/etfs`, options);
|
|
2569
|
+
}
|
|
2532
2570
|
/** Get company profile (CEO, sector, industry, market data). */
|
|
2533
2571
|
async getProfile(ticker, options) {
|
|
2534
2572
|
return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/profile`, options);
|
package/dist/index.cjs
CHANGED
|
@@ -131,6 +131,10 @@ var Analyst = class {
|
|
|
131
131
|
/**
|
|
132
132
|
* Get recent analyst upgrade/downgrade actions for a ticker, newest first.
|
|
133
133
|
* Free users receive the 3 most recent.
|
|
134
|
+
*
|
|
135
|
+
* Each row carries `priceTarget`, the target the firm stated with the action, and
|
|
136
|
+
* `priorPriceTarget`, the target it moved from (PRO; `null` on free preview rows,
|
|
137
|
+
* `null` when the firm stated none or kept its target unchanged).
|
|
134
138
|
*/
|
|
135
139
|
async actions(ticker, options) {
|
|
136
140
|
return this.client.get(
|
|
@@ -150,6 +154,10 @@ var Analyst = class {
|
|
|
150
154
|
/**
|
|
151
155
|
* Get market-wide recent analyst actions across all covered tickers, newest first.
|
|
152
156
|
* Free users receive the 5 most recent.
|
|
157
|
+
*
|
|
158
|
+
* Rows carry the same `priceTarget` and `priorPriceTarget` as {@link actions} (PRO;
|
|
159
|
+
* `null` on free preview rows). This feed does not check for stock splits, so for a
|
|
160
|
+
* stock that split inside the window, read its targets from {@link actions}.
|
|
153
161
|
*/
|
|
154
162
|
async marketActivity(options) {
|
|
155
163
|
return this.client.get("/api/v1/analyst/activity", options);
|
|
@@ -1177,6 +1185,19 @@ var Stocks = class {
|
|
|
1177
1185
|
async getSimilar(ticker, options) {
|
|
1178
1186
|
return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/similar`, options);
|
|
1179
1187
|
}
|
|
1188
|
+
/**
|
|
1189
|
+
* List the ETFs that hold a stock, heaviest weight first.
|
|
1190
|
+
*
|
|
1191
|
+
* Resolves to a bare array (no preview envelope) on every tier, sorted by `weightPct`
|
|
1192
|
+
* descending, then `etfTicker` ascending. A ticker no tracked fund holds, or an unknown
|
|
1193
|
+
* ticker, resolves to `[]` rather than throwing. Only funds SentiSense tracks with a
|
|
1194
|
+
* holdings file are searched, and some funds' holdings are partial, so the list is not
|
|
1195
|
+
* every fund in the market. `ticker` is case-insensitive. Counts against the monthly
|
|
1196
|
+
* quota like other data endpoints.
|
|
1197
|
+
*/
|
|
1198
|
+
async getEtfs(ticker, options) {
|
|
1199
|
+
return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/etfs`, options);
|
|
1200
|
+
}
|
|
1180
1201
|
/** Get company profile (CEO, sector, industry, market data). */
|
|
1181
1202
|
async getProfile(ticker, options) {
|
|
1182
1203
|
return this.client.get(`/api/v1/stocks/${encodeURIComponent(ticker)}/profile`, options);
|
|
@@ -1550,7 +1571,7 @@ function serializeTrackerParams(params) {
|
|
|
1550
1571
|
}
|
|
1551
1572
|
|
|
1552
1573
|
// src/version.ts
|
|
1553
|
-
var VERSION = "0.
|
|
1574
|
+
var VERSION = "0.77.0";
|
|
1554
1575
|
|
|
1555
1576
|
// src/client.ts
|
|
1556
1577
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|