sentisense 0.36.0 → 0.38.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 +49 -0
- package/dist/index.cjs +82 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +404 -2
- package/dist/index.d.ts +404 -2
- package/dist/index.mjs +82 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -17,6 +17,22 @@ interface StockPrice {
|
|
|
17
17
|
timestamp: number;
|
|
18
18
|
/** Extended-hours view (pre-market or after-hours). Null/absent during RTH, overnight, and weekends. */
|
|
19
19
|
extendedHours?: ExtendedHoursInfo | null;
|
|
20
|
+
/**
|
|
21
|
+
* Listing lifecycle. Absent for an ordinarily listed stock, which is almost every ticker.
|
|
22
|
+
*
|
|
23
|
+
* `"DELISTED"` means the company no longer trades publicly and EVERY price field above is
|
|
24
|
+
* frozen at the last trade before {@link delistedDate}. It is not a live price, so do not
|
|
25
|
+
* render `changePercent` as a market move.
|
|
26
|
+
*
|
|
27
|
+
* `"PENDING_DELISTING"` means a merger or take-private is scheduled but the stock still
|
|
28
|
+
* trades normally, so the figures above ARE current. Treat it as informational, never as a
|
|
29
|
+
* data-quality warning.
|
|
30
|
+
*/
|
|
31
|
+
listingStatus?: 'DELISTED' | 'PENDING_DELISTING';
|
|
32
|
+
/** ISO date (YYYY-MM-DD) trading stopped. Absent unless `listingStatus` is `DELISTED`. */
|
|
33
|
+
delistedDate?: string;
|
|
34
|
+
/** Why it delisted. Absent unless `listingStatus` is `DELISTED`. */
|
|
35
|
+
delistingReason?: 'acquired' | 'take_private' | 'bankruptcy' | 'exchange_rule' | 'merged';
|
|
20
36
|
}
|
|
21
37
|
/**
|
|
22
38
|
* Extended-hours session view embedded in price / quote responses when the snapshot sees
|
|
@@ -60,6 +76,22 @@ interface StockQuote {
|
|
|
60
76
|
* omitted rather than computed in that case, so treat them as possibly absent, not zero.
|
|
61
77
|
*/
|
|
62
78
|
reportedCurrency?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Listing lifecycle. Absent for an ordinarily listed stock, which is almost every ticker.
|
|
81
|
+
*
|
|
82
|
+
* `"DELISTED"` means the company no longer trades publicly and EVERY price field above is
|
|
83
|
+
* frozen at the last trade before {@link delistedDate}. It is not a live quote, so do not
|
|
84
|
+
* render `changePercent` as a market move.
|
|
85
|
+
*
|
|
86
|
+
* `"PENDING_DELISTING"` means a merger or take-private is scheduled but the stock still
|
|
87
|
+
* trades and reports normally, so the figures above ARE current. Treat it as informational,
|
|
88
|
+
* never as a data-quality warning.
|
|
89
|
+
*/
|
|
90
|
+
listingStatus?: 'DELISTED' | 'PENDING_DELISTING';
|
|
91
|
+
/** ISO date (YYYY-MM-DD) trading stopped. Absent unless `listingStatus` is `DELISTED`. */
|
|
92
|
+
delistedDate?: string;
|
|
93
|
+
/** Why it delisted. Absent unless `listingStatus` is `DELISTED`. */
|
|
94
|
+
delistingReason?: 'acquired' | 'take_private' | 'bankruptcy' | 'exchange_rule' | 'merged';
|
|
63
95
|
timestamp: number | null;
|
|
64
96
|
/** Extended-hours view (pre-market or after-hours). Null/absent during RTH, overnight, and weekends. */
|
|
65
97
|
extendedHours?: ExtendedHoursInfo | null;
|
|
@@ -90,6 +122,15 @@ interface StockProfile {
|
|
|
90
122
|
industry?: string;
|
|
91
123
|
marketCap?: number;
|
|
92
124
|
description?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Listing lifecycle. Absent for an ordinarily listed stock. See {@link StockPrice.listingStatus}
|
|
127
|
+
* for what `"DELISTED"` and `"PENDING_DELISTING"` mean for the rest of the payload.
|
|
128
|
+
*/
|
|
129
|
+
listingStatus?: 'DELISTED' | 'PENDING_DELISTING';
|
|
130
|
+
/** ISO date (YYYY-MM-DD) trading stopped. Absent unless `listingStatus` is `DELISTED`. */
|
|
131
|
+
delistedDate?: string;
|
|
132
|
+
/** Why it delisted. Absent unless `listingStatus` is `DELISTED`. */
|
|
133
|
+
delistingReason?: 'acquired' | 'take_private' | 'bankruptcy' | 'exchange_rule' | 'merged';
|
|
93
134
|
[key: string]: unknown;
|
|
94
135
|
}
|
|
95
136
|
interface StockEntity {
|
|
@@ -1405,6 +1446,259 @@ interface IndexHistoryResponse {
|
|
|
1405
1446
|
days: number;
|
|
1406
1447
|
history: IndexHistoryPoint[];
|
|
1407
1448
|
}
|
|
1449
|
+
/** One selectable value of an `ENUM` screener field. */
|
|
1450
|
+
interface ScreenerFieldOption {
|
|
1451
|
+
/** The number a filter carries for this reading. */
|
|
1452
|
+
value: number | null;
|
|
1453
|
+
/** Display copy. */
|
|
1454
|
+
label: string;
|
|
1455
|
+
}
|
|
1456
|
+
/**
|
|
1457
|
+
* One filterable field from `client.screener.fields()`.
|
|
1458
|
+
*
|
|
1459
|
+
* Build a filter UI from this rather than hardcoding the field list, and new
|
|
1460
|
+
* fields appear without an SDK release.
|
|
1461
|
+
*
|
|
1462
|
+
* `type` is `"NUMBER"`, `"ENUM"` or `"STRING"`:
|
|
1463
|
+
*
|
|
1464
|
+
* - `NUMBER` takes a scalar `value` and the comparison ops in `ops`.
|
|
1465
|
+
* - `ENUM` is an ordinal with a fixed set of readings; `options` carries them
|
|
1466
|
+
* and `ops` is `["EQ"]`.
|
|
1467
|
+
* - `STRING` (ETF universe only) takes `IN` / `NOT_IN` against `values`, which
|
|
1468
|
+
* is populated from the live universe rather than a static list, so pickers
|
|
1469
|
+
* stay current.
|
|
1470
|
+
*/
|
|
1471
|
+
interface ScreenerFieldDescriptor {
|
|
1472
|
+
/** The name a filter's `fieldName` carries, e.g. `"SENTI_SCORE_7D"`. */
|
|
1473
|
+
name: string;
|
|
1474
|
+
label: string;
|
|
1475
|
+
/** UI grouping, e.g. `"Sentiment"`, `"Analyst"`, `"Technical"`. */
|
|
1476
|
+
group: string;
|
|
1477
|
+
type: "NUMBER" | "ENUM" | "STRING" | (string & {});
|
|
1478
|
+
/** e.g. `"SCORE"`, `"PERCENT"`, `"USD"`. `null` on unitless fields. */
|
|
1479
|
+
unit: string | null;
|
|
1480
|
+
ops: string[];
|
|
1481
|
+
sortable: boolean;
|
|
1482
|
+
/** Suggested input step for a numeric control. */
|
|
1483
|
+
step: number | null;
|
|
1484
|
+
placeholder: string | null;
|
|
1485
|
+
description: string;
|
|
1486
|
+
/** `ENUM` fields only; `null` otherwise. */
|
|
1487
|
+
options: ScreenerFieldOption[] | null;
|
|
1488
|
+
/**
|
|
1489
|
+
* Thresholds worth offering as one-tap presets. On the SentiSense Score
|
|
1490
|
+
* fields these are the band edges (5, 13, 23).
|
|
1491
|
+
*/
|
|
1492
|
+
quickValues: string[] | null;
|
|
1493
|
+
/** `STRING` fields only, populated from the live universe; `null` otherwise. */
|
|
1494
|
+
values: string[] | null;
|
|
1495
|
+
}
|
|
1496
|
+
/**
|
|
1497
|
+
* Both field catalogs, returned by `client.screener.fields()`.
|
|
1498
|
+
*
|
|
1499
|
+
* `stock` backs {@link Screener.run}; `etf` backs {@link Screener.runEtfs}. The
|
|
1500
|
+
* two universes do not share a field vocabulary, so a name from one is not
|
|
1501
|
+
* valid in the other.
|
|
1502
|
+
*/
|
|
1503
|
+
interface ScreenerFieldCatalog {
|
|
1504
|
+
stock: ScreenerFieldDescriptor[];
|
|
1505
|
+
etf: ScreenerFieldDescriptor[];
|
|
1506
|
+
}
|
|
1507
|
+
/**
|
|
1508
|
+
* One filter leg. Filters are ANDed together; there is no OR, so run two
|
|
1509
|
+
* screens and merge.
|
|
1510
|
+
*
|
|
1511
|
+
* Identify the field with `fieldName`. The curated plans from
|
|
1512
|
+
* `client.screener.screens()` use the older `field` key instead, and both are
|
|
1513
|
+
* accepted on the way in, so read either when inspecting a plan you did not
|
|
1514
|
+
* build yourself.
|
|
1515
|
+
*
|
|
1516
|
+
* Numeric ops take `value`; `IN` / `NOT_IN` take `values` and are only
|
|
1517
|
+
* meaningful on the ETF universe's string fields.
|
|
1518
|
+
*/
|
|
1519
|
+
interface ScreenerFilter {
|
|
1520
|
+
fieldName?: string;
|
|
1521
|
+
/** Legacy field key, as emitted by the curated screens. */
|
|
1522
|
+
field?: string;
|
|
1523
|
+
op: "GTE" | "LTE" | "GT" | "LT" | "EQ" | "NEQ" | "IN" | "NOT_IN";
|
|
1524
|
+
value?: number;
|
|
1525
|
+
values?: string[];
|
|
1526
|
+
}
|
|
1527
|
+
/** Sort spec. Nulls sort last regardless of direction. */
|
|
1528
|
+
interface ScreenerSort {
|
|
1529
|
+
fieldName?: string;
|
|
1530
|
+
/** Legacy field key, as emitted by the curated screens. */
|
|
1531
|
+
field?: string;
|
|
1532
|
+
dir: "ASC" | "DESC";
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* A filter and sort plan. The same shape works for both universes; the endpoint
|
|
1536
|
+
* you call decides which one runs, so `universe` on a plan you pass in is a
|
|
1537
|
+
* no-op.
|
|
1538
|
+
*
|
|
1539
|
+
* `limit` is deliberately not on this object: it rides next to the plan on the
|
|
1540
|
+
* request, because a plan is a stored object and paging is a transport concern.
|
|
1541
|
+
*/
|
|
1542
|
+
interface ScreenerPlan {
|
|
1543
|
+
universe?: "STOCK" | "ETF";
|
|
1544
|
+
filters: ScreenerFilter[];
|
|
1545
|
+
sort?: ScreenerSort;
|
|
1546
|
+
/** Present on curated plans; ignored on execution. */
|
|
1547
|
+
intent?: string;
|
|
1548
|
+
/** Present on curated plans; ignored on execution. */
|
|
1549
|
+
summary?: string;
|
|
1550
|
+
}
|
|
1551
|
+
/**
|
|
1552
|
+
* A curated screen from `client.screener.screens()`.
|
|
1553
|
+
*
|
|
1554
|
+
* `plan` round-trips straight back into {@link Screener.run} (or
|
|
1555
|
+
* {@link Screener.runEtfs} when `plan.universe === "ETF"`), so a curated screen
|
|
1556
|
+
* is both a ready-made query and a worked example of the plan shape.
|
|
1557
|
+
*
|
|
1558
|
+
* `id` is stable and safe to persist. `name` and `summary` are display copy and
|
|
1559
|
+
* may be revised. Two conventions in the names are load-bearing: `+` means both
|
|
1560
|
+
* conditions hold, `vs` means the two sides disagree.
|
|
1561
|
+
*/
|
|
1562
|
+
interface FeaturedScreen {
|
|
1563
|
+
id: string;
|
|
1564
|
+
name: string;
|
|
1565
|
+
summary: string;
|
|
1566
|
+
plan: ScreenerPlan;
|
|
1567
|
+
}
|
|
1568
|
+
/** Envelope returned by `client.screener.screens()`. */
|
|
1569
|
+
interface ScreenerScreensResponse {
|
|
1570
|
+
screens: FeaturedScreen[];
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* One matching stock. Every row carries the full field set rather than only the
|
|
1574
|
+
* fields you filtered on, so you can sort or post-process client side without a
|
|
1575
|
+
* second call. A field with no data for that ticker is `null`, and a row
|
|
1576
|
+
* missing the field you filtered on never matches in either direction.
|
|
1577
|
+
*
|
|
1578
|
+
* `sentiSenseScore7D` / `sentiSenseScore1M` are the SentiSense Score, not
|
|
1579
|
+
* sentiment polarity: unbounded, banded at 5 / 13 / 23 either side of zero.
|
|
1580
|
+
*/
|
|
1581
|
+
interface ScreenerRow {
|
|
1582
|
+
ticker: string;
|
|
1583
|
+
/** 7-day average SentiSense Score. */
|
|
1584
|
+
sentiSenseScore7D: number | null;
|
|
1585
|
+
/** 1-month average SentiSense Score. */
|
|
1586
|
+
sentiSenseScore1M: number | null;
|
|
1587
|
+
/** 7-day Score minus the 1-month baseline; positive means strengthening. */
|
|
1588
|
+
scoreChange7D: number | null;
|
|
1589
|
+
/** Side of the neutral band the 7-day Score sits on: `1` / `0` / `-1`. */
|
|
1590
|
+
sentimentDirection: number | null;
|
|
1591
|
+
socialDominance: number | null;
|
|
1592
|
+
mentionShare: number | null;
|
|
1593
|
+
mentionVelocity: number | null;
|
|
1594
|
+
dominanceChange: number | null;
|
|
1595
|
+
/** USD. */
|
|
1596
|
+
marketCap: number | null;
|
|
1597
|
+
currentPrice: number | null;
|
|
1598
|
+
changePercent: number | null;
|
|
1599
|
+
change: number | null;
|
|
1600
|
+
volume: number | null;
|
|
1601
|
+
week52High: number | null;
|
|
1602
|
+
week52Low: number | null;
|
|
1603
|
+
/** Signed-negative percent below the 52-week high. */
|
|
1604
|
+
pctOff52wHigh: number | null;
|
|
1605
|
+
/** Signed-positive percent above the 52-week low. */
|
|
1606
|
+
pctOff52wLow: number | null;
|
|
1607
|
+
/** Share of rating analysts saying buy, 0..100. Higher is more bullish. */
|
|
1608
|
+
analystBuyRatioPct: number | null;
|
|
1609
|
+
analystTargetUpsidePct: number | null;
|
|
1610
|
+
analystCount: number | null;
|
|
1611
|
+
analystRatingMomentum30D: number | null;
|
|
1612
|
+
/** Vendor 1-to-5 scale. **INVERTED: 1.0 is strong buy.** */
|
|
1613
|
+
analystRatingMean: number | null;
|
|
1614
|
+
pctOff200dMa: number | null;
|
|
1615
|
+
pctOff50dMa: number | null;
|
|
1616
|
+
/** Ordinal: `1` golden cross, `-1` death cross, `0` neither. */
|
|
1617
|
+
maCrossState: number | null;
|
|
1618
|
+
return1M: number | null;
|
|
1619
|
+
return3M: number | null;
|
|
1620
|
+
return6M: number | null;
|
|
1621
|
+
return1Y: number | null;
|
|
1622
|
+
volatility30D: number | null;
|
|
1623
|
+
/** Daily Score values for the last 7 days, oldest first. */
|
|
1624
|
+
sentisenseScoreBars7D: number[] | null;
|
|
1625
|
+
/** Weekly-grouped Score values across the last 30 days, oldest first. */
|
|
1626
|
+
sentisenseScoreBars30D: number[] | null;
|
|
1627
|
+
/** Daily closes for the last 30 days, oldest first. */
|
|
1628
|
+
priceSparkline30D: number[] | null;
|
|
1629
|
+
/** Epoch seconds. */
|
|
1630
|
+
lastUpdated: number | null;
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* One matching fund.
|
|
1634
|
+
*
|
|
1635
|
+
* The two Score readings answer different questions.
|
|
1636
|
+
* `constituentsWeightedSentisense` is the holdings-weighted SentiSense Score
|
|
1637
|
+
* across what the fund actually owns, which is usually the one you want;
|
|
1638
|
+
* `directSentisense` is the Score from chatter about the fund ticker itself,
|
|
1639
|
+
* which on a broad index fund is mostly macro noise.
|
|
1640
|
+
*/
|
|
1641
|
+
interface EtfScreenerRow {
|
|
1642
|
+
ticker: string;
|
|
1643
|
+
name: string;
|
|
1644
|
+
issuer: string | null;
|
|
1645
|
+
assetClass: string | null;
|
|
1646
|
+
trackedIndex: string | null;
|
|
1647
|
+
/** AUM in USD. */
|
|
1648
|
+
marketCap: number | null;
|
|
1649
|
+
/** Percent points: `0.09` means 0.09%. */
|
|
1650
|
+
expenseRatio: number | null;
|
|
1651
|
+
currentPrice: number | null;
|
|
1652
|
+
changePercent: number | null;
|
|
1653
|
+
priceChange: number | null;
|
|
1654
|
+
volume: number | null;
|
|
1655
|
+
week52High: number | null;
|
|
1656
|
+
week52Low: number | null;
|
|
1657
|
+
pctOff52wHigh: number | null;
|
|
1658
|
+
pctOff52wLow: number | null;
|
|
1659
|
+
weightedAnalystUpside: number | null;
|
|
1660
|
+
weightedConsensusLabel: string | null;
|
|
1661
|
+
weightedInsiderNet30d: number | null;
|
|
1662
|
+
weightedInsiderNet90d: number | null;
|
|
1663
|
+
/** Holdings-weighted SentiSense Score across the fund's constituents. */
|
|
1664
|
+
constituentsWeightedSentisense: number | null;
|
|
1665
|
+
/** SentiSense Score from chatter about the fund ticker itself. */
|
|
1666
|
+
directSentisense: number | null;
|
|
1667
|
+
/** How much of the fund's weight had constituent data behind the weighted Score. */
|
|
1668
|
+
weightCoveredPct: number | null;
|
|
1669
|
+
holdingsCount: number | null;
|
|
1670
|
+
totalKnownHoldings: number | null;
|
|
1671
|
+
/** `true` when the holdings set behind the aggregates is incomplete. */
|
|
1672
|
+
partial: boolean | null;
|
|
1673
|
+
/** Epoch seconds. */
|
|
1674
|
+
lastUpdated: number | null;
|
|
1675
|
+
}
|
|
1676
|
+
/** Request body for both execute endpoints. */
|
|
1677
|
+
interface ScreenerExecuteOptions {
|
|
1678
|
+
plan: ScreenerPlan;
|
|
1679
|
+
/** Optional ticker subset. Omit to screen the whole tracked universe. */
|
|
1680
|
+
tickers?: string[];
|
|
1681
|
+
/** Rows to return. Defaults to 100 server-side, caps at 500. */
|
|
1682
|
+
limit?: number;
|
|
1683
|
+
}
|
|
1684
|
+
/**
|
|
1685
|
+
* Stock screen results.
|
|
1686
|
+
*
|
|
1687
|
+
* `matched` is how many rows the plan matched *before* `limit` was applied, so
|
|
1688
|
+
* truncation is visible: when `matched` exceeds `limit` you are looking at the
|
|
1689
|
+
* top slice under the plan's sort, not the whole answer.
|
|
1690
|
+
*/
|
|
1691
|
+
interface ScreenerExecuteResponse {
|
|
1692
|
+
results: ScreenerRow[];
|
|
1693
|
+
matched: number;
|
|
1694
|
+
limit: number;
|
|
1695
|
+
}
|
|
1696
|
+
/** ETF screen results. Same envelope; `matched` is the pre-limit count. */
|
|
1697
|
+
interface EtfScreenerExecuteResponse {
|
|
1698
|
+
results: EtfScreenerRow[];
|
|
1699
|
+
matched: number;
|
|
1700
|
+
limit: number;
|
|
1701
|
+
}
|
|
1408
1702
|
|
|
1409
1703
|
interface AnalystConsensus {
|
|
1410
1704
|
ticker: string;
|
|
@@ -1981,6 +2275,113 @@ declare class MarketSummaryResource {
|
|
|
1981
2275
|
get(): Promise<MarketSummary>;
|
|
1982
2276
|
}
|
|
1983
2277
|
|
|
2278
|
+
/**
|
|
2279
|
+
* Screener: filter the tracked universe on the SentiSense Score, attention,
|
|
2280
|
+
* analyst consensus, technicals and price in a single query. It is the one
|
|
2281
|
+
* surface where our own signals sit in the same `WHERE` clause as the market
|
|
2282
|
+
* data, which is the point: screening on analyst ratings alone is something a
|
|
2283
|
+
* dozen free tools do, screening on analyst ratings *where the Score disagrees*
|
|
2284
|
+
* is not.
|
|
2285
|
+
*
|
|
2286
|
+
* Every screen is a {@link ScreenerPlan}. Take one from {@link screens} or
|
|
2287
|
+
* build your own, then hand it to {@link run} or {@link runEtfs}.
|
|
2288
|
+
*
|
|
2289
|
+
* Three field semantics are worth knowing before you write a filter, because
|
|
2290
|
+
* guessing them wrong produces a screen that looks fine and means nothing:
|
|
2291
|
+
*
|
|
2292
|
+
* - **`ANALYST_RATING_MEAN` is inverted.** It is the vendor's 1-to-5 scale
|
|
2293
|
+
* where `1.0` is strong buy, so bullish is `LTE 2.5`, not `GTE`. Prefer
|
|
2294
|
+
* `ANALYST_BUY_RATIO_PCT`, which runs the intuitive direction.
|
|
2295
|
+
* - **`MA_CROSS_STATE` is ordinal**, not a percentage: `1` golden cross (50-day
|
|
2296
|
+
* above 200-day), `-1` death cross, `0` neither. Use `EQ`.
|
|
2297
|
+
* - **`SENTIMENT_DIRECTION` is the sign of the 7-day SentiSense Score**
|
|
2298
|
+
* (`1` / `0` / `-1`) with a neutral band of plus-or-minus 5. Despite the name
|
|
2299
|
+
* it is not sentiment polarity, and `0` matches only an exact zero, so it
|
|
2300
|
+
* returns almost nothing.
|
|
2301
|
+
*
|
|
2302
|
+
* The Score fields (`SENTI_SCORE_7D`, `SENTI_SCORE_1M`, `SCORE_CHANGE_7D`) are
|
|
2303
|
+
* the SentiSense Score, not polarity: unbounded, banded at 5 / 13 / 23 either
|
|
2304
|
+
* side of zero. Filter on those band edges, not on values like `0.5`, which
|
|
2305
|
+
* behave as "any positive score".
|
|
2306
|
+
*
|
|
2307
|
+
* Nulls never match, in either direction: `RETURN_1Y >= 0` and `RETURN_1Y < 0`
|
|
2308
|
+
* do not partition the universe, because a stock listed four months ago is in
|
|
2309
|
+
* neither result. If a screen returns fewer rows than you expect, check
|
|
2310
|
+
* coverage before you check your thresholds.
|
|
2311
|
+
*
|
|
2312
|
+
* Screens read a snapshot that refreshes every 20 minutes, so this is not a
|
|
2313
|
+
* quote feed. Use `client.stocks.getQuote()` for live prices.
|
|
2314
|
+
*/
|
|
2315
|
+
declare class Screener {
|
|
2316
|
+
private client;
|
|
2317
|
+
constructor(client: APIClient);
|
|
2318
|
+
/**
|
|
2319
|
+
* Every filterable field, with its unit, operators and description, for both
|
|
2320
|
+
* universes.
|
|
2321
|
+
*
|
|
2322
|
+
* Build a filter UI from this rather than hardcoding the list and you inherit
|
|
2323
|
+
* new fields as they ship. The ETF `STRING` fields (`ISSUER`, `ASSET_CLASS`,
|
|
2324
|
+
* `TRACKED_INDEX`) come back with their `values` populated from the live
|
|
2325
|
+
* universe, so pickers stay current without a redeploy.
|
|
2326
|
+
*/
|
|
2327
|
+
fields(): Promise<ScreenerFieldCatalog>;
|
|
2328
|
+
/**
|
|
2329
|
+
* The curated screens shipped in the product, each with a runnable plan.
|
|
2330
|
+
*
|
|
2331
|
+
* Each `plan` round-trips straight into {@link run} (or {@link runEtfs} when
|
|
2332
|
+
* `plan.universe === "ETF"`) with nothing to rebuild.
|
|
2333
|
+
*
|
|
2334
|
+
* Their filters identify the field with `field` rather than `fieldName`.
|
|
2335
|
+
* Both keys are accepted on the way in, so read either when inspecting a plan
|
|
2336
|
+
* you did not build yourself.
|
|
2337
|
+
*/
|
|
2338
|
+
screens(): Promise<ScreenerScreensResponse>;
|
|
2339
|
+
/**
|
|
2340
|
+
* Run a screen against the stock universe.
|
|
2341
|
+
*
|
|
2342
|
+
* `tickers` is optional: omit it to screen the whole tracked universe, pass a
|
|
2343
|
+
* list to screen a watchlist. `limit` sits next to the plan rather than
|
|
2344
|
+
* inside it, because a plan is a stored object and paging is a transport
|
|
2345
|
+
* concern; it defaults to 100 and caps at 500.
|
|
2346
|
+
*
|
|
2347
|
+
* Read `matched` before you read `results`: it is the count before `limit`
|
|
2348
|
+
* was applied, so a `matched` above your `limit` means you are holding the
|
|
2349
|
+
* top slice under the plan's sort, not the whole answer.
|
|
2350
|
+
*
|
|
2351
|
+
* @example
|
|
2352
|
+
* ```ts
|
|
2353
|
+
* const res = await client.screener.run({
|
|
2354
|
+
* plan: {
|
|
2355
|
+
* filters: [
|
|
2356
|
+
* { fieldName: "SENTI_SCORE_7D", op: "GTE", value: 13 },
|
|
2357
|
+
* { fieldName: "ANALYST_BUY_RATIO_PCT", op: "LTE", value: 30 },
|
|
2358
|
+
* { fieldName: "ANALYST_COUNT", op: "GTE", value: 5 },
|
|
2359
|
+
* ],
|
|
2360
|
+
* sort: { fieldName: "SENTI_SCORE_7D", dir: "DESC" },
|
|
2361
|
+
* },
|
|
2362
|
+
* limit: 25,
|
|
2363
|
+
* });
|
|
2364
|
+
* ```
|
|
2365
|
+
*/
|
|
2366
|
+
run(options: ScreenerExecuteOptions): Promise<ScreenerExecuteResponse>;
|
|
2367
|
+
/**
|
|
2368
|
+
* Run a screen against the ETF universe.
|
|
2369
|
+
*
|
|
2370
|
+
* Same request shape as {@link run}, against a different field vocabulary:
|
|
2371
|
+
* take the ETF names from `fields().etf`. `IN` / `NOT_IN` take a `values`
|
|
2372
|
+
* array instead of `value` and are the operators for the string fields
|
|
2373
|
+
* (`ISSUER`, `ASSET_CLASS`, `TRACKED_INDEX`).
|
|
2374
|
+
*
|
|
2375
|
+
* `CONSTITUENTS_WEIGHTED_SENTISENSE` is the holdings-weighted SentiSense
|
|
2376
|
+
* Score across what the fund owns and is usually the one you want;
|
|
2377
|
+
* `DIRECT_SENTISENSE` is the Score from chatter about the fund ticker itself,
|
|
2378
|
+
* which on a broad index fund is mostly macro noise. `WEIGHT_COVERED_PCT`
|
|
2379
|
+
* tells you how much of the fund's weight had constituent data behind the
|
|
2380
|
+
* weighted number.
|
|
2381
|
+
*/
|
|
2382
|
+
runEtfs(options: ScreenerExecuteOptions): Promise<EtfScreenerExecuteResponse>;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
1984
2385
|
declare class Stocks {
|
|
1985
2386
|
private client;
|
|
1986
2387
|
constructor(client: APIClient);
|
|
@@ -2205,6 +2606,7 @@ declare class SentiSense implements APIClient {
|
|
|
2205
2606
|
readonly trackers: Trackers;
|
|
2206
2607
|
readonly calendar: Calendar;
|
|
2207
2608
|
readonly earnings: Earnings;
|
|
2609
|
+
readonly screener: Screener;
|
|
2208
2610
|
constructor(options?: SentiSenseOptions);
|
|
2209
2611
|
/** @internal */
|
|
2210
2612
|
get<T = unknown>(path: string, params?: object): Promise<T>;
|
|
@@ -2250,6 +2652,6 @@ declare class APIError extends SentiSenseError {
|
|
|
2250
2652
|
constructor(message: string, status: number, code?: string);
|
|
2251
2653
|
}
|
|
2252
2654
|
|
|
2253
|
-
declare const VERSION = "0.
|
|
2655
|
+
declare const VERSION = "0.38.0";
|
|
2254
2656
|
|
|
2255
|
-
export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarningsCalendarResponse, type EarningsEvent, type EarningsKpiHighlight, type EarningsQuarter, type EarningsSource, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfSentimentAggregate, type EtfSentimentReading, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticianActivityOptions, type GetPoliticiansOptions, type GetRecentEarningsOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, type InstitutionalFlows, type InstitutionalFlowsResponse, type KBEntity, type KpiCoverageEntry, type KpiCoverageResponse, type KpiDataPoint, type KpiSeries, type KpiTypeEntry, type ListInstitutionsOptions, type LockedInsight, type MarketMood, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type PoliticianDetail, type PoliticianSummary, type PreviewResponse, type Quarter, RateLimitError, type RecentEarningsEntry, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortVolume, type SimilarStock, type StockDetail, type StockEntity, type StockImage, type StockPrice, type StockProfile, type StockQuote, type Story, type StoryCluster, type TickerHolders, type TrackerEvent, type TrackerGeoEntry, type TrackerHeadlineMetric, type TrackerListResponse, type TrackerListing, type TrackerMetricValue, type TrackerSignal, type TrackerSnapshot, type TrackerSnapshotResponse, type TrackerSourceRef, type TrackerTableRow, type TrackerTimeSeriesPoint, type TtmFundamentals, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
|
|
2657
|
+
export { type AISummary, APIError, type AnalystAction, type AnalystConsensus, type AnalystEarningsSurprise, type AnalystEstimate, type AnalystEstimatesResponse, type AssetMetadata, AuthenticationError, type CalendarMeta, type ChartData, type ChartDataPoint, type ClusterBuy, type CompanyKpisData, type CongressTrade, DeepHistoryUnavailableError, type Document, type DocumentSearchResponse, type DocumentSource, type EarningsCalendarResponse, type EarningsEvent, type EarningsKpiHighlight, type EarningsQuarter, type EarningsSource, type EtfAggregateCoverage, type EtfAnalystAggregate, type EtfAnalystContributor, type EtfHolding, type EtfHoldings, type EtfInfo, type EtfInsiderAggregate, type EtfInsiderContributor, type EtfScreenerExecuteResponse, type EtfScreenerRow, type EtfSentimentAggregate, type EtfSentimentReading, type FeaturedScreen, type FloatInfo, type Fundamentals, type FundamentalsPeriod, type FundamentalsPeriodsResponse, type GetAnalystActionsOptions, type GetAnalystMarketActivityOptions, type GetEarningsCalendarOptions, type GetEarningsSummariesOptions, type GetEtfInsiderAggregateOptions, type GetHoldersOptions, type GetInsiderOptions, type GetInsightsOptions, type GetLatestInsightsOptions, type GetPoliticianActivityOptions, type GetPoliticiansOptions, type GetRecentEarningsOptions, type GetStockInsightsRangeOptions, type GetUserInsightsOptions, type Holder, type HolderNotableChanges, type IndexConstituent, type IndexHistoryPoint, type IndexHistoryResponse, type IndexListResponse, type IndexListing, type IndexSnapshot, type InsiderActivityResponse, type InsiderActivitySummary, type InsiderTrade, type Insight, type InsightPreviewResponse, type InstitutionList, type InstitutionListResponse, type InstitutionSummary, type InstitutionalFlow, type InstitutionalFlows, type InstitutionalFlowsResponse, type KBEntity, type KpiCoverageEntry, type KpiCoverageResponse, type KpiDataPoint, type KpiSeries, type KpiTypeEntry, type ListInstitutionsOptions, type LockedInsight, type MarketMood, type MarketStatus, type MarketSummary, type MetricDistribution, type MetricDistributionOptions, type MetricType, type MetricsBreakdown, type MetricsOptions, NotFoundError, type PoliticianDetail, type PoliticianSummary, type PreviewResponse, type Quarter, RateLimitError, type RecentEarningsEntry, type ScreenerExecuteOptions, type ScreenerExecuteResponse, type ScreenerFieldCatalog, type ScreenerFieldDescriptor, type ScreenerFieldOption, type ScreenerFilter, type ScreenerPlan, type ScreenerRow, type ScreenerScreensResponse, type ScreenerSort, SentiSense, SentiSenseError, type SentiSenseOptions, type SentimentEntry, type ServingMetric, type ShortInterest, type ShortVolume, type SimilarStock, type StockDetail, type StockEntity, type StockImage, type StockPrice, type StockProfile, type StockQuote, type Story, type StoryCluster, type TickerHolders, type TrackerEvent, type TrackerGeoEntry, type TrackerHeadlineMetric, type TrackerListResponse, type TrackerListing, type TrackerMetricValue, type TrackerSignal, type TrackerSnapshot, type TrackerSnapshotResponse, type TrackerSourceRef, type TrackerTableRow, type TrackerTimeSeriesPoint, type TtmFundamentals, VERSION, type WeightedConsensus, type WeightedNetFlow, SentiSense as default };
|