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/README.md
CHANGED
|
@@ -132,7 +132,7 @@ Most methods resolve to the data itself. Two kinds of response wrap it, and the
|
|
|
132
132
|
| `etfs` | `analystAggregate` `insiderAggregate` `sentimentAggregate` |
|
|
133
133
|
| `insider` | `getActivity` `getTrades` `getClusterBuys` |
|
|
134
134
|
| `insights` | `stock` `stockRange` `market` `latest` `user` |
|
|
135
|
-
| `institutional` | `getFlows` `getHolders` `getHoldersHistory` `getInstitutionHistory` `getActivists` |
|
|
135
|
+
| `institutional` | `getFlows` `getHolders` `getHoldersHistory` `getInstitutionHistory` `getActivists` `getBondFlows` `getOptionFlows` |
|
|
136
136
|
| `options` | `getOverview` |
|
|
137
137
|
| `politicians` | `getActivity` `getFilings` `getMembers` `getMember` |
|
|
138
138
|
| `stocks` | `getSentiment` `getKpis` `getOptionsSummary` `getOptionsHistory` `getOptionsIntradayHistory` |
|
|
@@ -203,6 +203,7 @@ client.entityMetrics.getMetrics("AAPL", { metricType: "sentiment" }) //
|
|
|
203
203
|
client.entityMetrics.getMetrics("AAPL", { metricType: "mentions", startTime: Date.now() - 7 * 86400000 })
|
|
204
204
|
client.entityMetrics.getDistribution("AAPL", "mentions", { dimension: "source" }) // share of mentions by source, valueType "SHARE_PERCENT"
|
|
205
205
|
client.entityMetrics.getDistribution("AAPL", "sentiment") // mean sentiment by source, valueType "MEAN"
|
|
206
|
+
client.entityMetrics.getSlices("AAPL", "mentions") // the dimensions and values a metric breaks down by
|
|
206
207
|
client.stocks.getSentiment("AAPL") // Score, mentions, tone by source
|
|
207
208
|
```
|
|
208
209
|
|
|
@@ -285,10 +286,13 @@ client.institutional.listInstitutions() // find fu
|
|
|
285
286
|
client.institutional.getInstitutionDetail("Berkshire-Hathaway", { limit: 10, sortBy: "estimatedFlowUsd" })
|
|
286
287
|
client.institutional.getInstitutionHistory("Renaissance-Technologies", { quarters: 8, tickers: ["NVDA"] })
|
|
287
288
|
client.institutional.getActivists("2026-06-30") // activist positions for a quarter
|
|
289
|
+
client.institutional.getBondFlows("2026-06-30") // convertible bonds institutions hold, by issuer
|
|
290
|
+
client.institutional.getOptionFlows("2026-06-30") // calls and puts institutions report, by stock
|
|
288
291
|
```
|
|
289
292
|
|
|
290
293
|
The newest quarter is often incomplete, so pick one by its `pending` flag rather than taking the first. A widely held stock has thousands of holders, so pass `limit`; `offset`, `sortBy` and `sortDir` only work alongside it.
|
|
291
294
|
`getInstitutionDetail` returns `unknown`, so cast it to `PreviewResponse<InstitutionDetail>`; its sort and filter options also need `limit`.
|
|
295
|
+
`getOptionFlows` is the option positions institutions file on Form 13F, not options trading; for that, see [Options](#options). A bond row's `bondTickers` is one comma-separated string.
|
|
292
296
|
|
|
293
297
|
```typescript
|
|
294
298
|
const quarter = (await client.institutional.getQuarters()).find((q) => !q.pending)?.reportDate;
|
|
@@ -320,6 +324,7 @@ client.analyst.calls("gil-luria", { limit: 25 }) // their price target
|
|
|
320
324
|
|
|
321
325
|
```typescript
|
|
322
326
|
client.calendar.getEarnings() // upcoming report dates and estimates
|
|
327
|
+
client.calendar.list() // which calendars exist (no quota cost)
|
|
323
328
|
client.earnings.getSummaries("AAPL", { limit: 4 }) // each quarter written up: headline, KPIs, guidance, call summary
|
|
324
329
|
client.earnings.getRecent({ days: 7 }) // who reported recently
|
|
325
330
|
client.earnings.getReactions("AAPL") // how the stock moved after its last reports
|
|
@@ -386,9 +391,11 @@ for (const row of res.results) console.log(row.ticker, row.sentiSenseScore7D, ro
|
|
|
386
391
|
### Market mood
|
|
387
392
|
|
|
388
393
|
```typescript
|
|
389
|
-
client.marketMood.get({ days: 30 })
|
|
390
|
-
client.
|
|
391
|
-
client.
|
|
394
|
+
client.marketMood.get({ days: 30 }) // Market Mood, from fear to greed, with its history
|
|
395
|
+
client.marketMood.getSentimentSectors() // each sector's tone against the market's own
|
|
396
|
+
client.marketMood.getSentimentBreadth() // the share of stocks leaning bullish, neutral, bearish, by day
|
|
397
|
+
client.indexes.list() // our indexes
|
|
398
|
+
client.indexes.history("ai-sentiment") // one index over time
|
|
392
399
|
```
|
|
393
400
|
|
|
394
401
|
[Market Mood API docs](https://sentisense.ai/docs/api/market-mood/)
|
package/dist/cli.cjs
CHANGED
|
@@ -1492,7 +1492,7 @@ var flowsCommand = {
|
|
|
1492
1492
|
};
|
|
1493
1493
|
|
|
1494
1494
|
// src/version.ts
|
|
1495
|
-
var VERSION = "0.
|
|
1495
|
+
var VERSION = "0.82.0";
|
|
1496
1496
|
|
|
1497
1497
|
// src/resources/analyst.ts
|
|
1498
1498
|
var Analyst = class {
|
|
@@ -1664,6 +1664,16 @@ var Calendar = class {
|
|
|
1664
1664
|
constructor(client) {
|
|
1665
1665
|
this.client = client;
|
|
1666
1666
|
}
|
|
1667
|
+
/**
|
|
1668
|
+
* List the calendars the API serves, with the path of each, so a client can find them
|
|
1669
|
+
* without hardcoding paths.
|
|
1670
|
+
*
|
|
1671
|
+
* Every tier receives the same list, and the call does not count against the monthly quota;
|
|
1672
|
+
* the per-minute rate limit still applies.
|
|
1673
|
+
*/
|
|
1674
|
+
async list() {
|
|
1675
|
+
return this.client.get("/api/v1/calendar");
|
|
1676
|
+
}
|
|
1667
1677
|
/**
|
|
1668
1678
|
* Upcoming company earnings, sorted by date.
|
|
1669
1679
|
*
|
|
@@ -1845,6 +1855,14 @@ var Earnings = class {
|
|
|
1845
1855
|
};
|
|
1846
1856
|
|
|
1847
1857
|
// src/resources/entityMetrics.ts
|
|
1858
|
+
function requirePathSegment(method, name, value) {
|
|
1859
|
+
if (typeof value !== "string" || value.trim() === "" || value === "." || value === "..") {
|
|
1860
|
+
throw new SentiSenseError(
|
|
1861
|
+
`${method}: ${name} must not be empty, "." or ".." (got ${JSON.stringify(value)})`
|
|
1862
|
+
);
|
|
1863
|
+
}
|
|
1864
|
+
return value;
|
|
1865
|
+
}
|
|
1848
1866
|
var EntityMetrics = class {
|
|
1849
1867
|
constructor(client) {
|
|
1850
1868
|
this.client = client;
|
|
@@ -1895,6 +1913,25 @@ var EntityMetrics = class {
|
|
|
1895
1913
|
}
|
|
1896
1914
|
);
|
|
1897
1915
|
}
|
|
1916
|
+
/**
|
|
1917
|
+
* List the dimensions a metric can be broken down by for one entity, with the values present
|
|
1918
|
+
* in the data, so you can see what exists before calling `getDistribution()`.
|
|
1919
|
+
*
|
|
1920
|
+
* Returns a plain array, empty when the metric has no slices for this entity. Available on
|
|
1921
|
+
* every tier; each call counts against the monthly quota.
|
|
1922
|
+
*
|
|
1923
|
+
* @param symbol Ticker symbol (e.g. "AAPL") or entity urlSlug (e.g. "Nancy-Pelosi").
|
|
1924
|
+
* @param metricType The metric to look up (e.g. "mentions").
|
|
1925
|
+
* @throws {SentiSenseError} Before any request, when `symbol` or `metricType` is empty,
|
|
1926
|
+
* whitespace only, `"."` or `".."`.
|
|
1927
|
+
*/
|
|
1928
|
+
async getSlices(symbol, metricType) {
|
|
1929
|
+
const entity = requirePathSegment("entityMetrics.getSlices", "symbol", symbol);
|
|
1930
|
+
const metric = requirePathSegment("entityMetrics.getSlices", "metricType", metricType);
|
|
1931
|
+
return this.client.get(
|
|
1932
|
+
`/api/v2/metrics/entity/${encodeURIComponent(entity)}/metric/${encodeURIComponent(metric)}/slices`
|
|
1933
|
+
);
|
|
1934
|
+
}
|
|
1898
1935
|
};
|
|
1899
1936
|
|
|
1900
1937
|
// src/resources/etfs.ts
|
|
@@ -2270,6 +2307,35 @@ var Institutional = class {
|
|
|
2270
2307
|
async getActivists(reportDate) {
|
|
2271
2308
|
return this.client.get("/api/v1/institutional/activist", { reportDate });
|
|
2272
2309
|
}
|
|
2310
|
+
/**
|
|
2311
|
+
* Get convertible bond positions from 13F filings for one quarter, one row per issuer,
|
|
2312
|
+
* grouped by the issuer's equity ticker.
|
|
2313
|
+
*
|
|
2314
|
+
* `reportDate` is the quarter end as an ISO date (e.g. `"2026-06-30"`); the API requires it,
|
|
2315
|
+
* so take one from `getQuarters()`. Returns the preview envelope, so the rows are `.data`. A
|
|
2316
|
+
* FREE key receives the top three rows with `isPreview: true` and `totalCount` holding the full
|
|
2317
|
+
* row count; a PRO key receives the full list.
|
|
2318
|
+
*
|
|
2319
|
+
* Each row's `bondTickers` is one comma-separated string, not an array.
|
|
2320
|
+
*/
|
|
2321
|
+
async getBondFlows(reportDate) {
|
|
2322
|
+
return this.client.get("/api/v1/institutional/bonds", { reportDate });
|
|
2323
|
+
}
|
|
2324
|
+
/**
|
|
2325
|
+
* Get the call and put positions institutions reported on Form 13F for one quarter, one row
|
|
2326
|
+
* per stock.
|
|
2327
|
+
*
|
|
2328
|
+
* These are quarter-end 13F holdings, not options market activity: for options volume, open
|
|
2329
|
+
* interest and implied volatility, use `client.options` and `stocks.getOptionsSummary()`.
|
|
2330
|
+
*
|
|
2331
|
+
* `reportDate` is the quarter end as an ISO date (e.g. `"2026-06-30"`); the API requires it,
|
|
2332
|
+
* so take one from `getQuarters()`. Returns the preview envelope, so the rows are `.data`. A
|
|
2333
|
+
* FREE key receives the top three rows with `isPreview: true` and `totalCount` holding the full
|
|
2334
|
+
* row count; a PRO key receives the full list.
|
|
2335
|
+
*/
|
|
2336
|
+
async getOptionFlows(reportDate) {
|
|
2337
|
+
return this.client.get("/api/v1/institutional/options", { reportDate });
|
|
2338
|
+
}
|
|
2273
2339
|
/**
|
|
2274
2340
|
* Discover institutions: a paginated, AUM-ranked list of filers (slug + metadata)
|
|
2275
2341
|
* so you can find what to query without knowing slugs upfront.
|
|
@@ -2411,6 +2477,37 @@ var MarketMoodResource = class {
|
|
|
2411
2477
|
// index envelope alongside fed-sentiment and ai-sentiment. Use this resource when you want
|
|
2412
2478
|
// the phase band, weekly change, per-signal breakdown and per-sector map; use `indexes`
|
|
2413
2479
|
// when you want every index to answer the same shape. Both report the same headline number.
|
|
2480
|
+
/**
|
|
2481
|
+
* Get the per-sector sentiment rollup: the 11 GICS sectors, each measured against the
|
|
2482
|
+
* market's own news-and-social tone.
|
|
2483
|
+
*
|
|
2484
|
+
* Compare sectors on `consensusVsMarket`, the gap between a sector's bullish-versus-bearish
|
|
2485
|
+
* mention balance and the market's. Available on every tier with the same response; each
|
|
2486
|
+
* call counts against the monthly quota. It is a daily precomputed snapshot, so `generatedAt`
|
|
2487
|
+
* (epoch seconds) is its freshness.
|
|
2488
|
+
*
|
|
2489
|
+
* @example
|
|
2490
|
+
* const { sectors } = await client.marketMood.getSentimentSectors();
|
|
2491
|
+
* for (const s of sectors) console.log(s.sector, s.consensusVsMarket, s.consensusLabel);
|
|
2492
|
+
*/
|
|
2493
|
+
async getSentimentSectors() {
|
|
2494
|
+
return this.client.get("/api/v1/sentiment/sectors");
|
|
2495
|
+
}
|
|
2496
|
+
/**
|
|
2497
|
+
* Get market-wide sentiment breadth: each day's share of the covered US stocks leaning
|
|
2498
|
+
* bullish, neutral or bearish, the tone analogue of an advance/decline line.
|
|
2499
|
+
*
|
|
2500
|
+
* `series` runs oldest to newest, and `latest` is the newest entry of `series`. Available on
|
|
2501
|
+
* every tier with the same response; each call counts against the monthly quota. It is a daily
|
|
2502
|
+
* precomputed snapshot, so `generatedAt` (epoch seconds) is its freshness.
|
|
2503
|
+
*
|
|
2504
|
+
* @example
|
|
2505
|
+
* const breadth = await client.marketMood.getSentimentBreadth();
|
|
2506
|
+
* console.log(breadth.latest?.date, breadth.latest?.netBreadth);
|
|
2507
|
+
*/
|
|
2508
|
+
async getSentimentBreadth() {
|
|
2509
|
+
return this.client.get("/api/v1/sentiment/breadth");
|
|
2510
|
+
}
|
|
2414
2511
|
};
|
|
2415
2512
|
|
|
2416
2513
|
// src/resources/marketSummary.ts
|
package/dist/index.cjs
CHANGED
|
@@ -253,6 +253,16 @@ var Calendar = class {
|
|
|
253
253
|
constructor(client) {
|
|
254
254
|
this.client = client;
|
|
255
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* List the calendars the API serves, with the path of each, so a client can find them
|
|
258
|
+
* without hardcoding paths.
|
|
259
|
+
*
|
|
260
|
+
* Every tier receives the same list, and the call does not count against the monthly quota;
|
|
261
|
+
* the per-minute rate limit still applies.
|
|
262
|
+
*/
|
|
263
|
+
async list() {
|
|
264
|
+
return this.client.get("/api/v1/calendar");
|
|
265
|
+
}
|
|
256
266
|
/**
|
|
257
267
|
* Upcoming company earnings, sorted by date.
|
|
258
268
|
*
|
|
@@ -434,6 +444,14 @@ var Earnings = class {
|
|
|
434
444
|
};
|
|
435
445
|
|
|
436
446
|
// src/resources/entityMetrics.ts
|
|
447
|
+
function requirePathSegment(method, name, value) {
|
|
448
|
+
if (typeof value !== "string" || value.trim() === "" || value === "." || value === "..") {
|
|
449
|
+
throw new SentiSenseError(
|
|
450
|
+
`${method}: ${name} must not be empty, "." or ".." (got ${JSON.stringify(value)})`
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
return value;
|
|
454
|
+
}
|
|
437
455
|
var EntityMetrics = class {
|
|
438
456
|
constructor(client) {
|
|
439
457
|
this.client = client;
|
|
@@ -484,6 +502,25 @@ var EntityMetrics = class {
|
|
|
484
502
|
}
|
|
485
503
|
);
|
|
486
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* List the dimensions a metric can be broken down by for one entity, with the values present
|
|
507
|
+
* in the data, so you can see what exists before calling `getDistribution()`.
|
|
508
|
+
*
|
|
509
|
+
* Returns a plain array, empty when the metric has no slices for this entity. Available on
|
|
510
|
+
* every tier; each call counts against the monthly quota.
|
|
511
|
+
*
|
|
512
|
+
* @param symbol Ticker symbol (e.g. "AAPL") or entity urlSlug (e.g. "Nancy-Pelosi").
|
|
513
|
+
* @param metricType The metric to look up (e.g. "mentions").
|
|
514
|
+
* @throws {SentiSenseError} Before any request, when `symbol` or `metricType` is empty,
|
|
515
|
+
* whitespace only, `"."` or `".."`.
|
|
516
|
+
*/
|
|
517
|
+
async getSlices(symbol, metricType) {
|
|
518
|
+
const entity = requirePathSegment("entityMetrics.getSlices", "symbol", symbol);
|
|
519
|
+
const metric = requirePathSegment("entityMetrics.getSlices", "metricType", metricType);
|
|
520
|
+
return this.client.get(
|
|
521
|
+
`/api/v2/metrics/entity/${encodeURIComponent(entity)}/metric/${encodeURIComponent(metric)}/slices`
|
|
522
|
+
);
|
|
523
|
+
}
|
|
487
524
|
};
|
|
488
525
|
|
|
489
526
|
// src/resources/etfs.ts
|
|
@@ -859,6 +896,35 @@ var Institutional = class {
|
|
|
859
896
|
async getActivists(reportDate) {
|
|
860
897
|
return this.client.get("/api/v1/institutional/activist", { reportDate });
|
|
861
898
|
}
|
|
899
|
+
/**
|
|
900
|
+
* Get convertible bond positions from 13F filings for one quarter, one row per issuer,
|
|
901
|
+
* grouped by the issuer's equity ticker.
|
|
902
|
+
*
|
|
903
|
+
* `reportDate` is the quarter end as an ISO date (e.g. `"2026-06-30"`); the API requires it,
|
|
904
|
+
* so take one from `getQuarters()`. Returns the preview envelope, so the rows are `.data`. A
|
|
905
|
+
* FREE key receives the top three rows with `isPreview: true` and `totalCount` holding the full
|
|
906
|
+
* row count; a PRO key receives the full list.
|
|
907
|
+
*
|
|
908
|
+
* Each row's `bondTickers` is one comma-separated string, not an array.
|
|
909
|
+
*/
|
|
910
|
+
async getBondFlows(reportDate) {
|
|
911
|
+
return this.client.get("/api/v1/institutional/bonds", { reportDate });
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Get the call and put positions institutions reported on Form 13F for one quarter, one row
|
|
915
|
+
* per stock.
|
|
916
|
+
*
|
|
917
|
+
* These are quarter-end 13F holdings, not options market activity: for options volume, open
|
|
918
|
+
* interest and implied volatility, use `client.options` and `stocks.getOptionsSummary()`.
|
|
919
|
+
*
|
|
920
|
+
* `reportDate` is the quarter end as an ISO date (e.g. `"2026-06-30"`); the API requires it,
|
|
921
|
+
* so take one from `getQuarters()`. Returns the preview envelope, so the rows are `.data`. A
|
|
922
|
+
* FREE key receives the top three rows with `isPreview: true` and `totalCount` holding the full
|
|
923
|
+
* row count; a PRO key receives the full list.
|
|
924
|
+
*/
|
|
925
|
+
async getOptionFlows(reportDate) {
|
|
926
|
+
return this.client.get("/api/v1/institutional/options", { reportDate });
|
|
927
|
+
}
|
|
862
928
|
/**
|
|
863
929
|
* Discover institutions: a paginated, AUM-ranked list of filers (slug + metadata)
|
|
864
930
|
* so you can find what to query without knowing slugs upfront.
|
|
@@ -1000,6 +1066,37 @@ var MarketMoodResource = class {
|
|
|
1000
1066
|
// index envelope alongside fed-sentiment and ai-sentiment. Use this resource when you want
|
|
1001
1067
|
// the phase band, weekly change, per-signal breakdown and per-sector map; use `indexes`
|
|
1002
1068
|
// when you want every index to answer the same shape. Both report the same headline number.
|
|
1069
|
+
/**
|
|
1070
|
+
* Get the per-sector sentiment rollup: the 11 GICS sectors, each measured against the
|
|
1071
|
+
* market's own news-and-social tone.
|
|
1072
|
+
*
|
|
1073
|
+
* Compare sectors on `consensusVsMarket`, the gap between a sector's bullish-versus-bearish
|
|
1074
|
+
* mention balance and the market's. Available on every tier with the same response; each
|
|
1075
|
+
* call counts against the monthly quota. It is a daily precomputed snapshot, so `generatedAt`
|
|
1076
|
+
* (epoch seconds) is its freshness.
|
|
1077
|
+
*
|
|
1078
|
+
* @example
|
|
1079
|
+
* const { sectors } = await client.marketMood.getSentimentSectors();
|
|
1080
|
+
* for (const s of sectors) console.log(s.sector, s.consensusVsMarket, s.consensusLabel);
|
|
1081
|
+
*/
|
|
1082
|
+
async getSentimentSectors() {
|
|
1083
|
+
return this.client.get("/api/v1/sentiment/sectors");
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Get market-wide sentiment breadth: each day's share of the covered US stocks leaning
|
|
1087
|
+
* bullish, neutral or bearish, the tone analogue of an advance/decline line.
|
|
1088
|
+
*
|
|
1089
|
+
* `series` runs oldest to newest, and `latest` is the newest entry of `series`. Available on
|
|
1090
|
+
* every tier with the same response; each call counts against the monthly quota. It is a daily
|
|
1091
|
+
* precomputed snapshot, so `generatedAt` (epoch seconds) is its freshness.
|
|
1092
|
+
*
|
|
1093
|
+
* @example
|
|
1094
|
+
* const breadth = await client.marketMood.getSentimentBreadth();
|
|
1095
|
+
* console.log(breadth.latest?.date, breadth.latest?.netBreadth);
|
|
1096
|
+
*/
|
|
1097
|
+
async getSentimentBreadth() {
|
|
1098
|
+
return this.client.get("/api/v1/sentiment/breadth");
|
|
1099
|
+
}
|
|
1003
1100
|
};
|
|
1004
1101
|
|
|
1005
1102
|
// src/resources/marketSummary.ts
|
|
@@ -1597,7 +1694,7 @@ function serializeTrackerParams(params) {
|
|
|
1597
1694
|
}
|
|
1598
1695
|
|
|
1599
1696
|
// src/version.ts
|
|
1600
|
-
var VERSION = "0.
|
|
1697
|
+
var VERSION = "0.82.0";
|
|
1601
1698
|
|
|
1602
1699
|
// src/client.ts
|
|
1603
1700
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|