finance-sentiment 2.2.0 → 2.3.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 +75 -73
- package/dist/index.cjs +45 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -22
- package/dist/index.d.ts +24 -22
- package/dist/index.js +45 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,8 +35,8 @@ import { AdanosClient } from "finance-sentiment";
|
|
|
35
35
|
|
|
36
36
|
const client = new AdanosClient({ apiKey: "adanos_api_key_here" });
|
|
37
37
|
|
|
38
|
-
const trending = await client.reddit.trending({
|
|
39
|
-
const tsla = await client.reddit.stock("TSLA"
|
|
38
|
+
const trending = await client.reddit.trending({ limit: 10 });
|
|
39
|
+
const tsla = await client.reddit.stock("TSLA");
|
|
40
40
|
const explanation = await client.reddit.explain("TSLA");
|
|
41
41
|
const health = await client.health();
|
|
42
42
|
|
|
@@ -76,14 +76,14 @@ import { AdanosClient } from "finance-sentiment";
|
|
|
76
76
|
|
|
77
77
|
const client = new AdanosClient({ apiKey: "adanos_api_key_here" });
|
|
78
78
|
|
|
79
|
-
const trending = await client.reddit.trending({
|
|
80
|
-
const sectors = await client.reddit.trendingSectors({
|
|
81
|
-
const countries = await client.reddit.trendingCountries({
|
|
82
|
-
const tsla = await client.reddit.stock("TSLA"
|
|
79
|
+
const trending = await client.reddit.trending({ limit: 10 });
|
|
80
|
+
const sectors = await client.reddit.trendingSectors({ limit: 10 });
|
|
81
|
+
const countries = await client.reddit.trendingCountries({ limit: 10 });
|
|
82
|
+
const tsla = await client.reddit.stock("TSLA");
|
|
83
83
|
const explanation = await client.reddit.explain("TSLA");
|
|
84
|
-
const results = await client.reddit.search("Tesla", {
|
|
85
|
-
const comparison = await client.reddit.compare(["TSLA", "AAPL", "MSFT"]
|
|
86
|
-
const market = await client.reddit.marketSentiment(
|
|
84
|
+
const results = await client.reddit.search("Tesla", { limit: 10 });
|
|
85
|
+
const comparison = await client.reddit.compare(["TSLA", "AAPL", "MSFT"]);
|
|
86
|
+
const market = await client.reddit.marketSentiment();
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
### News
|
|
@@ -93,14 +93,14 @@ import { AdanosClient } from "finance-sentiment";
|
|
|
93
93
|
|
|
94
94
|
const client = new AdanosClient({ apiKey: "adanos_api_key_here" });
|
|
95
95
|
|
|
96
|
-
const trending = await client.news.trending({
|
|
97
|
-
const sectors = await client.news.trendingSectors({
|
|
98
|
-
const countries = await client.news.trendingCountries({
|
|
99
|
-
const nvda = await client.news.stock("NVDA"
|
|
96
|
+
const trending = await client.news.trending({ source: "reuters" });
|
|
97
|
+
const sectors = await client.news.trendingSectors({ source: "reuters" });
|
|
98
|
+
const countries = await client.news.trendingCountries({ source: "reuters" });
|
|
99
|
+
const nvda = await client.news.stock("NVDA");
|
|
100
100
|
const explanation = await client.news.explain("NVDA");
|
|
101
|
-
const results = await client.news.search("Nvidia", {
|
|
102
|
-
const comparison = await client.news.compare(["NVDA", "AAPL"]
|
|
103
|
-
const market = await client.news.marketSentiment(
|
|
101
|
+
const results = await client.news.search("Nvidia", { limit: 10 });
|
|
102
|
+
const comparison = await client.news.compare(["NVDA", "AAPL"]);
|
|
103
|
+
const market = await client.news.marketSentiment();
|
|
104
104
|
const stats = await client.news.stats();
|
|
105
105
|
const health = await client.news.health();
|
|
106
106
|
```
|
|
@@ -112,14 +112,14 @@ import { AdanosClient } from "finance-sentiment";
|
|
|
112
112
|
|
|
113
113
|
const client = new AdanosClient({ apiKey: "adanos_api_key_here" });
|
|
114
114
|
|
|
115
|
-
const trending = await client.x.trending({
|
|
116
|
-
const sectors = await client.x.trendingSectors({
|
|
117
|
-
const countries = await client.x.trendingCountries({
|
|
115
|
+
const trending = await client.x.trending({ limit: 20 });
|
|
116
|
+
const sectors = await client.x.trendingSectors({ limit: 10 });
|
|
117
|
+
const countries = await client.x.trendingCountries({ limit: 10 });
|
|
118
118
|
const nvda = await client.x.stock("NVDA");
|
|
119
119
|
const explanation = await client.x.explain("NVDA");
|
|
120
|
-
const results = await client.x.search("Nvidia", {
|
|
121
|
-
const comparison = await client.x.compare(["NVDA", "AMD"]
|
|
122
|
-
const market = await client.x.marketSentiment(
|
|
120
|
+
const results = await client.x.search("Nvidia", { limit: 10 });
|
|
121
|
+
const comparison = await client.x.compare(["NVDA", "AMD"]);
|
|
122
|
+
const market = await client.x.marketSentiment();
|
|
123
123
|
const stats = await client.x.stats();
|
|
124
124
|
const health = await client.x.health();
|
|
125
125
|
```
|
|
@@ -131,13 +131,13 @@ import { AdanosClient } from "finance-sentiment";
|
|
|
131
131
|
|
|
132
132
|
const client = new AdanosClient({ apiKey: "adanos_api_key_here" });
|
|
133
133
|
|
|
134
|
-
const trending = await client.polymarket.trending({
|
|
135
|
-
const sectors = await client.polymarket.trendingSectors({
|
|
136
|
-
const countries = await client.polymarket.trendingCountries({
|
|
134
|
+
const trending = await client.polymarket.trending({ limit: 20, type: "stock" });
|
|
135
|
+
const sectors = await client.polymarket.trendingSectors({ limit: 10 });
|
|
136
|
+
const countries = await client.polymarket.trendingCountries({ limit: 10 });
|
|
137
137
|
const aapl = await client.polymarket.stock("AAPL");
|
|
138
|
-
const results = await client.polymarket.search("Apple", {
|
|
139
|
-
const comparison = await client.polymarket.compare(["AAPL", "TSLA"]
|
|
140
|
-
const market = await client.polymarket.marketSentiment(
|
|
138
|
+
const results = await client.polymarket.search("Apple", { limit: 10 });
|
|
139
|
+
const comparison = await client.polymarket.compare(["AAPL", "TSLA"]);
|
|
140
|
+
const market = await client.polymarket.marketSentiment();
|
|
141
141
|
const stats = await client.polymarket.stats();
|
|
142
142
|
const health = await client.polymarket.health();
|
|
143
143
|
```
|
|
@@ -149,19 +149,19 @@ import { AdanosClient } from "finance-sentiment";
|
|
|
149
149
|
|
|
150
150
|
const client = new AdanosClient({ apiKey: "adanos_api_key_here" });
|
|
151
151
|
|
|
152
|
-
const trending = await client.crypto.trending({
|
|
153
|
-
const btc = await client.crypto.token("BTC"
|
|
154
|
-
const mentions = await client.crypto.mentions("BTC", {
|
|
155
|
-
const results = await client.crypto.search("bitcoin", {
|
|
156
|
-
const comparison = await client.crypto.compare(["BTC", "ETH"]
|
|
157
|
-
const market = await client.crypto.marketSentiment(
|
|
152
|
+
const trending = await client.crypto.trending({ limit: 20 });
|
|
153
|
+
const btc = await client.crypto.token("BTC");
|
|
154
|
+
const mentions = await client.crypto.mentions("BTC", { from: "2026-05-01", to: "2026-05-07", limit: 10, offset: 10 });
|
|
155
|
+
const results = await client.crypto.search("bitcoin", { limit: 10 });
|
|
156
|
+
const comparison = await client.crypto.compare(["BTC", "ETH"]);
|
|
157
|
+
const market = await client.crypto.marketSentiment();
|
|
158
158
|
const stats = await client.crypto.stats();
|
|
159
159
|
const health = await client.crypto.health();
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
Polymarket semantics:
|
|
163
163
|
- `buzz_score` is activity-first and optimized for current market attention
|
|
164
|
-
- `total_liquidity` is a windowed signal over the selected
|
|
164
|
+
- `total_liquidity` is a windowed signal over the selected period
|
|
165
165
|
- `current_market_count` is the live-only active-market breadth; `market_count` remains the selected-window breadth
|
|
166
166
|
- `top_mentions` on `stock()` are relevance-sorted by trading activity first
|
|
167
167
|
|
|
@@ -177,31 +177,33 @@ Polymarket semantics:
|
|
|
177
177
|
|
|
178
178
|
| Method | Description |
|
|
179
179
|
|--------|-------------|
|
|
180
|
-
| `trending({ days, limit, offset, type })` | Trending stocks by buzz score |
|
|
181
|
-
| `trendingSectors({ days, limit, offset })` | Trending sectors |
|
|
182
|
-
| `trendingCountries({ days, limit, offset })` | Trending countries |
|
|
183
|
-
| `stock(ticker, { days })` | Detailed sentiment for a ticker |
|
|
184
|
-
| `mentions(ticker, { days, limit, offset, includeInherited })` | Raw Reddit mention rows |
|
|
180
|
+
| `trending({ from, to, days, limit, offset, type })` | Trending stocks by buzz score |
|
|
181
|
+
| `trendingSectors({ from, to, days, limit, offset })` | Trending sectors |
|
|
182
|
+
| `trendingCountries({ from, to, days, limit, offset })` | Trending countries |
|
|
183
|
+
| `stock(ticker, { from, to, days })` | Detailed sentiment for a ticker |
|
|
184
|
+
| `mentions(ticker, { from, to, days, limit, offset, includeInherited })` | Raw Reddit mention rows |
|
|
185
185
|
| `explain(ticker)` | AI-generated trend explanation |
|
|
186
|
-
| `search(query, { days, limit })` | Search stocks by name or ticker with recent-period summaries |
|
|
187
|
-
| `compare(tickers, { days })` | Compare up to 10 stocks |
|
|
188
|
-
| `marketSentiment({ days })` | Service-level Reddit market sentiment snapshot |
|
|
186
|
+
| `search(query, { from, to, days, limit })` | Search stocks by name or ticker with recent-period summaries |
|
|
187
|
+
| `compare(tickers, { from, to, days })` | Compare up to 10 stocks |
|
|
188
|
+
| `marketSentiment({ from, to, days })` | Service-level Reddit market sentiment snapshot |
|
|
189
189
|
| `stats()` | Dataset statistics |
|
|
190
190
|
| `health()` | Public service health |
|
|
191
191
|
|
|
192
|
+
Period options: use `from` and `to` as `YYYY-MM-DD` inclusive UTC dates for reproducible windows. `days` remains available as a legacy shorthand for v1 compatibility. The API returns `422` if `from`, `to`, and `days` are all sent together. Responses keep `period_days`; retain requested dates client-side if you need them later.
|
|
193
|
+
|
|
192
194
|
### `client.news.*`
|
|
193
195
|
|
|
194
196
|
| Method | Description |
|
|
195
197
|
|--------|-------------|
|
|
196
|
-
| `trending({ days, limit, offset, type, source })` | Trending stocks from news |
|
|
197
|
-
| `trendingSectors({ days, limit, offset, source })` | Trending sectors from news |
|
|
198
|
-
| `trendingCountries({ days, limit, offset, source })` | Trending countries from news |
|
|
199
|
-
| `stock(ticker, { days })` | Detailed news sentiment for a ticker |
|
|
200
|
-
| `mentions(ticker, { days, limit, offset })` | Raw news mention rows |
|
|
198
|
+
| `trending({ from, to, days, limit, offset, type, source })` | Trending stocks from news |
|
|
199
|
+
| `trendingSectors({ from, to, days, limit, offset, source })` | Trending sectors from news |
|
|
200
|
+
| `trendingCountries({ from, to, days, limit, offset, source })` | Trending countries from news |
|
|
201
|
+
| `stock(ticker, { from, to, days })` | Detailed news sentiment for a ticker |
|
|
202
|
+
| `mentions(ticker, { from, to, days, limit, offset })` | Raw news mention rows |
|
|
201
203
|
| `explain(ticker)` | AI-generated explanation from news context |
|
|
202
|
-
| `search(query, { days, limit })` | Search stocks in the news dataset with recent-period summaries |
|
|
203
|
-
| `compare(tickers, { days })` | Compare up to 10 stocks in news |
|
|
204
|
-
| `marketSentiment({ days })` | Service-level News market sentiment snapshot |
|
|
204
|
+
| `search(query, { from, to, days, limit })` | Search stocks in the news dataset with recent-period summaries |
|
|
205
|
+
| `compare(tickers, { from, to, days })` | Compare up to 10 stocks in news |
|
|
206
|
+
| `marketSentiment({ from, to, days })` | Service-level News market sentiment snapshot |
|
|
205
207
|
| `stats()` | News dataset statistics |
|
|
206
208
|
| `health()` | Public news service health |
|
|
207
209
|
|
|
@@ -209,15 +211,15 @@ Polymarket semantics:
|
|
|
209
211
|
|
|
210
212
|
| Method | Description |
|
|
211
213
|
|--------|-------------|
|
|
212
|
-
| `trending({ days, limit, offset, type })` | Trending stocks on X/Twitter |
|
|
213
|
-
| `trendingSectors({ days, limit, offset })` | Trending sectors |
|
|
214
|
-
| `trendingCountries({ days, limit, offset })` | Trending countries |
|
|
215
|
-
| `stock(ticker, { days })` | Detailed X/Twitter sentiment |
|
|
216
|
-
| `mentions(ticker, { days, limit, offset })` | Raw X/Twitter mention rows |
|
|
214
|
+
| `trending({ from, to, days, limit, offset, type })` | Trending stocks on X/Twitter |
|
|
215
|
+
| `trendingSectors({ from, to, days, limit, offset })` | Trending sectors |
|
|
216
|
+
| `trendingCountries({ from, to, days, limit, offset })` | Trending countries |
|
|
217
|
+
| `stock(ticker, { from, to, days })` | Detailed X/Twitter sentiment |
|
|
218
|
+
| `mentions(ticker, { from, to, days, limit, offset })` | Raw X/Twitter mention rows |
|
|
217
219
|
| `explain(ticker)` | AI-generated explanation from X/Twitter context |
|
|
218
|
-
| `search(query, { days, limit })` | Search stocks with recent-period summaries |
|
|
219
|
-
| `compare(tickers, { days })` | Compare stocks |
|
|
220
|
-
| `marketSentiment({ days })` | Service-level X/Twitter market sentiment snapshot |
|
|
220
|
+
| `search(query, { from, to, days, limit })` | Search stocks with recent-period summaries |
|
|
221
|
+
| `compare(tickers, { from, to, days })` | Compare stocks |
|
|
222
|
+
| `marketSentiment({ from, to, days })` | Service-level X/Twitter market sentiment snapshot |
|
|
221
223
|
| `stats()` | Dataset statistics |
|
|
222
224
|
| `health()` | Public service health |
|
|
223
225
|
|
|
@@ -225,14 +227,14 @@ Polymarket semantics:
|
|
|
225
227
|
|
|
226
228
|
| Method | Description |
|
|
227
229
|
|--------|-------------|
|
|
228
|
-
| `trending({ days, limit, offset, type })` | Trending stocks on Polymarket with activity-first buzz and windowed liquidity |
|
|
229
|
-
| `trendingSectors({ days, limit, offset })` | Trending sectors |
|
|
230
|
-
| `trendingCountries({ days, limit, offset })` | Trending countries |
|
|
231
|
-
| `stock(ticker, { days })` | Detailed Polymarket activity, sentiment, and relevance-sorted market questions |
|
|
232
|
-
| `mentions(ticker, { days, limit, offset })` | Raw Polymarket market snapshots |
|
|
233
|
-
| `search(query, { days, limit })` | Search stocks with recent-period summaries |
|
|
234
|
-
| `compare(tickers, { days })` | Compare stocks with windowed Polymarket activity signals |
|
|
235
|
-
| `marketSentiment({ days })` | Service-level Polymarket market sentiment snapshot |
|
|
230
|
+
| `trending({ from, to, days, limit, offset, type })` | Trending stocks on Polymarket with activity-first buzz and windowed liquidity |
|
|
231
|
+
| `trendingSectors({ from, to, days, limit, offset })` | Trending sectors |
|
|
232
|
+
| `trendingCountries({ from, to, days, limit, offset })` | Trending countries |
|
|
233
|
+
| `stock(ticker, { from, to, days })` | Detailed Polymarket activity, sentiment, and relevance-sorted market questions |
|
|
234
|
+
| `mentions(ticker, { from, to, days, limit, offset })` | Raw Polymarket market snapshots |
|
|
235
|
+
| `search(query, { from, to, days, limit })` | Search stocks with recent-period summaries |
|
|
236
|
+
| `compare(tickers, { from, to, days })` | Compare stocks with windowed Polymarket activity signals |
|
|
237
|
+
| `marketSentiment({ from, to, days })` | Service-level Polymarket market sentiment snapshot |
|
|
236
238
|
| `stats()` | Dataset statistics |
|
|
237
239
|
| `health()` | Public service health |
|
|
238
240
|
|
|
@@ -240,12 +242,12 @@ Polymarket semantics:
|
|
|
240
242
|
|
|
241
243
|
| Method | Description |
|
|
242
244
|
|--------|-------------|
|
|
243
|
-
| `trending({ days, limit, offset })` | Trending Reddit crypto tokens |
|
|
244
|
-
| `token(symbol, { days })` | Detailed token sentiment and buzz |
|
|
245
|
-
| `mentions(symbol, { days, limit, offset, includeInherited })` | Raw Reddit crypto mention rows |
|
|
246
|
-
| `search(query, { days, limit })` | Search tokens by symbol or name with recent-period summaries and market cap metadata |
|
|
247
|
-
| `compare(symbols, { days })` | Compare multiple tokens |
|
|
248
|
-
| `marketSentiment({ days })` | Service-level Reddit Crypto market sentiment snapshot |
|
|
245
|
+
| `trending({ from, to, days, limit, offset })` | Trending Reddit crypto tokens |
|
|
246
|
+
| `token(symbol, { from, to, days })` | Detailed token sentiment and buzz |
|
|
247
|
+
| `mentions(symbol, { from, to, days, limit, offset, includeInherited })` | Raw Reddit crypto mention rows |
|
|
248
|
+
| `search(query, { from, to, days, limit })` | Search tokens by symbol or name with recent-period summaries and market cap metadata |
|
|
249
|
+
| `compare(symbols, { from, to, days })` | Compare multiple tokens |
|
|
250
|
+
| `marketSentiment({ from, to, days })` | Service-level Reddit Crypto market sentiment snapshot |
|
|
249
251
|
| `stats()` | Dataset statistics |
|
|
250
252
|
| `health()` | Public service health |
|
|
251
253
|
|
package/dist/index.cjs
CHANGED
|
@@ -47,6 +47,13 @@ var ApiError = class extends StockSentimentError {
|
|
|
47
47
|
this.detail = detail;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
+
function periodParams(options) {
|
|
51
|
+
return {
|
|
52
|
+
from: options.from,
|
|
53
|
+
to: options.to,
|
|
54
|
+
days: options.days
|
|
55
|
+
};
|
|
56
|
+
}
|
|
50
57
|
var HttpClient = class {
|
|
51
58
|
baseUrl;
|
|
52
59
|
apiKey;
|
|
@@ -105,7 +112,7 @@ var RedditNamespace = class extends PlatformNamespace {
|
|
|
105
112
|
/** Get trending stocks on Reddit. */
|
|
106
113
|
async trending(options = {}) {
|
|
107
114
|
return this.request("/trending", {
|
|
108
|
-
|
|
115
|
+
...periodParams(options),
|
|
109
116
|
limit: options.limit,
|
|
110
117
|
offset: options.offset,
|
|
111
118
|
type: options.type
|
|
@@ -114,7 +121,7 @@ var RedditNamespace = class extends PlatformNamespace {
|
|
|
114
121
|
/** Get trending sectors on Reddit. */
|
|
115
122
|
async trendingSectors(options = {}) {
|
|
116
123
|
return this.request("/trending/sectors", {
|
|
117
|
-
|
|
124
|
+
...periodParams(options),
|
|
118
125
|
limit: options.limit,
|
|
119
126
|
offset: options.offset
|
|
120
127
|
});
|
|
@@ -122,7 +129,7 @@ var RedditNamespace = class extends PlatformNamespace {
|
|
|
122
129
|
/** Get trending countries on Reddit. */
|
|
123
130
|
async trendingCountries(options = {}) {
|
|
124
131
|
return this.request("/trending/countries", {
|
|
125
|
-
|
|
132
|
+
...periodParams(options),
|
|
126
133
|
limit: options.limit,
|
|
127
134
|
offset: options.offset
|
|
128
135
|
});
|
|
@@ -130,13 +137,13 @@ var RedditNamespace = class extends PlatformNamespace {
|
|
|
130
137
|
/** Get sentiment for a specific stock ticker. */
|
|
131
138
|
async stock(ticker, options = {}) {
|
|
132
139
|
return this.request(`/stock/${encodeURIComponent(ticker)}`, {
|
|
133
|
-
|
|
140
|
+
...periodParams(options)
|
|
134
141
|
});
|
|
135
142
|
}
|
|
136
143
|
/** Get raw Reddit mentions for a specific stock ticker. */
|
|
137
144
|
async mentions(ticker, options = {}) {
|
|
138
145
|
return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {
|
|
139
|
-
|
|
146
|
+
...periodParams(options),
|
|
140
147
|
limit: options.limit,
|
|
141
148
|
offset: options.offset,
|
|
142
149
|
include_inherited: options.includeInherited?.toString()
|
|
@@ -150,7 +157,7 @@ var RedditNamespace = class extends PlatformNamespace {
|
|
|
150
157
|
async search(query, options = {}) {
|
|
151
158
|
return this.request("/search", {
|
|
152
159
|
q: query,
|
|
153
|
-
|
|
160
|
+
...periodParams(options),
|
|
154
161
|
limit: options.limit
|
|
155
162
|
});
|
|
156
163
|
}
|
|
@@ -158,13 +165,13 @@ var RedditNamespace = class extends PlatformNamespace {
|
|
|
158
165
|
async compare(tickers, options = {}) {
|
|
159
166
|
return this.request("/compare", {
|
|
160
167
|
tickers: tickers.join(","),
|
|
161
|
-
|
|
168
|
+
...periodParams(options)
|
|
162
169
|
});
|
|
163
170
|
}
|
|
164
171
|
/** Get the service-level Reddit market sentiment snapshot. */
|
|
165
172
|
async marketSentiment(options = {}) {
|
|
166
173
|
return this.request("/market-sentiment", {
|
|
167
|
-
|
|
174
|
+
...periodParams(options)
|
|
168
175
|
});
|
|
169
176
|
}
|
|
170
177
|
/** Get Reddit stock data statistics. */
|
|
@@ -184,7 +191,7 @@ var NewsNamespace = class extends PlatformNamespace {
|
|
|
184
191
|
/** Get trending stocks from news. */
|
|
185
192
|
async trending(options = {}) {
|
|
186
193
|
return this.request("/trending", {
|
|
187
|
-
|
|
194
|
+
...periodParams(options),
|
|
188
195
|
limit: options.limit,
|
|
189
196
|
offset: options.offset,
|
|
190
197
|
type: options.type,
|
|
@@ -194,7 +201,7 @@ var NewsNamespace = class extends PlatformNamespace {
|
|
|
194
201
|
/** Get trending sectors from news. */
|
|
195
202
|
async trendingSectors(options = {}) {
|
|
196
203
|
return this.request("/trending/sectors", {
|
|
197
|
-
|
|
204
|
+
...periodParams(options),
|
|
198
205
|
limit: options.limit,
|
|
199
206
|
offset: options.offset,
|
|
200
207
|
source: options.source
|
|
@@ -203,7 +210,7 @@ var NewsNamespace = class extends PlatformNamespace {
|
|
|
203
210
|
/** Get trending countries from news. */
|
|
204
211
|
async trendingCountries(options = {}) {
|
|
205
212
|
return this.request("/trending/countries", {
|
|
206
|
-
|
|
213
|
+
...periodParams(options),
|
|
207
214
|
limit: options.limit,
|
|
208
215
|
offset: options.offset,
|
|
209
216
|
source: options.source
|
|
@@ -212,13 +219,13 @@ var NewsNamespace = class extends PlatformNamespace {
|
|
|
212
219
|
/** Get sentiment for a specific stock ticker from news. */
|
|
213
220
|
async stock(ticker, options = {}) {
|
|
214
221
|
return this.request(`/stock/${encodeURIComponent(ticker)}`, {
|
|
215
|
-
|
|
222
|
+
...periodParams(options)
|
|
216
223
|
});
|
|
217
224
|
}
|
|
218
225
|
/** Get raw news mentions for a specific stock ticker. */
|
|
219
226
|
async mentions(ticker, options = {}) {
|
|
220
227
|
return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {
|
|
221
|
-
|
|
228
|
+
...periodParams(options),
|
|
222
229
|
limit: options.limit,
|
|
223
230
|
offset: options.offset
|
|
224
231
|
});
|
|
@@ -231,7 +238,7 @@ var NewsNamespace = class extends PlatformNamespace {
|
|
|
231
238
|
async search(query, options = {}) {
|
|
232
239
|
return this.request("/search", {
|
|
233
240
|
q: query,
|
|
234
|
-
|
|
241
|
+
...periodParams(options),
|
|
235
242
|
limit: options.limit
|
|
236
243
|
});
|
|
237
244
|
}
|
|
@@ -239,13 +246,13 @@ var NewsNamespace = class extends PlatformNamespace {
|
|
|
239
246
|
async compare(tickers, options = {}) {
|
|
240
247
|
return this.request("/compare", {
|
|
241
248
|
tickers: tickers.join(","),
|
|
242
|
-
|
|
249
|
+
...periodParams(options)
|
|
243
250
|
});
|
|
244
251
|
}
|
|
245
252
|
/** Get the service-level News market sentiment snapshot. */
|
|
246
253
|
async marketSentiment(options = {}) {
|
|
247
254
|
return this.request("/market-sentiment", {
|
|
248
|
-
|
|
255
|
+
...periodParams(options)
|
|
249
256
|
});
|
|
250
257
|
}
|
|
251
258
|
/** Get news data statistics. */
|
|
@@ -265,7 +272,7 @@ var XNamespace = class extends PlatformNamespace {
|
|
|
265
272
|
/** Get trending stocks on X/Twitter. */
|
|
266
273
|
async trending(options = {}) {
|
|
267
274
|
return this.request("/trending", {
|
|
268
|
-
|
|
275
|
+
...periodParams(options),
|
|
269
276
|
limit: options.limit,
|
|
270
277
|
offset: options.offset,
|
|
271
278
|
type: options.type
|
|
@@ -274,7 +281,7 @@ var XNamespace = class extends PlatformNamespace {
|
|
|
274
281
|
/** Get trending sectors on X/Twitter. */
|
|
275
282
|
async trendingSectors(options = {}) {
|
|
276
283
|
return this.request("/trending/sectors", {
|
|
277
|
-
|
|
284
|
+
...periodParams(options),
|
|
278
285
|
limit: options.limit,
|
|
279
286
|
offset: options.offset
|
|
280
287
|
});
|
|
@@ -282,7 +289,7 @@ var XNamespace = class extends PlatformNamespace {
|
|
|
282
289
|
/** Get trending countries on X/Twitter. */
|
|
283
290
|
async trendingCountries(options = {}) {
|
|
284
291
|
return this.request("/trending/countries", {
|
|
285
|
-
|
|
292
|
+
...periodParams(options),
|
|
286
293
|
limit: options.limit,
|
|
287
294
|
offset: options.offset
|
|
288
295
|
});
|
|
@@ -290,13 +297,13 @@ var XNamespace = class extends PlatformNamespace {
|
|
|
290
297
|
/** Get X/Twitter sentiment for a specific stock ticker. */
|
|
291
298
|
async stock(ticker, options = {}) {
|
|
292
299
|
return this.request(`/stock/${encodeURIComponent(ticker)}`, {
|
|
293
|
-
|
|
300
|
+
...periodParams(options)
|
|
294
301
|
});
|
|
295
302
|
}
|
|
296
303
|
/** Get raw X/Twitter mentions for a specific stock ticker. */
|
|
297
304
|
async mentions(ticker, options = {}) {
|
|
298
305
|
return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {
|
|
299
|
-
|
|
306
|
+
...periodParams(options),
|
|
300
307
|
limit: options.limit,
|
|
301
308
|
offset: options.offset
|
|
302
309
|
});
|
|
@@ -309,7 +316,7 @@ var XNamespace = class extends PlatformNamespace {
|
|
|
309
316
|
async search(query, options = {}) {
|
|
310
317
|
return this.request("/search", {
|
|
311
318
|
q: query,
|
|
312
|
-
|
|
319
|
+
...periodParams(options),
|
|
313
320
|
limit: options.limit
|
|
314
321
|
});
|
|
315
322
|
}
|
|
@@ -317,13 +324,13 @@ var XNamespace = class extends PlatformNamespace {
|
|
|
317
324
|
async compare(tickers, options = {}) {
|
|
318
325
|
return this.request("/compare", {
|
|
319
326
|
tickers: tickers.join(","),
|
|
320
|
-
|
|
327
|
+
...periodParams(options)
|
|
321
328
|
});
|
|
322
329
|
}
|
|
323
330
|
/** Get the service-level X/Twitter market sentiment snapshot. */
|
|
324
331
|
async marketSentiment(options = {}) {
|
|
325
332
|
return this.request("/market-sentiment", {
|
|
326
|
-
|
|
333
|
+
...periodParams(options)
|
|
327
334
|
});
|
|
328
335
|
}
|
|
329
336
|
/** Get X/Twitter data statistics. */
|
|
@@ -343,7 +350,7 @@ var PolymarketNamespace = class extends PlatformNamespace {
|
|
|
343
350
|
/** Get trending stocks on Polymarket. */
|
|
344
351
|
async trending(options = {}) {
|
|
345
352
|
return this.request("/trending", {
|
|
346
|
-
|
|
353
|
+
...periodParams(options),
|
|
347
354
|
limit: options.limit,
|
|
348
355
|
offset: options.offset,
|
|
349
356
|
type: options.type
|
|
@@ -352,7 +359,7 @@ var PolymarketNamespace = class extends PlatformNamespace {
|
|
|
352
359
|
/** Get trending sectors on Polymarket. */
|
|
353
360
|
async trendingSectors(options = {}) {
|
|
354
361
|
return this.request("/trending/sectors", {
|
|
355
|
-
|
|
362
|
+
...periodParams(options),
|
|
356
363
|
limit: options.limit,
|
|
357
364
|
offset: options.offset
|
|
358
365
|
});
|
|
@@ -360,7 +367,7 @@ var PolymarketNamespace = class extends PlatformNamespace {
|
|
|
360
367
|
/** Get trending countries on Polymarket. */
|
|
361
368
|
async trendingCountries(options = {}) {
|
|
362
369
|
return this.request("/trending/countries", {
|
|
363
|
-
|
|
370
|
+
...periodParams(options),
|
|
364
371
|
limit: options.limit,
|
|
365
372
|
offset: options.offset
|
|
366
373
|
});
|
|
@@ -368,13 +375,13 @@ var PolymarketNamespace = class extends PlatformNamespace {
|
|
|
368
375
|
/** Get Polymarket sentiment for a specific stock ticker. */
|
|
369
376
|
async stock(ticker, options = {}) {
|
|
370
377
|
return this.request(`/stock/${encodeURIComponent(ticker)}`, {
|
|
371
|
-
|
|
378
|
+
...periodParams(options)
|
|
372
379
|
});
|
|
373
380
|
}
|
|
374
381
|
/** Get raw Polymarket snapshots for a specific stock ticker. */
|
|
375
382
|
async mentions(ticker, options = {}) {
|
|
376
383
|
return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {
|
|
377
|
-
|
|
384
|
+
...periodParams(options),
|
|
378
385
|
limit: options.limit,
|
|
379
386
|
offset: options.offset
|
|
380
387
|
});
|
|
@@ -383,7 +390,7 @@ var PolymarketNamespace = class extends PlatformNamespace {
|
|
|
383
390
|
async search(query, options = {}) {
|
|
384
391
|
return this.request("/search", {
|
|
385
392
|
q: query,
|
|
386
|
-
|
|
393
|
+
...periodParams(options),
|
|
387
394
|
limit: options.limit
|
|
388
395
|
});
|
|
389
396
|
}
|
|
@@ -391,13 +398,13 @@ var PolymarketNamespace = class extends PlatformNamespace {
|
|
|
391
398
|
async compare(tickers, options = {}) {
|
|
392
399
|
return this.request("/compare", {
|
|
393
400
|
tickers: tickers.join(","),
|
|
394
|
-
|
|
401
|
+
...periodParams(options)
|
|
395
402
|
});
|
|
396
403
|
}
|
|
397
404
|
/** Get the service-level Polymarket market sentiment snapshot. */
|
|
398
405
|
async marketSentiment(options = {}) {
|
|
399
406
|
return this.request("/market-sentiment", {
|
|
400
|
-
|
|
407
|
+
...periodParams(options)
|
|
401
408
|
});
|
|
402
409
|
}
|
|
403
410
|
/** Get Polymarket data statistics. */
|
|
@@ -417,7 +424,7 @@ var RedditCryptoNamespace = class extends PlatformNamespace {
|
|
|
417
424
|
/** Get trending crypto tokens on Reddit. */
|
|
418
425
|
async trending(options = {}) {
|
|
419
426
|
return this.request("/trending", {
|
|
420
|
-
|
|
427
|
+
...periodParams(options),
|
|
421
428
|
limit: options.limit,
|
|
422
429
|
offset: options.offset
|
|
423
430
|
});
|
|
@@ -425,13 +432,13 @@ var RedditCryptoNamespace = class extends PlatformNamespace {
|
|
|
425
432
|
/** Get sentiment for a specific crypto token. */
|
|
426
433
|
async token(symbol, options = {}) {
|
|
427
434
|
return this.request(`/token/${encodeURIComponent(symbol)}`, {
|
|
428
|
-
|
|
435
|
+
...periodParams(options)
|
|
429
436
|
});
|
|
430
437
|
}
|
|
431
438
|
/** Get raw Reddit mentions for a specific crypto token. */
|
|
432
439
|
async mentions(symbol, options = {}) {
|
|
433
440
|
return this.request(`/token/${encodeURIComponent(symbol)}/mentions`, {
|
|
434
|
-
|
|
441
|
+
...periodParams(options),
|
|
435
442
|
limit: options.limit,
|
|
436
443
|
offset: options.offset,
|
|
437
444
|
include_inherited: options.includeInherited?.toString()
|
|
@@ -441,7 +448,7 @@ var RedditCryptoNamespace = class extends PlatformNamespace {
|
|
|
441
448
|
async search(query, options = {}) {
|
|
442
449
|
return this.request("/search", {
|
|
443
450
|
q: query,
|
|
444
|
-
|
|
451
|
+
...periodParams(options),
|
|
445
452
|
limit: options.limit
|
|
446
453
|
});
|
|
447
454
|
}
|
|
@@ -449,13 +456,13 @@ var RedditCryptoNamespace = class extends PlatformNamespace {
|
|
|
449
456
|
async compare(symbols, options = {}) {
|
|
450
457
|
return this.request("/compare", {
|
|
451
458
|
symbols: symbols.join(","),
|
|
452
|
-
|
|
459
|
+
...periodParams(options)
|
|
453
460
|
});
|
|
454
461
|
}
|
|
455
462
|
/** Get the service-level Reddit Crypto market sentiment snapshot. */
|
|
456
463
|
async marketSentiment(options = {}) {
|
|
457
464
|
return this.request("/market-sentiment", {
|
|
458
|
-
|
|
465
|
+
...periodParams(options)
|
|
459
466
|
});
|
|
460
467
|
}
|
|
461
468
|
/** Get Reddit crypto data statistics. */
|