sentisense 0.62.0 → 0.63.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 +20 -0
- package/dist/cli.cjs +13 -6
- package/dist/index.cjs +13 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +60 -9
- package/dist/index.d.ts +60 -9
- package/dist/index.mjs +13 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -252,6 +252,8 @@ Price fields carry `priceAsOf` (Unix milliseconds) for the age of the market dat
|
|
|
252
252
|
|
|
253
253
|
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.
|
|
254
254
|
|
|
255
|
+
Product nodes (`type === "PRODUCT_OR_SERVICE"`) in `stocks.getGraph` now carry optional `category` when known. Other nodes and products without a category omit it.
|
|
256
|
+
|
|
255
257
|
### Documents & news
|
|
256
258
|
|
|
257
259
|
```typescript
|
|
@@ -292,6 +294,18 @@ client.institutional.getHolders("AAPL", "2025-02-14")
|
|
|
292
294
|
client.institutional.getActivists("2025-02-14")
|
|
293
295
|
```
|
|
294
296
|
|
|
297
|
+
`positionsHeld` on an institution detail counts the full portfolio's held positions:
|
|
298
|
+
`max(0, holdingsCount - soldOutPositions)`, even when the holdings list is truncated.
|
|
299
|
+
`getInstitutionDetail` keeps its `Promise<unknown>` signature. The exported all-optional
|
|
300
|
+
`InstitutionDetail` type is available for callers who want to opt in:
|
|
301
|
+
|
|
302
|
+
```typescript
|
|
303
|
+
import type { InstitutionDetail, PreviewResponse } from "sentisense";
|
|
304
|
+
|
|
305
|
+
const detail = await client.institutional.getInstitutionDetail("1067983") as PreviewResponse<InstitutionDetail>;
|
|
306
|
+
console.log(detail.data.positionsHeld); // undefined when an older response omits it
|
|
307
|
+
```
|
|
308
|
+
|
|
295
309
|
**Paging the holder list.** A widely held ticker returns thousands of rows: a megacap quarter is roughly 6,000 holders and 1.5 MB on the wire. Pass `limit` unless you really want the whole list; omitting the options object sends the original unbounded request, so existing code keeps working.
|
|
296
310
|
|
|
297
311
|
| Option | Values |
|
|
@@ -417,6 +431,8 @@ Two shapes to read rather than assume. A firm can appear with `noteCount: 0`, a
|
|
|
417
431
|
|
|
418
432
|
`ratingBuckets` sizes the same book by rating tier: `buy`, `hold`, `sell`, `unrated` and `total`, counted over every covering firm before the free truncation, so `buy + hold + sell + unrated === total` and a free key reads the same numbers as a PRO one. `unrated` is a desk with no current rating on record, such as a price-target-only firm. These count the firms in this coverage book, a different population from the `strongBuy` through `strongSell` figures on `client.analyst.consensus`, which come from the provider's analyst survey. Read one or the other, do not reconcile them.
|
|
419
433
|
|
|
434
|
+
Surprise rows now carry optional `surprisePct`, the signed true percent rounded half-up to two decimals: `(actualEps - estimateEps) * 100 / abs(estimateEps)`. It is `null` when either EPS is missing or the estimate is zero, and `undefined` on older responses. The existing `surprisePercent` fraction is unchanged (`0.03` means about 3%).
|
|
435
|
+
|
|
420
436
|
### Earnings
|
|
421
437
|
|
|
422
438
|
The earnings analysis report is the assembled version of a quarter: one object per fiscal period carrying the editorial headline, the KPI cards with year-over-year deltas, the guidance language as management phrased it, and a summary of the earnings call. Pair it with the recent-reporters feed to drive a post-earnings sweep. Summaries, recent reports, statistics, and rankings return the preview envelope; per-ticker reactions return a direct payload.
|
|
@@ -451,6 +467,8 @@ if (quarter) {
|
|
|
451
467
|
|
|
452
468
|
The forward-looking half of the family is `client.calendar.getEarnings()`, which covers scheduled dates and consensus EPS rather than results.
|
|
453
469
|
|
|
470
|
+
`earnings.getSummaries` exposes optional `totalCount` on the envelope on both PRO and FREE. It counts indexed quarters; returned rows can be fewer because of `limit` or an unavailable body. Older responses without the count still read as `undefined`.
|
|
471
|
+
|
|
454
472
|
### Company KPIs (PRO)
|
|
455
473
|
|
|
456
474
|
```typescript
|
|
@@ -511,6 +529,8 @@ During the trading session the dossier and the radar also carry a few intraday f
|
|
|
511
529
|
|
|
512
530
|
A row whose baseline is still building carries its raw readings with the percentiles and `interestScore` omitted, which means "not enough history yet" rather than "nothing interesting". `getOptionsSummary` reports an uncovered ticker as a null payload inside the usual envelope, so the check is `result.data === null`: the response object itself is always truthy, and a bare `if (summary === null)` never fires. `getOptionsHistory` reports it as an empty `series` instead, so check the array's length rather than null-checking there.
|
|
513
531
|
|
|
532
|
+
On a delisted symbol, the options summary carries `listingStatus === "DELISTED"` and, when known, `delistedDate` (YYYY-MM-DD). This marks a frozen last dossier, so read `asOf` before treating it as current. Listed and pending symbols omit both fields.
|
|
533
|
+
|
|
514
534
|
### SentiSense Rating
|
|
515
535
|
|
|
516
536
|
Where a stock ranks against the other stocks rated that day, as a score, a letter and a percentile, plus the seven dimensions the rank is blended from. It is a relative research signal for informational and educational purposes, not financial, investment or trading advice, and not a recommendation about any security. Every response carries the wording to display alongside a grade in `disclaimer`. [Methodology](https://sentisense.ai/methodology/#sentisense-rating).
|
package/dist/cli.cjs
CHANGED
|
@@ -1345,7 +1345,7 @@ var flowsCommand = {
|
|
|
1345
1345
|
};
|
|
1346
1346
|
|
|
1347
1347
|
// src/version.ts
|
|
1348
|
-
var VERSION = "0.
|
|
1348
|
+
var VERSION = "0.63.0";
|
|
1349
1349
|
|
|
1350
1350
|
// src/resources/analyst.ts
|
|
1351
1351
|
var Analyst = class {
|
|
@@ -1604,9 +1604,11 @@ var Earnings = class {
|
|
|
1604
1604
|
* management phrased it, and a summary of the earnings call.
|
|
1605
1605
|
*
|
|
1606
1606
|
* Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
|
|
1607
|
-
* FREE key receives the latest quarter shaped rather than truncated
|
|
1608
|
-
* `totalCount
|
|
1609
|
-
*
|
|
1607
|
+
* FREE key receives the latest quarter shaped rather than truncated.
|
|
1608
|
+
* `totalCount` on the envelope counts indexed quarters on both tiers. The
|
|
1609
|
+
* returned array can be shorter when a body is unavailable or limit cuts it.
|
|
1610
|
+
* Older responses may omit the count. {@link EarningsQuarter} documents
|
|
1611
|
+
* which fields each tier carries.
|
|
1610
1612
|
*
|
|
1611
1613
|
* A quarter typically appears within 48 hours of the company reporting, and
|
|
1612
1614
|
* the call summary can arrive after the press-release content for the same
|
|
@@ -2081,6 +2083,10 @@ var Institutional = class {
|
|
|
2081
2083
|
* Resolved by URL slug (e.g. `Berkshire-Hathaway`) or numeric SEC CIK.
|
|
2082
2084
|
* Free users receive the profile and top 10 holdings; PRO users receive the
|
|
2083
2085
|
* full holdings array. Returns 404 if the slug or CIK is unknown.
|
|
2086
|
+
*
|
|
2087
|
+
* The signature remains unknown for compatibility. Opt in to the exported
|
|
2088
|
+
* PreviewResponse<InstitutionDetail> type to read data.positionsHeld, the full
|
|
2089
|
+
* portfolio count excluding SOLD_OUT rows, even on a truncated holdings list.
|
|
2084
2090
|
*/
|
|
2085
2091
|
async getInstitutionDetail(slugOrCik) {
|
|
2086
2092
|
return this.client.get(
|
|
@@ -2353,8 +2359,9 @@ var Stocks = class {
|
|
|
2353
2359
|
*
|
|
2354
2360
|
* Every identifier in the response is a slug, the same handle the metric and document
|
|
2355
2361
|
* endpoints take, so a node can be passed straight to them. `depth` is 1 (default) or 2,
|
|
2356
|
-
* `cap` limits the
|
|
2357
|
-
* with a 400. A ticker with no
|
|
2362
|
+
* `cap` limits the number of non-root nodes (1 to 200, default 75); the root is always
|
|
2363
|
+
* included in addition. Out-of-range values are rejected with a 400. A ticker with no
|
|
2364
|
+
* graph returns a `NotFoundError`.
|
|
2358
2365
|
*/
|
|
2359
2366
|
async getGraph(ticker, options) {
|
|
2360
2367
|
return this.client.get(
|
package/dist/index.cjs
CHANGED
|
@@ -339,9 +339,11 @@ var Earnings = class {
|
|
|
339
339
|
* management phrased it, and a summary of the earnings call.
|
|
340
340
|
*
|
|
341
341
|
* Branch on `isPreview`: a PRO key receives every hydrated quarter in full, a
|
|
342
|
-
* FREE key receives the latest quarter shaped rather than truncated
|
|
343
|
-
* `totalCount
|
|
344
|
-
*
|
|
342
|
+
* FREE key receives the latest quarter shaped rather than truncated.
|
|
343
|
+
* `totalCount` on the envelope counts indexed quarters on both tiers. The
|
|
344
|
+
* returned array can be shorter when a body is unavailable or limit cuts it.
|
|
345
|
+
* Older responses may omit the count. {@link EarningsQuarter} documents
|
|
346
|
+
* which fields each tier carries.
|
|
345
347
|
*
|
|
346
348
|
* A quarter typically appears within 48 hours of the company reporting, and
|
|
347
349
|
* the call summary can arrive after the press-release content for the same
|
|
@@ -816,6 +818,10 @@ var Institutional = class {
|
|
|
816
818
|
* Resolved by URL slug (e.g. `Berkshire-Hathaway`) or numeric SEC CIK.
|
|
817
819
|
* Free users receive the profile and top 10 holdings; PRO users receive the
|
|
818
820
|
* full holdings array. Returns 404 if the slug or CIK is unknown.
|
|
821
|
+
*
|
|
822
|
+
* The signature remains unknown for compatibility. Opt in to the exported
|
|
823
|
+
* PreviewResponse<InstitutionDetail> type to read data.positionsHeld, the full
|
|
824
|
+
* portfolio count excluding SOLD_OUT rows, even on a truncated holdings list.
|
|
819
825
|
*/
|
|
820
826
|
async getInstitutionDetail(slugOrCik) {
|
|
821
827
|
return this.client.get(
|
|
@@ -1088,8 +1094,9 @@ var Stocks = class {
|
|
|
1088
1094
|
*
|
|
1089
1095
|
* Every identifier in the response is a slug, the same handle the metric and document
|
|
1090
1096
|
* endpoints take, so a node can be passed straight to them. `depth` is 1 (default) or 2,
|
|
1091
|
-
* `cap` limits the
|
|
1092
|
-
* with a 400. A ticker with no
|
|
1097
|
+
* `cap` limits the number of non-root nodes (1 to 200, default 75); the root is always
|
|
1098
|
+
* included in addition. Out-of-range values are rejected with a 400. A ticker with no
|
|
1099
|
+
* graph returns a `NotFoundError`.
|
|
1093
1100
|
*/
|
|
1094
1101
|
async getGraph(ticker, options) {
|
|
1095
1102
|
return this.client.get(
|
|
@@ -1387,7 +1394,7 @@ var Trackers = class {
|
|
|
1387
1394
|
};
|
|
1388
1395
|
|
|
1389
1396
|
// src/version.ts
|
|
1390
|
-
var VERSION = "0.
|
|
1397
|
+
var VERSION = "0.63.0";
|
|
1391
1398
|
|
|
1392
1399
|
// src/client.ts
|
|
1393
1400
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|