finance-sentiment 1.0.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/LICENSE +21 -0
- package/README.md +263 -0
- package/dist/index.cjs +344 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +532 -0
- package/dist/index.d.ts +532 -0
- package/dist/index.js +312 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adanos Finance Sentiment API — TypeScript SDK
|
|
3
|
+
*
|
|
4
|
+
* Analyze stock sentiment across News, Reddit, X/Twitter, and Polymarket.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { AdanosClient } from 'finance-sentiment';
|
|
9
|
+
*
|
|
10
|
+
* const client = new AdanosClient({ apiKey: 'adanos_api_key_here' });
|
|
11
|
+
* const trending = await client.reddit.trending({ days: 7 });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
declare class StockSentimentError extends Error {
|
|
15
|
+
constructor(message: string);
|
|
16
|
+
}
|
|
17
|
+
declare class ApiError extends StockSentimentError {
|
|
18
|
+
status: number;
|
|
19
|
+
detail: string;
|
|
20
|
+
constructor(status: number, detail: string);
|
|
21
|
+
}
|
|
22
|
+
interface ClientOptions {
|
|
23
|
+
apiKey: string;
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
/** Request timeout in milliseconds. Default: 30000 */
|
|
26
|
+
timeout?: number;
|
|
27
|
+
}
|
|
28
|
+
interface TrendingOptions {
|
|
29
|
+
/** Time period in days (1-90). Free tier limited to 30. */
|
|
30
|
+
days?: number;
|
|
31
|
+
/** Max results (1-100). Default: 20. */
|
|
32
|
+
limit?: number;
|
|
33
|
+
/** Pagination offset. Default: 0. */
|
|
34
|
+
offset?: number;
|
|
35
|
+
/** Filter by "stock", "etf", "all", or undefined for all. */
|
|
36
|
+
type?: string;
|
|
37
|
+
}
|
|
38
|
+
interface TrendingGroupOptions {
|
|
39
|
+
days?: number;
|
|
40
|
+
limit?: number;
|
|
41
|
+
offset?: number;
|
|
42
|
+
}
|
|
43
|
+
interface StockOptions {
|
|
44
|
+
/** Time period in days (1-90). Default: 7. */
|
|
45
|
+
days?: number;
|
|
46
|
+
}
|
|
47
|
+
/** Alias — compare accepts the same options as a single-stock lookup. */
|
|
48
|
+
type CompareOptions = StockOptions;
|
|
49
|
+
interface NewsSourceOptions {
|
|
50
|
+
/** Optional strict source filter (canonical source id or known alias). */
|
|
51
|
+
source?: string;
|
|
52
|
+
}
|
|
53
|
+
interface NewsTrendingOptions extends TrendingOptions, NewsSourceOptions {
|
|
54
|
+
}
|
|
55
|
+
interface NewsTrendingGroupOptions extends TrendingGroupOptions, NewsSourceOptions {
|
|
56
|
+
}
|
|
57
|
+
type NewsStockOptions = StockOptions;
|
|
58
|
+
type NewsCompareOptions = CompareOptions;
|
|
59
|
+
interface TrendingStock {
|
|
60
|
+
ticker: string;
|
|
61
|
+
buzz_score: number;
|
|
62
|
+
trend: 'rising' | 'falling' | 'stable';
|
|
63
|
+
mentions: number;
|
|
64
|
+
unique_posts: number;
|
|
65
|
+
subreddit_count: number;
|
|
66
|
+
sentiment_score: number;
|
|
67
|
+
bullish_pct: number;
|
|
68
|
+
bearish_pct: number;
|
|
69
|
+
total_upvotes: number;
|
|
70
|
+
company_name?: string | null;
|
|
71
|
+
trend_history?: number[];
|
|
72
|
+
}
|
|
73
|
+
interface StockSentiment {
|
|
74
|
+
ticker: string;
|
|
75
|
+
found: boolean;
|
|
76
|
+
company_name?: string | null;
|
|
77
|
+
buzz_score?: number | null;
|
|
78
|
+
total_mentions?: number | null;
|
|
79
|
+
sentiment_score?: number | null;
|
|
80
|
+
positive_count?: number | null;
|
|
81
|
+
negative_count?: number | null;
|
|
82
|
+
neutral_count?: number | null;
|
|
83
|
+
total_upvotes?: number | null;
|
|
84
|
+
unique_posts?: number | null;
|
|
85
|
+
subreddit_count?: number | null;
|
|
86
|
+
trend?: 'rising' | 'falling' | 'stable' | null;
|
|
87
|
+
bullish_pct?: number | null;
|
|
88
|
+
bearish_pct?: number | null;
|
|
89
|
+
period_days?: number | null;
|
|
90
|
+
top_subreddits?: SubredditCount[] | null;
|
|
91
|
+
daily_trend?: DailyTrendItem[] | null;
|
|
92
|
+
top_mentions?: TopMention[] | null;
|
|
93
|
+
}
|
|
94
|
+
interface SubredditCount {
|
|
95
|
+
subreddit: string;
|
|
96
|
+
count: number;
|
|
97
|
+
}
|
|
98
|
+
interface DailyTrendItem {
|
|
99
|
+
date: string;
|
|
100
|
+
mentions: number;
|
|
101
|
+
sentiment?: number | null;
|
|
102
|
+
buzz_score?: number | null;
|
|
103
|
+
}
|
|
104
|
+
interface TopMention {
|
|
105
|
+
text_snippet: string;
|
|
106
|
+
sentiment_score: number;
|
|
107
|
+
sentiment_label: string;
|
|
108
|
+
upvotes: number;
|
|
109
|
+
subreddit: string;
|
|
110
|
+
created_utc: string;
|
|
111
|
+
}
|
|
112
|
+
interface StockExplanationResponse {
|
|
113
|
+
ticker: string;
|
|
114
|
+
company_name?: string | null;
|
|
115
|
+
explanation: string;
|
|
116
|
+
cached: boolean;
|
|
117
|
+
generated_at: string;
|
|
118
|
+
model?: string | null;
|
|
119
|
+
}
|
|
120
|
+
interface SchedulerStatus {
|
|
121
|
+
running: boolean;
|
|
122
|
+
last_scrape?: string | null;
|
|
123
|
+
scrape_count?: number;
|
|
124
|
+
error_count?: number;
|
|
125
|
+
success_rate?: number | null;
|
|
126
|
+
note?: string | null;
|
|
127
|
+
}
|
|
128
|
+
interface HealthResponse {
|
|
129
|
+
status: string;
|
|
130
|
+
service?: string | null;
|
|
131
|
+
version?: string | null;
|
|
132
|
+
total_mentions?: number;
|
|
133
|
+
tickers_tracked?: number;
|
|
134
|
+
scheduler?: SchedulerStatus | null;
|
|
135
|
+
error?: string | null;
|
|
136
|
+
}
|
|
137
|
+
interface StatsResponse {
|
|
138
|
+
total_mentions: number;
|
|
139
|
+
unique_tickers: number;
|
|
140
|
+
tickers: string[];
|
|
141
|
+
supported_tickers: number;
|
|
142
|
+
}
|
|
143
|
+
interface SearchResponse {
|
|
144
|
+
query: string;
|
|
145
|
+
count: number;
|
|
146
|
+
results: SearchResultItem[];
|
|
147
|
+
}
|
|
148
|
+
interface SearchResultItem {
|
|
149
|
+
ticker: string;
|
|
150
|
+
name: string;
|
|
151
|
+
type?: string | null;
|
|
152
|
+
exchange?: string | null;
|
|
153
|
+
sector?: string | null;
|
|
154
|
+
country?: string | null;
|
|
155
|
+
aliases?: string[] | null;
|
|
156
|
+
mention_count?: number | null;
|
|
157
|
+
}
|
|
158
|
+
interface CompareResponse {
|
|
159
|
+
period_days: number;
|
|
160
|
+
stocks: CompareStockItem[];
|
|
161
|
+
}
|
|
162
|
+
interface CompareStockItem {
|
|
163
|
+
ticker: string;
|
|
164
|
+
company_name?: string | null;
|
|
165
|
+
buzz_score: number;
|
|
166
|
+
mentions: number;
|
|
167
|
+
sentiment?: number | null;
|
|
168
|
+
upvotes: number;
|
|
169
|
+
}
|
|
170
|
+
interface TrendingGroupBase {
|
|
171
|
+
buzz_score: number;
|
|
172
|
+
trend: 'rising' | 'falling' | 'stable';
|
|
173
|
+
mentions: number;
|
|
174
|
+
unique_tickers: number;
|
|
175
|
+
sentiment_score: number;
|
|
176
|
+
bullish_pct: number;
|
|
177
|
+
bearish_pct: number;
|
|
178
|
+
total_upvotes: number;
|
|
179
|
+
top_tickers: string[];
|
|
180
|
+
}
|
|
181
|
+
interface TrendingSector extends TrendingGroupBase {
|
|
182
|
+
sector: string;
|
|
183
|
+
subreddit_count: number;
|
|
184
|
+
}
|
|
185
|
+
interface TrendingCountry extends TrendingGroupBase {
|
|
186
|
+
country: string;
|
|
187
|
+
subreddit_count: number;
|
|
188
|
+
}
|
|
189
|
+
interface NewsTrendingStock {
|
|
190
|
+
ticker: string;
|
|
191
|
+
buzz_score: number;
|
|
192
|
+
trend: 'rising' | 'falling' | 'stable';
|
|
193
|
+
mentions: number;
|
|
194
|
+
source_count: number;
|
|
195
|
+
sentiment_score: number;
|
|
196
|
+
bullish_pct: number;
|
|
197
|
+
bearish_pct: number;
|
|
198
|
+
company_name?: string | null;
|
|
199
|
+
trend_history?: number[];
|
|
200
|
+
}
|
|
201
|
+
interface NewsSourceCount {
|
|
202
|
+
source: string;
|
|
203
|
+
count: number;
|
|
204
|
+
}
|
|
205
|
+
interface NewsTopMention {
|
|
206
|
+
text_snippet: string;
|
|
207
|
+
sentiment_score: number;
|
|
208
|
+
sentiment_label: string;
|
|
209
|
+
source: string;
|
|
210
|
+
created_utc: string;
|
|
211
|
+
}
|
|
212
|
+
interface NewsStockSentiment {
|
|
213
|
+
ticker: string;
|
|
214
|
+
found: boolean;
|
|
215
|
+
company_name?: string | null;
|
|
216
|
+
buzz_score?: number | null;
|
|
217
|
+
total_mentions?: number | null;
|
|
218
|
+
sentiment_score?: number | null;
|
|
219
|
+
positive_count?: number | null;
|
|
220
|
+
negative_count?: number | null;
|
|
221
|
+
neutral_count?: number | null;
|
|
222
|
+
source_count?: number | null;
|
|
223
|
+
trend?: 'rising' | 'falling' | 'stable' | null;
|
|
224
|
+
bullish_pct?: number | null;
|
|
225
|
+
bearish_pct?: number | null;
|
|
226
|
+
period_days?: number | null;
|
|
227
|
+
top_sources?: NewsSourceCount[] | null;
|
|
228
|
+
daily_trend?: DailyTrendItem[] | null;
|
|
229
|
+
top_mentions?: NewsTopMention[] | null;
|
|
230
|
+
}
|
|
231
|
+
interface NewsTrendingGroupBase {
|
|
232
|
+
buzz_score: number;
|
|
233
|
+
trend: 'rising' | 'falling' | 'stable';
|
|
234
|
+
mentions: number;
|
|
235
|
+
unique_tickers: number;
|
|
236
|
+
source_count: number;
|
|
237
|
+
sentiment_score: number;
|
|
238
|
+
bullish_pct: number;
|
|
239
|
+
bearish_pct: number;
|
|
240
|
+
top_tickers: string[];
|
|
241
|
+
}
|
|
242
|
+
interface NewsTrendingSector extends NewsTrendingGroupBase {
|
|
243
|
+
sector: string;
|
|
244
|
+
}
|
|
245
|
+
interface NewsTrendingCountry extends NewsTrendingGroupBase {
|
|
246
|
+
country: string;
|
|
247
|
+
}
|
|
248
|
+
interface NewsCompareStockItem {
|
|
249
|
+
ticker: string;
|
|
250
|
+
company_name?: string | null;
|
|
251
|
+
buzz_score: number;
|
|
252
|
+
mentions: number;
|
|
253
|
+
source_count: number;
|
|
254
|
+
sentiment?: number | null;
|
|
255
|
+
}
|
|
256
|
+
interface NewsCompareResponse {
|
|
257
|
+
period_days: number;
|
|
258
|
+
stocks: NewsCompareStockItem[];
|
|
259
|
+
}
|
|
260
|
+
interface XTrendingStock {
|
|
261
|
+
ticker: string;
|
|
262
|
+
buzz_score: number;
|
|
263
|
+
trend: string;
|
|
264
|
+
mentions: number;
|
|
265
|
+
company_name?: string | null;
|
|
266
|
+
sentiment_score?: number | null;
|
|
267
|
+
bullish_pct?: number | null;
|
|
268
|
+
bearish_pct?: number | null;
|
|
269
|
+
total_upvotes?: number | null;
|
|
270
|
+
unique_tweets?: number | null;
|
|
271
|
+
is_validated: boolean;
|
|
272
|
+
trend_history?: number[];
|
|
273
|
+
}
|
|
274
|
+
interface XStockDetail {
|
|
275
|
+
ticker: string;
|
|
276
|
+
found: boolean;
|
|
277
|
+
company_name?: string | null;
|
|
278
|
+
buzz_score?: number | null;
|
|
279
|
+
total_mentions?: number | null;
|
|
280
|
+
sentiment_score?: number | null;
|
|
281
|
+
positive_count?: number | null;
|
|
282
|
+
negative_count?: number | null;
|
|
283
|
+
neutral_count?: number | null;
|
|
284
|
+
total_upvotes?: number | null;
|
|
285
|
+
unique_tweets?: number | null;
|
|
286
|
+
trend?: 'rising' | 'falling' | 'stable' | null;
|
|
287
|
+
bullish_pct?: number | null;
|
|
288
|
+
bearish_pct?: number | null;
|
|
289
|
+
period_days?: number | null;
|
|
290
|
+
daily_trend?: XDailyTrendItem[] | null;
|
|
291
|
+
top_tweets?: XTopTweet[] | null;
|
|
292
|
+
is_validated: boolean;
|
|
293
|
+
}
|
|
294
|
+
interface XDailyTrendItem {
|
|
295
|
+
date: string;
|
|
296
|
+
mentions: number;
|
|
297
|
+
sentiment?: number | null;
|
|
298
|
+
avg_rank?: number | null;
|
|
299
|
+
buzz_score?: number | null;
|
|
300
|
+
}
|
|
301
|
+
interface XTopTweet {
|
|
302
|
+
text_snippet: string;
|
|
303
|
+
sentiment_score?: number | null;
|
|
304
|
+
sentiment_label?: string | null;
|
|
305
|
+
likes: number;
|
|
306
|
+
retweets: number;
|
|
307
|
+
views?: number | null;
|
|
308
|
+
author?: string | null;
|
|
309
|
+
created_at?: string | null;
|
|
310
|
+
}
|
|
311
|
+
interface XTrendingGroupBase {
|
|
312
|
+
buzz_score: number;
|
|
313
|
+
trend: 'rising' | 'falling' | 'stable';
|
|
314
|
+
mentions: number;
|
|
315
|
+
unique_tickers: number;
|
|
316
|
+
unique_authors: number;
|
|
317
|
+
sentiment_score?: number | null;
|
|
318
|
+
bullish_pct?: number | null;
|
|
319
|
+
bearish_pct?: number | null;
|
|
320
|
+
total_upvotes?: number | null;
|
|
321
|
+
top_tickers: string[];
|
|
322
|
+
}
|
|
323
|
+
interface XTrendingSector extends XTrendingGroupBase {
|
|
324
|
+
sector: string;
|
|
325
|
+
}
|
|
326
|
+
interface XTrendingCountry extends XTrendingGroupBase {
|
|
327
|
+
country: string;
|
|
328
|
+
}
|
|
329
|
+
interface PolymarketTrendingStock {
|
|
330
|
+
ticker: string;
|
|
331
|
+
buzz_score: number;
|
|
332
|
+
trend: 'rising' | 'falling' | 'stable';
|
|
333
|
+
trade_count: number;
|
|
334
|
+
market_count: number;
|
|
335
|
+
unique_traders?: number | null;
|
|
336
|
+
bullish_pct: number;
|
|
337
|
+
bearish_pct: number;
|
|
338
|
+
total_liquidity: number;
|
|
339
|
+
company_name?: string | null;
|
|
340
|
+
sentiment_score?: number | null;
|
|
341
|
+
trend_history?: number[];
|
|
342
|
+
}
|
|
343
|
+
interface PolymarketDailyTrendItem {
|
|
344
|
+
date: string;
|
|
345
|
+
trade_count: number;
|
|
346
|
+
sentiment?: number | null;
|
|
347
|
+
buzz_score?: number | null;
|
|
348
|
+
}
|
|
349
|
+
interface PolymarketTopMention {
|
|
350
|
+
condition_id: string;
|
|
351
|
+
question: string;
|
|
352
|
+
market_type: string;
|
|
353
|
+
trade_count?: number | null;
|
|
354
|
+
sentiment_score?: number | null;
|
|
355
|
+
yes_price?: number | null;
|
|
356
|
+
no_price?: number | null;
|
|
357
|
+
liquidity: number;
|
|
358
|
+
volume_24h: number;
|
|
359
|
+
end_date?: string | null;
|
|
360
|
+
active: boolean;
|
|
361
|
+
}
|
|
362
|
+
interface PolymarketStockDetail {
|
|
363
|
+
ticker: string;
|
|
364
|
+
found: boolean;
|
|
365
|
+
company_name?: string | null;
|
|
366
|
+
buzz_score?: number | null;
|
|
367
|
+
trend?: 'rising' | 'falling' | 'stable' | null;
|
|
368
|
+
period_days?: number | null;
|
|
369
|
+
trade_count?: number | null;
|
|
370
|
+
market_count?: number | null;
|
|
371
|
+
unique_traders?: number | null;
|
|
372
|
+
sentiment_score?: number | null;
|
|
373
|
+
positive_count?: number | null;
|
|
374
|
+
negative_count?: number | null;
|
|
375
|
+
neutral_count?: number | null;
|
|
376
|
+
bullish_pct?: number | null;
|
|
377
|
+
bearish_pct?: number | null;
|
|
378
|
+
total_liquidity?: number | null;
|
|
379
|
+
daily_trend?: PolymarketDailyTrendItem[] | null;
|
|
380
|
+
top_mentions?: PolymarketTopMention[] | null;
|
|
381
|
+
}
|
|
382
|
+
interface PolymarketTrendingGroupBase {
|
|
383
|
+
buzz_score: number;
|
|
384
|
+
trend: 'rising' | 'falling' | 'stable';
|
|
385
|
+
trade_count: number;
|
|
386
|
+
market_count: number;
|
|
387
|
+
unique_tickers: number;
|
|
388
|
+
unique_traders?: number | null;
|
|
389
|
+
sentiment_score?: number | null;
|
|
390
|
+
bullish_pct: number;
|
|
391
|
+
bearish_pct: number;
|
|
392
|
+
total_liquidity: number;
|
|
393
|
+
top_tickers: string[];
|
|
394
|
+
}
|
|
395
|
+
interface PolymarketTrendingSector extends PolymarketTrendingGroupBase {
|
|
396
|
+
sector: string;
|
|
397
|
+
}
|
|
398
|
+
interface PolymarketTrendingCountry extends PolymarketTrendingGroupBase {
|
|
399
|
+
country: string;
|
|
400
|
+
}
|
|
401
|
+
interface PolymarketCompareStockItem {
|
|
402
|
+
ticker: string;
|
|
403
|
+
company_name?: string | null;
|
|
404
|
+
buzz_score: number;
|
|
405
|
+
trade_count: number;
|
|
406
|
+
market_count: number;
|
|
407
|
+
unique_traders?: number | null;
|
|
408
|
+
sentiment?: number | null;
|
|
409
|
+
total_liquidity: number;
|
|
410
|
+
}
|
|
411
|
+
interface PolymarketCompareResponse {
|
|
412
|
+
period_days: number;
|
|
413
|
+
stocks: PolymarketCompareStockItem[];
|
|
414
|
+
}
|
|
415
|
+
interface PolymarketSearchResultItem {
|
|
416
|
+
ticker: string;
|
|
417
|
+
name: string;
|
|
418
|
+
type?: string | null;
|
|
419
|
+
exchange?: string | null;
|
|
420
|
+
sector?: string | null;
|
|
421
|
+
country?: string | null;
|
|
422
|
+
aliases: string[];
|
|
423
|
+
trade_count: number;
|
|
424
|
+
}
|
|
425
|
+
interface PolymarketSearchResponse {
|
|
426
|
+
query: string;
|
|
427
|
+
count: number;
|
|
428
|
+
results: PolymarketSearchResultItem[];
|
|
429
|
+
}
|
|
430
|
+
type QueryParams = Record<string, string | number | undefined>;
|
|
431
|
+
declare class HttpClient {
|
|
432
|
+
private baseUrl;
|
|
433
|
+
private apiKey;
|
|
434
|
+
private timeout;
|
|
435
|
+
constructor(baseUrl: string, apiKey: string, timeout: number);
|
|
436
|
+
get<T>(path: string, params?: QueryParams): Promise<T>;
|
|
437
|
+
}
|
|
438
|
+
declare class PlatformNamespace {
|
|
439
|
+
protected http: HttpClient;
|
|
440
|
+
protected prefix: string;
|
|
441
|
+
constructor(http: HttpClient, prefix: string);
|
|
442
|
+
protected request<T>(path: string, params?: QueryParams): Promise<T>;
|
|
443
|
+
}
|
|
444
|
+
declare class RedditNamespace extends PlatformNamespace {
|
|
445
|
+
/** @internal */
|
|
446
|
+
constructor(http: HttpClient);
|
|
447
|
+
/** Get trending stocks on Reddit. */
|
|
448
|
+
trending(options?: TrendingOptions): Promise<TrendingStock[]>;
|
|
449
|
+
/** Get trending sectors on Reddit. */
|
|
450
|
+
trendingSectors(options?: TrendingGroupOptions): Promise<TrendingSector[]>;
|
|
451
|
+
/** Get trending countries on Reddit. */
|
|
452
|
+
trendingCountries(options?: TrendingGroupOptions): Promise<TrendingCountry[]>;
|
|
453
|
+
/** Get sentiment for a specific stock ticker. */
|
|
454
|
+
stock(ticker: string, options?: StockOptions): Promise<StockSentiment>;
|
|
455
|
+
/** Get AI-generated explanation for a stock's trend. */
|
|
456
|
+
explain(ticker: string): Promise<StockExplanationResponse>;
|
|
457
|
+
/** Search for stocks by name or ticker. */
|
|
458
|
+
search(query: string): Promise<SearchResponse>;
|
|
459
|
+
/** Compare multiple stocks side-by-side. */
|
|
460
|
+
compare(tickers: string[], options?: CompareOptions): Promise<CompareResponse>;
|
|
461
|
+
}
|
|
462
|
+
declare class NewsNamespace extends PlatformNamespace {
|
|
463
|
+
/** @internal */
|
|
464
|
+
constructor(http: HttpClient);
|
|
465
|
+
/** Get trending stocks from news. */
|
|
466
|
+
trending(options?: NewsTrendingOptions): Promise<NewsTrendingStock[]>;
|
|
467
|
+
/** Get trending sectors from news. */
|
|
468
|
+
trendingSectors(options?: NewsTrendingGroupOptions): Promise<NewsTrendingSector[]>;
|
|
469
|
+
/** Get trending countries from news. */
|
|
470
|
+
trendingCountries(options?: NewsTrendingGroupOptions): Promise<NewsTrendingCountry[]>;
|
|
471
|
+
/** Get sentiment for a specific stock ticker from news. */
|
|
472
|
+
stock(ticker: string, options?: StockOptions): Promise<NewsStockSentiment>;
|
|
473
|
+
/** Get AI-generated explanation for a stock's news trend. */
|
|
474
|
+
explain(ticker: string): Promise<StockExplanationResponse>;
|
|
475
|
+
/** Search for stocks by name or ticker in news. */
|
|
476
|
+
search(query: string): Promise<SearchResponse>;
|
|
477
|
+
/** Compare multiple stocks side-by-side using news sentiment. */
|
|
478
|
+
compare(tickers: string[], options?: CompareOptions): Promise<NewsCompareResponse>;
|
|
479
|
+
/** Get news data statistics. */
|
|
480
|
+
stats(): Promise<StatsResponse>;
|
|
481
|
+
/** Get public news service health (no auth required on server side). */
|
|
482
|
+
health(): Promise<HealthResponse>;
|
|
483
|
+
}
|
|
484
|
+
declare class XNamespace extends PlatformNamespace {
|
|
485
|
+
/** @internal */
|
|
486
|
+
constructor(http: HttpClient);
|
|
487
|
+
/** Get trending stocks on X/Twitter. */
|
|
488
|
+
trending(options?: TrendingOptions): Promise<XTrendingStock[]>;
|
|
489
|
+
/** Get trending sectors on X/Twitter. */
|
|
490
|
+
trendingSectors(options?: TrendingGroupOptions): Promise<XTrendingSector[]>;
|
|
491
|
+
/** Get trending countries on X/Twitter. */
|
|
492
|
+
trendingCountries(options?: TrendingGroupOptions): Promise<XTrendingCountry[]>;
|
|
493
|
+
/** Get X/Twitter sentiment for a specific stock ticker. */
|
|
494
|
+
stock(ticker: string, options?: StockOptions): Promise<XStockDetail>;
|
|
495
|
+
/** Search for stocks by name or ticker on X/Twitter. */
|
|
496
|
+
search(query: string): Promise<SearchResponse>;
|
|
497
|
+
/** Compare multiple stocks side-by-side on X/Twitter. */
|
|
498
|
+
compare(tickers: string[], options?: CompareOptions): Promise<CompareResponse>;
|
|
499
|
+
}
|
|
500
|
+
declare class PolymarketNamespace extends PlatformNamespace {
|
|
501
|
+
/** @internal */
|
|
502
|
+
constructor(http: HttpClient);
|
|
503
|
+
/** Get trending stocks on Polymarket. */
|
|
504
|
+
trending(options?: TrendingOptions): Promise<PolymarketTrendingStock[]>;
|
|
505
|
+
/** Get trending sectors on Polymarket. */
|
|
506
|
+
trendingSectors(options?: TrendingGroupOptions): Promise<PolymarketTrendingSector[]>;
|
|
507
|
+
/** Get trending countries on Polymarket. */
|
|
508
|
+
trendingCountries(options?: TrendingGroupOptions): Promise<PolymarketTrendingCountry[]>;
|
|
509
|
+
/** Get Polymarket sentiment for a specific stock ticker. */
|
|
510
|
+
stock(ticker: string, options?: StockOptions): Promise<PolymarketStockDetail>;
|
|
511
|
+
/** Search for stocks by name or ticker on Polymarket. */
|
|
512
|
+
search(query: string): Promise<PolymarketSearchResponse>;
|
|
513
|
+
/** Compare multiple stocks side-by-side on Polymarket. */
|
|
514
|
+
compare(tickers: string[], options?: CompareOptions): Promise<PolymarketCompareResponse>;
|
|
515
|
+
}
|
|
516
|
+
declare class AdanosClient {
|
|
517
|
+
readonly news: NewsNamespace;
|
|
518
|
+
readonly reddit: RedditNamespace;
|
|
519
|
+
readonly x: XNamespace;
|
|
520
|
+
readonly polymarket: PolymarketNamespace;
|
|
521
|
+
/**
|
|
522
|
+
* Create a new Finance Sentiment API client.
|
|
523
|
+
*
|
|
524
|
+
* @param options.apiKey - Your API key (`adanos_api_key_here`).
|
|
525
|
+
* @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.
|
|
526
|
+
* @param options.timeout - Request timeout in ms. Default: 30000.
|
|
527
|
+
*/
|
|
528
|
+
constructor(options: ClientOptions);
|
|
529
|
+
}
|
|
530
|
+
declare const StockSentimentClient: typeof AdanosClient;
|
|
531
|
+
|
|
532
|
+
export { AdanosClient, ApiError, type ClientOptions, type CompareOptions, type CompareResponse, type CompareStockItem, type DailyTrendItem, type HealthResponse, type NewsCompareOptions, type NewsCompareResponse, type NewsCompareStockItem, NewsNamespace, type NewsSourceCount, type NewsSourceOptions, type NewsStockOptions, type NewsStockSentiment, type NewsTopMention, type NewsTrendingCountry, type NewsTrendingGroupOptions, type NewsTrendingOptions, type NewsTrendingSector, type NewsTrendingStock, type PolymarketCompareResponse, type PolymarketCompareStockItem, type PolymarketDailyTrendItem, PolymarketNamespace, type PolymarketSearchResponse, type PolymarketSearchResultItem, type PolymarketStockDetail, type PolymarketTopMention, type PolymarketTrendingCountry, type PolymarketTrendingSector, type PolymarketTrendingStock, RedditNamespace, type SchedulerStatus, type SearchResponse, type SearchResultItem, type StatsResponse, type StockExplanationResponse, type StockOptions, type StockSentiment, StockSentimentClient, StockSentimentError, type SubredditCount, type TopMention, type TrendingCountry, type TrendingGroupOptions, type TrendingOptions, type TrendingSector, type TrendingStock, type XDailyTrendItem, XNamespace, type XStockDetail, type XTopTweet, type XTrendingCountry, type XTrendingSector, type XTrendingStock };
|