sentisense 0.59.0 → 0.61.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 +10 -2
- package/dist/cli.cjs +15 -8
- package/dist/index.cjs +15 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +154 -7
- package/dist/index.d.ts +154 -7
- package/dist/index.mjs +15 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -477,11 +477,16 @@ client.entityMetrics.getMetrics("AAPL", {
|
|
|
477
477
|
maxDataPoints: 100,
|
|
478
478
|
})
|
|
479
479
|
|
|
480
|
-
//
|
|
481
|
-
client.entityMetrics.getDistribution("AAPL", "
|
|
480
|
+
// Share of mentions by source (valueType "SHARE_PERCENT")
|
|
481
|
+
client.entityMetrics.getDistribution("AAPL", "mentions")
|
|
482
482
|
client.entityMetrics.getDistribution("AAPL", "mentions", { dimension: "source" })
|
|
483
|
+
|
|
484
|
+
// Mean sentiment by source, in [-1, 1] (valueType "MEAN")
|
|
485
|
+
client.entityMetrics.getDistribution("AAPL", "sentiment")
|
|
483
486
|
```
|
|
484
487
|
|
|
488
|
+
In a distribution, `valueType` says what each number is. For a count metric such as `mentions` or `creators` it is `"SHARE_PERCENT"`: each value is that source's percentage share of the total, summing to about 100. For `sentiment` it is `"MEAN"`: each value is that source's mean polarity over the window, in [-1, 1], the same numbers as `GET /api/v2/metrics/entity/{symbol}/metric/sentiment/mean-by/source` in the [API reference](https://sentisense.ai/docs/api/metrics/). `sentisense_score` has no per-source split and answers with an empty distribution.
|
|
489
|
+
|
|
485
490
|
Available metric types: `mentions`, `sentiment`, `sentisense_score`, `sentisense_rating`, `social_dominance`, `creators`. `sentisense` is an alias for `sentisense_score`; either spelling returns the same series, and keys are case-insensitive. Responses always name the canonical type, so a `sentisense` request answers with `SENTISENSE_SCORE`. `sentisense_rating` is the SentiSense Rating score and is a time series only: it has no source breakdown, so `getDistribution` answers with an empty distribution for it.
|
|
486
491
|
|
|
487
492
|
### Options
|
|
@@ -496,6 +501,8 @@ client.stocks.getOptionsHistory("NVDA", { window: "2y" }) // That name's daily
|
|
|
496
501
|
|
|
497
502
|
The radar carries two separately-ranked boards: `data.rows` for stocks and `data.etfRows` for ETFs. Keep them apart. Every reading behind a row's `interestScore` is a percentile of that ticker's own trailing history, so a ranking built across both boards compares numbers measured against different baselines. The aggregates split the same way, with the `etf`-prefixed fields describing the ETF board alone.
|
|
498
503
|
|
|
504
|
+
During the trading session the dossier and the radar also carry a few intraday fields, the same on every tier: `intradayFlow` (a count of the ticker's unusual contracts so far, when the first one was flagged, and the board's own clock), `largePrintCount` and `largestPrintPctl` on the dossier, and `intradayActiveCount` with `intradayRanking` on the radar. They carry no contract, strike, price or premium, and are absent before the day's first board. `capabilities.intradayBoard` says where the contract-level board lives; its rows are served in the SentiSense app, not by the API.
|
|
505
|
+
|
|
499
506
|
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.
|
|
500
507
|
|
|
501
508
|
### SentiSense Rating
|
|
@@ -529,6 +536,7 @@ All five are optional: a response served before they shipped omits them. For the
|
|
|
529
536
|
|
|
530
537
|
```typescript
|
|
531
538
|
client.marketMood.get() // Composite market sentiment with sub-signals
|
|
539
|
+
client.marketMood.get({ days: 30 }) // Same, with 30 days of history (default 180)
|
|
532
540
|
client.kb.getPopularEntities() // Most-tracked entities
|
|
533
541
|
client.kb.searchEntities("Tesla") // Resolve a name, alias, ticker or slug to what we track
|
|
534
542
|
```
|
package/dist/cli.cjs
CHANGED
|
@@ -1331,7 +1331,7 @@ var flowsCommand = {
|
|
|
1331
1331
|
};
|
|
1332
1332
|
|
|
1333
1333
|
// src/version.ts
|
|
1334
|
-
var VERSION = "0.
|
|
1334
|
+
var VERSION = "0.61.0";
|
|
1335
1335
|
|
|
1336
1336
|
// src/resources/analyst.ts
|
|
1337
1337
|
var Analyst = class {
|
|
@@ -1694,10 +1694,16 @@ var EntityMetrics = class {
|
|
|
1694
1694
|
);
|
|
1695
1695
|
}
|
|
1696
1696
|
/**
|
|
1697
|
-
* Get
|
|
1697
|
+
* Get a metric broken down by dimension (default dimension: source).
|
|
1698
|
+
*
|
|
1699
|
+
* `valueType` on the response says what each number in `distribution` is. For a count metric
|
|
1700
|
+
* such as `"mentions"` it is `"SHARE_PERCENT"`: each source's percentage share of the total,
|
|
1701
|
+
* summing to about 100. For `"sentiment"` it is `"MEAN"`: each source's mean polarity over the
|
|
1702
|
+
* window, in [-1, 1]. `"sentisense_score"` has no per-source split and answers with an empty
|
|
1703
|
+
* distribution.
|
|
1698
1704
|
*
|
|
1699
1705
|
* @param symbol Ticker symbol (e.g. "AAPL") or entity urlSlug.
|
|
1700
|
-
* @param metricType The metric to break down (e.g. "mentions"
|
|
1706
|
+
* @param metricType The metric to break down (e.g. "mentions" or "sentiment").
|
|
1701
1707
|
* @param options Optional dimension parameter.
|
|
1702
1708
|
*/
|
|
1703
1709
|
async getDistribution(symbol, metricType, options = {}) {
|
|
@@ -2088,12 +2094,13 @@ var MarketMoodResource = class {
|
|
|
2088
2094
|
constructor(client) {
|
|
2089
2095
|
this.client = client;
|
|
2090
2096
|
}
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
return this.client.get(
|
|
2097
|
+
async get(options) {
|
|
2098
|
+
const days = options?.days;
|
|
2099
|
+
return this.client.get(
|
|
2100
|
+
"/api/v2/market-mood",
|
|
2101
|
+
days === void 0 ? void 0 : { days }
|
|
2102
|
+
);
|
|
2094
2103
|
}
|
|
2095
|
-
// TODO: accept a `days` param to control history length (the endpoint supports ?days=N).
|
|
2096
|
-
//
|
|
2097
2104
|
// Market Mood is also reachable through `client.indexes`, which serves it in the shared
|
|
2098
2105
|
// index envelope alongside fed-sentiment and ai-sentiment. Use this resource when you want
|
|
2099
2106
|
// the phase band, weekly change, per-signal breakdown and per-sector map; use `indexes`
|
package/dist/index.cjs
CHANGED
|
@@ -443,10 +443,16 @@ var EntityMetrics = class {
|
|
|
443
443
|
);
|
|
444
444
|
}
|
|
445
445
|
/**
|
|
446
|
-
* Get
|
|
446
|
+
* Get a metric broken down by dimension (default dimension: source).
|
|
447
|
+
*
|
|
448
|
+
* `valueType` on the response says what each number in `distribution` is. For a count metric
|
|
449
|
+
* such as `"mentions"` it is `"SHARE_PERCENT"`: each source's percentage share of the total,
|
|
450
|
+
* summing to about 100. For `"sentiment"` it is `"MEAN"`: each source's mean polarity over the
|
|
451
|
+
* window, in [-1, 1]. `"sentisense_score"` has no per-source split and answers with an empty
|
|
452
|
+
* distribution.
|
|
447
453
|
*
|
|
448
454
|
* @param symbol Ticker symbol (e.g. "AAPL") or entity urlSlug.
|
|
449
|
-
* @param metricType The metric to break down (e.g. "mentions"
|
|
455
|
+
* @param metricType The metric to break down (e.g. "mentions" or "sentiment").
|
|
450
456
|
* @param options Optional dimension parameter.
|
|
451
457
|
*/
|
|
452
458
|
async getDistribution(symbol, metricType, options = {}) {
|
|
@@ -837,12 +843,13 @@ var MarketMoodResource = class {
|
|
|
837
843
|
constructor(client) {
|
|
838
844
|
this.client = client;
|
|
839
845
|
}
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
return this.client.get(
|
|
846
|
+
async get(options) {
|
|
847
|
+
const days = options?.days;
|
|
848
|
+
return this.client.get(
|
|
849
|
+
"/api/v2/market-mood",
|
|
850
|
+
days === void 0 ? void 0 : { days }
|
|
851
|
+
);
|
|
843
852
|
}
|
|
844
|
-
// TODO: accept a `days` param to control history length (the endpoint supports ?days=N).
|
|
845
|
-
//
|
|
846
853
|
// Market Mood is also reachable through `client.indexes`, which serves it in the shared
|
|
847
854
|
// index envelope alongside fed-sentiment and ai-sentiment. Use this resource when you want
|
|
848
855
|
// the phase band, weekly change, per-signal breakdown and per-sector map; use `indexes`
|
|
@@ -1346,7 +1353,7 @@ var Trackers = class {
|
|
|
1346
1353
|
};
|
|
1347
1354
|
|
|
1348
1355
|
// src/version.ts
|
|
1349
|
-
var VERSION = "0.
|
|
1356
|
+
var VERSION = "0.61.0";
|
|
1350
1357
|
|
|
1351
1358
|
// src/client.ts
|
|
1352
1359
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|