sentisense 0.46.0 → 0.47.1
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 +18 -3
- package/dist/cli.cjs +71 -7
- package/dist/index.cjs +69 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +213 -3
- package/dist/index.d.ts +213 -3
- package/dist/index.mjs +69 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,12 +117,12 @@ If you set `SENTISENSE_AGENT_NAME` (what your agent is called) and `SENTISENSE_S
|
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
119
|
export SENTISENSE_AGENT_NAME=research-desk
|
|
120
|
-
export SENTISENSE_SKILL=
|
|
120
|
+
export SENTISENSE_SKILL=us-stocks-analysis
|
|
121
121
|
npx -y sentisense@latest quote NVDA
|
|
122
|
-
# User-Agent: sentisense-node/{version} sentisense-cli/{version} (
|
|
122
|
+
# User-Agent: sentisense-node/{version} sentisense-cli/{version} (us-stocks-analysis; agent/research-desk)
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
Either can also be a flag (`--agent`, `--skill`) or a stored setting (`sentisense auth --agent research-desk --skill
|
|
125
|
+
Either can also be a flag (`--agent`, `--skill`) or a stored setting (`sentisense auth --agent research-desk --skill us-stocks-analysis`), resolved flag first, then environment, then config. Values are reduced to letters, digits, dot, underscore and hyphen, and capped at 32 characters, so nothing you set can reshape the header.
|
|
126
126
|
|
|
127
127
|
Research data, not investment advice.
|
|
128
128
|
|
|
@@ -211,6 +211,7 @@ client.stocks.getMarketStatus() // Market open/closed
|
|
|
211
211
|
client.stocks.getFundamentals("AAPL") // Financial data
|
|
212
212
|
client.stocks.getShortInterest("GME") // Short interest
|
|
213
213
|
client.stocks.getOptionsSummary("NVDA") // End-of-day options dossier
|
|
214
|
+
client.stocks.getOptionsHistory("NVDA", { window: "2y" }) // Daily options aggregates over time
|
|
214
215
|
client.stocks.getAISummary("AAPL", { depth: "deep" }) // AI report (PRO)
|
|
215
216
|
```
|
|
216
217
|
|
|
@@ -386,6 +387,20 @@ client.entityMetrics.getDistribution("AAPL", "mentions", { dimension: "source" }
|
|
|
386
387
|
|
|
387
388
|
Available metric types: `mentions`, `sentiment`, `sentisense`, `social_dominance`, `creators`.
|
|
388
389
|
|
|
390
|
+
### Options
|
|
391
|
+
|
|
392
|
+
End-of-day options positioning: where implied volatility, put/call flow and skew are unusual today, and how a name's readings have trended.
|
|
393
|
+
|
|
394
|
+
```typescript
|
|
395
|
+
client.options.getOverview() // Market-wide radar, ranked
|
|
396
|
+
client.stocks.getOptionsSummary("NVDA") // One name's full dossier
|
|
397
|
+
client.stocks.getOptionsHistory("NVDA", { window: "2y" }) // That name's daily series
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
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.
|
|
401
|
+
|
|
402
|
+
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; `getOptionsHistory` reports it as an empty `series` instead, so check the array rather than null-checking there.
|
|
403
|
+
|
|
389
404
|
### Market mood & knowledge base
|
|
390
405
|
|
|
391
406
|
```typescript
|
package/dist/cli.cjs
CHANGED
|
@@ -477,8 +477,7 @@ function clearConfig(dir) {
|
|
|
477
477
|
return true;
|
|
478
478
|
}
|
|
479
479
|
function maskKey(key) {
|
|
480
|
-
|
|
481
|
-
return `${key.slice(0, 4)}...${key.slice(-4)}`;
|
|
480
|
+
return `hidden (${key.length} chars)`;
|
|
482
481
|
}
|
|
483
482
|
|
|
484
483
|
// src/cli/commands/auth.ts
|
|
@@ -1038,7 +1037,7 @@ var flowsCommand = {
|
|
|
1038
1037
|
};
|
|
1039
1038
|
|
|
1040
1039
|
// src/version.ts
|
|
1041
|
-
var VERSION = "0.
|
|
1040
|
+
var VERSION = "0.47.1";
|
|
1042
1041
|
|
|
1043
1042
|
// src/resources/analyst.ts
|
|
1044
1043
|
var Analyst = class {
|
|
@@ -1623,6 +1622,39 @@ var MarketSummaryResource = class {
|
|
|
1623
1622
|
}
|
|
1624
1623
|
};
|
|
1625
1624
|
|
|
1625
|
+
// src/resources/options.ts
|
|
1626
|
+
var Options = class {
|
|
1627
|
+
constructor(client) {
|
|
1628
|
+
this.client = client;
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* Get the market-wide options radar: where implied volatility, put/call flow and skew are
|
|
1632
|
+
* unusual today, ranked.
|
|
1633
|
+
*
|
|
1634
|
+
* End of day, not live. `asOf` is the latest completed session and the build refreshes the
|
|
1635
|
+
* following morning, so this is positioning, not a quote feed.
|
|
1636
|
+
*
|
|
1637
|
+
* **The response carries two separately-ranked boards.** `data.rows` is the covered stock
|
|
1638
|
+
* universe and `data.etfRows` is the covered ETF universe. Do not merge them: each row's
|
|
1639
|
+
* readings are percentiles of that ticker's own trailing history, so a rank built across
|
|
1640
|
+
* both boards compares numbers measured against different baselines. The aggregates are
|
|
1641
|
+
* split the same way, with the `etf`-prefixed fields describing the ETF board alone.
|
|
1642
|
+
*
|
|
1643
|
+
* `data` is `null` before the first nightly build populates it, which is a cold-start
|
|
1644
|
+
* state rather than an error.
|
|
1645
|
+
*
|
|
1646
|
+
* Tiering: a PRO key receives every row. A FREE key receives the top 25 stock rows plus
|
|
1647
|
+
* all the aggregates, with `isPreview` true and the envelope's `totalCount` reporting the
|
|
1648
|
+
* full stock board; `data.etfTotalCount` does the same for the ETF board.
|
|
1649
|
+
*
|
|
1650
|
+
* Drill into any row with `client.stocks.getOptionsSummary(ticker)` for its full dossier,
|
|
1651
|
+
* or `client.stocks.getOptionsHistory(ticker)` to chart how a reading has trended.
|
|
1652
|
+
*/
|
|
1653
|
+
async getOverview() {
|
|
1654
|
+
return this.client.get("/api/v1/options/overview");
|
|
1655
|
+
}
|
|
1656
|
+
};
|
|
1657
|
+
|
|
1626
1658
|
// src/resources/screener.ts
|
|
1627
1659
|
var Screener = class {
|
|
1628
1660
|
constructor(client) {
|
|
@@ -1704,6 +1736,12 @@ var Screener = class {
|
|
|
1704
1736
|
};
|
|
1705
1737
|
|
|
1706
1738
|
// src/resources/stocks.ts
|
|
1739
|
+
function withLegacyName(rows) {
|
|
1740
|
+
if (!Array.isArray(rows)) return rows;
|
|
1741
|
+
return rows.map(
|
|
1742
|
+
(row) => row && !row.name ? { ...row, name: row.simpleName || row.companyName || "" } : row
|
|
1743
|
+
);
|
|
1744
|
+
}
|
|
1707
1745
|
var Stocks = class {
|
|
1708
1746
|
constructor(client) {
|
|
1709
1747
|
this.client = client;
|
|
@@ -1712,9 +1750,10 @@ var Stocks = class {
|
|
|
1712
1750
|
async list() {
|
|
1713
1751
|
return this.client.get("/api/v1/stocks");
|
|
1714
1752
|
}
|
|
1715
|
-
/** List all stocks with
|
|
1753
|
+
/** List all stocks with company names, kbEntityId, urlSlug. */
|
|
1716
1754
|
async listDetailed() {
|
|
1717
|
-
|
|
1755
|
+
const rows = await this.client.get("/api/v1/stocks/detailed");
|
|
1756
|
+
return withLegacyName(rows);
|
|
1718
1757
|
}
|
|
1719
1758
|
/** Get popular ticker symbols. */
|
|
1720
1759
|
async listPopular() {
|
|
@@ -1722,7 +1761,8 @@ var Stocks = class {
|
|
|
1722
1761
|
}
|
|
1723
1762
|
/** Get popular stocks with details. */
|
|
1724
1763
|
async listPopularDetailed() {
|
|
1725
|
-
|
|
1764
|
+
const rows = await this.client.get("/api/v1/stocks/popular/detailed");
|
|
1765
|
+
return withLegacyName(rows);
|
|
1726
1766
|
}
|
|
1727
1767
|
/** Get real-time price for a single ticker. */
|
|
1728
1768
|
async getPrice(ticker) {
|
|
@@ -1923,6 +1963,29 @@ var Stocks = class {
|
|
|
1923
1963
|
`/api/v1/stocks/${encodeURIComponent(ticker.toUpperCase())}/options/summary`
|
|
1924
1964
|
);
|
|
1925
1965
|
}
|
|
1966
|
+
/**
|
|
1967
|
+
* Get the daily options aggregates for one stock or ETF as a time series, oldest first.
|
|
1968
|
+
* Use it to chart how a reading has trended: implied volatility, put/call flow, skew.
|
|
1969
|
+
*
|
|
1970
|
+
* Each element has the same shape as the dossier's `latest` aggregate, so a chart built
|
|
1971
|
+
* off `getOptionsSummary` reads this series without a second mapping.
|
|
1972
|
+
*
|
|
1973
|
+
* **A null payload is not how this one reports no coverage.** Unlike
|
|
1974
|
+
* {@link Stocks.getOptionsSummary}, an uncovered ticker, an unknown symbol and a covered
|
|
1975
|
+
* ticker with nothing stored yet all answer with a populated object whose `series` is
|
|
1976
|
+
* empty. Check the array's length, not the payload.
|
|
1977
|
+
*
|
|
1978
|
+
* The window served is not always the window requested: an unrecognised value clamps to
|
|
1979
|
+
* `"1y"` rather than erroring, and a FREE key always receives `"1y"`. Read `data.window`
|
|
1980
|
+
* for what you actually got. `"5y"` means all stored history, currently a little over two
|
|
1981
|
+
* years, so it can answer with nearly the same series as `"2y"`.
|
|
1982
|
+
*/
|
|
1983
|
+
async getOptionsHistory(ticker, options) {
|
|
1984
|
+
return this.client.get(
|
|
1985
|
+
`/api/v1/stocks/${encodeURIComponent(ticker.toUpperCase())}/options/history`,
|
|
1986
|
+
options
|
|
1987
|
+
);
|
|
1988
|
+
}
|
|
1926
1989
|
};
|
|
1927
1990
|
|
|
1928
1991
|
// src/resources/indexes.ts
|
|
@@ -2048,6 +2111,7 @@ var SentiSense = class {
|
|
|
2048
2111
|
this.calendar = new Calendar(this);
|
|
2049
2112
|
this.earnings = new Earnings(this);
|
|
2050
2113
|
this.screener = new Screener(this);
|
|
2114
|
+
this.options = new Options(this);
|
|
2051
2115
|
}
|
|
2052
2116
|
/** @internal */
|
|
2053
2117
|
async get(path, params) {
|
|
@@ -2471,7 +2535,7 @@ var healthCommand = {
|
|
|
2471
2535
|
),
|
|
2472
2536
|
field(
|
|
2473
2537
|
"api key",
|
|
2474
|
-
keyState.ok ? `ok (${context.
|
|
2538
|
+
keyState.ok ? `ok (via ${context.apiKeySource})` : keyState.detail,
|
|
2475
2539
|
keyState.ok ? "up" : "down"
|
|
2476
2540
|
),
|
|
2477
2541
|
field("latency", latency === void 0 ? "n/a" : `${latency} ms`),
|
package/dist/index.cjs
CHANGED
|
@@ -657,6 +657,39 @@ var MarketSummaryResource = class {
|
|
|
657
657
|
}
|
|
658
658
|
};
|
|
659
659
|
|
|
660
|
+
// src/resources/options.ts
|
|
661
|
+
var Options = class {
|
|
662
|
+
constructor(client) {
|
|
663
|
+
this.client = client;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Get the market-wide options radar: where implied volatility, put/call flow and skew are
|
|
667
|
+
* unusual today, ranked.
|
|
668
|
+
*
|
|
669
|
+
* End of day, not live. `asOf` is the latest completed session and the build refreshes the
|
|
670
|
+
* following morning, so this is positioning, not a quote feed.
|
|
671
|
+
*
|
|
672
|
+
* **The response carries two separately-ranked boards.** `data.rows` is the covered stock
|
|
673
|
+
* universe and `data.etfRows` is the covered ETF universe. Do not merge them: each row's
|
|
674
|
+
* readings are percentiles of that ticker's own trailing history, so a rank built across
|
|
675
|
+
* both boards compares numbers measured against different baselines. The aggregates are
|
|
676
|
+
* split the same way, with the `etf`-prefixed fields describing the ETF board alone.
|
|
677
|
+
*
|
|
678
|
+
* `data` is `null` before the first nightly build populates it, which is a cold-start
|
|
679
|
+
* state rather than an error.
|
|
680
|
+
*
|
|
681
|
+
* Tiering: a PRO key receives every row. A FREE key receives the top 25 stock rows plus
|
|
682
|
+
* all the aggregates, with `isPreview` true and the envelope's `totalCount` reporting the
|
|
683
|
+
* full stock board; `data.etfTotalCount` does the same for the ETF board.
|
|
684
|
+
*
|
|
685
|
+
* Drill into any row with `client.stocks.getOptionsSummary(ticker)` for its full dossier,
|
|
686
|
+
* or `client.stocks.getOptionsHistory(ticker)` to chart how a reading has trended.
|
|
687
|
+
*/
|
|
688
|
+
async getOverview() {
|
|
689
|
+
return this.client.get("/api/v1/options/overview");
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
|
|
660
693
|
// src/resources/screener.ts
|
|
661
694
|
var Screener = class {
|
|
662
695
|
constructor(client) {
|
|
@@ -738,6 +771,12 @@ var Screener = class {
|
|
|
738
771
|
};
|
|
739
772
|
|
|
740
773
|
// src/resources/stocks.ts
|
|
774
|
+
function withLegacyName(rows) {
|
|
775
|
+
if (!Array.isArray(rows)) return rows;
|
|
776
|
+
return rows.map(
|
|
777
|
+
(row) => row && !row.name ? { ...row, name: row.simpleName || row.companyName || "" } : row
|
|
778
|
+
);
|
|
779
|
+
}
|
|
741
780
|
var Stocks = class {
|
|
742
781
|
constructor(client) {
|
|
743
782
|
this.client = client;
|
|
@@ -746,9 +785,10 @@ var Stocks = class {
|
|
|
746
785
|
async list() {
|
|
747
786
|
return this.client.get("/api/v1/stocks");
|
|
748
787
|
}
|
|
749
|
-
/** List all stocks with
|
|
788
|
+
/** List all stocks with company names, kbEntityId, urlSlug. */
|
|
750
789
|
async listDetailed() {
|
|
751
|
-
|
|
790
|
+
const rows = await this.client.get("/api/v1/stocks/detailed");
|
|
791
|
+
return withLegacyName(rows);
|
|
752
792
|
}
|
|
753
793
|
/** Get popular ticker symbols. */
|
|
754
794
|
async listPopular() {
|
|
@@ -756,7 +796,8 @@ var Stocks = class {
|
|
|
756
796
|
}
|
|
757
797
|
/** Get popular stocks with details. */
|
|
758
798
|
async listPopularDetailed() {
|
|
759
|
-
|
|
799
|
+
const rows = await this.client.get("/api/v1/stocks/popular/detailed");
|
|
800
|
+
return withLegacyName(rows);
|
|
760
801
|
}
|
|
761
802
|
/** Get real-time price for a single ticker. */
|
|
762
803
|
async getPrice(ticker) {
|
|
@@ -957,6 +998,29 @@ var Stocks = class {
|
|
|
957
998
|
`/api/v1/stocks/${encodeURIComponent(ticker.toUpperCase())}/options/summary`
|
|
958
999
|
);
|
|
959
1000
|
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Get the daily options aggregates for one stock or ETF as a time series, oldest first.
|
|
1003
|
+
* Use it to chart how a reading has trended: implied volatility, put/call flow, skew.
|
|
1004
|
+
*
|
|
1005
|
+
* Each element has the same shape as the dossier's `latest` aggregate, so a chart built
|
|
1006
|
+
* off `getOptionsSummary` reads this series without a second mapping.
|
|
1007
|
+
*
|
|
1008
|
+
* **A null payload is not how this one reports no coverage.** Unlike
|
|
1009
|
+
* {@link Stocks.getOptionsSummary}, an uncovered ticker, an unknown symbol and a covered
|
|
1010
|
+
* ticker with nothing stored yet all answer with a populated object whose `series` is
|
|
1011
|
+
* empty. Check the array's length, not the payload.
|
|
1012
|
+
*
|
|
1013
|
+
* The window served is not always the window requested: an unrecognised value clamps to
|
|
1014
|
+
* `"1y"` rather than erroring, and a FREE key always receives `"1y"`. Read `data.window`
|
|
1015
|
+
* for what you actually got. `"5y"` means all stored history, currently a little over two
|
|
1016
|
+
* years, so it can answer with nearly the same series as `"2y"`.
|
|
1017
|
+
*/
|
|
1018
|
+
async getOptionsHistory(ticker, options) {
|
|
1019
|
+
return this.client.get(
|
|
1020
|
+
`/api/v1/stocks/${encodeURIComponent(ticker.toUpperCase())}/options/history`,
|
|
1021
|
+
options
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
960
1024
|
};
|
|
961
1025
|
|
|
962
1026
|
// src/resources/indexes.ts
|
|
@@ -1036,7 +1100,7 @@ var Trackers = class {
|
|
|
1036
1100
|
};
|
|
1037
1101
|
|
|
1038
1102
|
// src/version.ts
|
|
1039
|
-
var VERSION = "0.
|
|
1103
|
+
var VERSION = "0.47.1";
|
|
1040
1104
|
|
|
1041
1105
|
// src/client.ts
|
|
1042
1106
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|
|
@@ -1085,6 +1149,7 @@ var SentiSense = class {
|
|
|
1085
1149
|
this.calendar = new Calendar(this);
|
|
1086
1150
|
this.earnings = new Earnings(this);
|
|
1087
1151
|
this.screener = new Screener(this);
|
|
1152
|
+
this.options = new Options(this);
|
|
1088
1153
|
}
|
|
1089
1154
|
/** @internal */
|
|
1090
1155
|
async get(path, params) {
|