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/dist/index.js CHANGED
@@ -15,6 +15,13 @@ var ApiError = class extends StockSentimentError {
15
15
  this.detail = detail;
16
16
  }
17
17
  };
18
+ function periodParams(options) {
19
+ return {
20
+ from: options.from,
21
+ to: options.to,
22
+ days: options.days
23
+ };
24
+ }
18
25
  var HttpClient = class {
19
26
  baseUrl;
20
27
  apiKey;
@@ -73,7 +80,7 @@ var RedditNamespace = class extends PlatformNamespace {
73
80
  /** Get trending stocks on Reddit. */
74
81
  async trending(options = {}) {
75
82
  return this.request("/trending", {
76
- days: options.days,
83
+ ...periodParams(options),
77
84
  limit: options.limit,
78
85
  offset: options.offset,
79
86
  type: options.type
@@ -82,7 +89,7 @@ var RedditNamespace = class extends PlatformNamespace {
82
89
  /** Get trending sectors on Reddit. */
83
90
  async trendingSectors(options = {}) {
84
91
  return this.request("/trending/sectors", {
85
- days: options.days,
92
+ ...periodParams(options),
86
93
  limit: options.limit,
87
94
  offset: options.offset
88
95
  });
@@ -90,7 +97,7 @@ var RedditNamespace = class extends PlatformNamespace {
90
97
  /** Get trending countries on Reddit. */
91
98
  async trendingCountries(options = {}) {
92
99
  return this.request("/trending/countries", {
93
- days: options.days,
100
+ ...periodParams(options),
94
101
  limit: options.limit,
95
102
  offset: options.offset
96
103
  });
@@ -98,13 +105,13 @@ var RedditNamespace = class extends PlatformNamespace {
98
105
  /** Get sentiment for a specific stock ticker. */
99
106
  async stock(ticker, options = {}) {
100
107
  return this.request(`/stock/${encodeURIComponent(ticker)}`, {
101
- days: options.days
108
+ ...periodParams(options)
102
109
  });
103
110
  }
104
111
  /** Get raw Reddit mentions for a specific stock ticker. */
105
112
  async mentions(ticker, options = {}) {
106
113
  return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {
107
- days: options.days,
114
+ ...periodParams(options),
108
115
  limit: options.limit,
109
116
  offset: options.offset,
110
117
  include_inherited: options.includeInherited?.toString()
@@ -118,7 +125,7 @@ var RedditNamespace = class extends PlatformNamespace {
118
125
  async search(query, options = {}) {
119
126
  return this.request("/search", {
120
127
  q: query,
121
- days: options.days,
128
+ ...periodParams(options),
122
129
  limit: options.limit
123
130
  });
124
131
  }
@@ -126,13 +133,13 @@ var RedditNamespace = class extends PlatformNamespace {
126
133
  async compare(tickers, options = {}) {
127
134
  return this.request("/compare", {
128
135
  tickers: tickers.join(","),
129
- days: options.days
136
+ ...periodParams(options)
130
137
  });
131
138
  }
132
139
  /** Get the service-level Reddit market sentiment snapshot. */
133
140
  async marketSentiment(options = {}) {
134
141
  return this.request("/market-sentiment", {
135
- days: options.days
142
+ ...periodParams(options)
136
143
  });
137
144
  }
138
145
  /** Get Reddit stock data statistics. */
@@ -152,7 +159,7 @@ var NewsNamespace = class extends PlatformNamespace {
152
159
  /** Get trending stocks from news. */
153
160
  async trending(options = {}) {
154
161
  return this.request("/trending", {
155
- days: options.days,
162
+ ...periodParams(options),
156
163
  limit: options.limit,
157
164
  offset: options.offset,
158
165
  type: options.type,
@@ -162,7 +169,7 @@ var NewsNamespace = class extends PlatformNamespace {
162
169
  /** Get trending sectors from news. */
163
170
  async trendingSectors(options = {}) {
164
171
  return this.request("/trending/sectors", {
165
- days: options.days,
172
+ ...periodParams(options),
166
173
  limit: options.limit,
167
174
  offset: options.offset,
168
175
  source: options.source
@@ -171,7 +178,7 @@ var NewsNamespace = class extends PlatformNamespace {
171
178
  /** Get trending countries from news. */
172
179
  async trendingCountries(options = {}) {
173
180
  return this.request("/trending/countries", {
174
- days: options.days,
181
+ ...periodParams(options),
175
182
  limit: options.limit,
176
183
  offset: options.offset,
177
184
  source: options.source
@@ -180,13 +187,13 @@ var NewsNamespace = class extends PlatformNamespace {
180
187
  /** Get sentiment for a specific stock ticker from news. */
181
188
  async stock(ticker, options = {}) {
182
189
  return this.request(`/stock/${encodeURIComponent(ticker)}`, {
183
- days: options.days
190
+ ...periodParams(options)
184
191
  });
185
192
  }
186
193
  /** Get raw news mentions for a specific stock ticker. */
187
194
  async mentions(ticker, options = {}) {
188
195
  return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {
189
- days: options.days,
196
+ ...periodParams(options),
190
197
  limit: options.limit,
191
198
  offset: options.offset
192
199
  });
@@ -199,7 +206,7 @@ var NewsNamespace = class extends PlatformNamespace {
199
206
  async search(query, options = {}) {
200
207
  return this.request("/search", {
201
208
  q: query,
202
- days: options.days,
209
+ ...periodParams(options),
203
210
  limit: options.limit
204
211
  });
205
212
  }
@@ -207,13 +214,13 @@ var NewsNamespace = class extends PlatformNamespace {
207
214
  async compare(tickers, options = {}) {
208
215
  return this.request("/compare", {
209
216
  tickers: tickers.join(","),
210
- days: options.days
217
+ ...periodParams(options)
211
218
  });
212
219
  }
213
220
  /** Get the service-level News market sentiment snapshot. */
214
221
  async marketSentiment(options = {}) {
215
222
  return this.request("/market-sentiment", {
216
- days: options.days
223
+ ...periodParams(options)
217
224
  });
218
225
  }
219
226
  /** Get news data statistics. */
@@ -233,7 +240,7 @@ var XNamespace = class extends PlatformNamespace {
233
240
  /** Get trending stocks on X/Twitter. */
234
241
  async trending(options = {}) {
235
242
  return this.request("/trending", {
236
- days: options.days,
243
+ ...periodParams(options),
237
244
  limit: options.limit,
238
245
  offset: options.offset,
239
246
  type: options.type
@@ -242,7 +249,7 @@ var XNamespace = class extends PlatformNamespace {
242
249
  /** Get trending sectors on X/Twitter. */
243
250
  async trendingSectors(options = {}) {
244
251
  return this.request("/trending/sectors", {
245
- days: options.days,
252
+ ...periodParams(options),
246
253
  limit: options.limit,
247
254
  offset: options.offset
248
255
  });
@@ -250,7 +257,7 @@ var XNamespace = class extends PlatformNamespace {
250
257
  /** Get trending countries on X/Twitter. */
251
258
  async trendingCountries(options = {}) {
252
259
  return this.request("/trending/countries", {
253
- days: options.days,
260
+ ...periodParams(options),
254
261
  limit: options.limit,
255
262
  offset: options.offset
256
263
  });
@@ -258,13 +265,13 @@ var XNamespace = class extends PlatformNamespace {
258
265
  /** Get X/Twitter sentiment for a specific stock ticker. */
259
266
  async stock(ticker, options = {}) {
260
267
  return this.request(`/stock/${encodeURIComponent(ticker)}`, {
261
- days: options.days
268
+ ...periodParams(options)
262
269
  });
263
270
  }
264
271
  /** Get raw X/Twitter mentions for a specific stock ticker. */
265
272
  async mentions(ticker, options = {}) {
266
273
  return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {
267
- days: options.days,
274
+ ...periodParams(options),
268
275
  limit: options.limit,
269
276
  offset: options.offset
270
277
  });
@@ -277,7 +284,7 @@ var XNamespace = class extends PlatformNamespace {
277
284
  async search(query, options = {}) {
278
285
  return this.request("/search", {
279
286
  q: query,
280
- days: options.days,
287
+ ...periodParams(options),
281
288
  limit: options.limit
282
289
  });
283
290
  }
@@ -285,13 +292,13 @@ var XNamespace = class extends PlatformNamespace {
285
292
  async compare(tickers, options = {}) {
286
293
  return this.request("/compare", {
287
294
  tickers: tickers.join(","),
288
- days: options.days
295
+ ...periodParams(options)
289
296
  });
290
297
  }
291
298
  /** Get the service-level X/Twitter market sentiment snapshot. */
292
299
  async marketSentiment(options = {}) {
293
300
  return this.request("/market-sentiment", {
294
- days: options.days
301
+ ...periodParams(options)
295
302
  });
296
303
  }
297
304
  /** Get X/Twitter data statistics. */
@@ -311,7 +318,7 @@ var PolymarketNamespace = class extends PlatformNamespace {
311
318
  /** Get trending stocks on Polymarket. */
312
319
  async trending(options = {}) {
313
320
  return this.request("/trending", {
314
- days: options.days,
321
+ ...periodParams(options),
315
322
  limit: options.limit,
316
323
  offset: options.offset,
317
324
  type: options.type
@@ -320,7 +327,7 @@ var PolymarketNamespace = class extends PlatformNamespace {
320
327
  /** Get trending sectors on Polymarket. */
321
328
  async trendingSectors(options = {}) {
322
329
  return this.request("/trending/sectors", {
323
- days: options.days,
330
+ ...periodParams(options),
324
331
  limit: options.limit,
325
332
  offset: options.offset
326
333
  });
@@ -328,7 +335,7 @@ var PolymarketNamespace = class extends PlatformNamespace {
328
335
  /** Get trending countries on Polymarket. */
329
336
  async trendingCountries(options = {}) {
330
337
  return this.request("/trending/countries", {
331
- days: options.days,
338
+ ...periodParams(options),
332
339
  limit: options.limit,
333
340
  offset: options.offset
334
341
  });
@@ -336,13 +343,13 @@ var PolymarketNamespace = class extends PlatformNamespace {
336
343
  /** Get Polymarket sentiment for a specific stock ticker. */
337
344
  async stock(ticker, options = {}) {
338
345
  return this.request(`/stock/${encodeURIComponent(ticker)}`, {
339
- days: options.days
346
+ ...periodParams(options)
340
347
  });
341
348
  }
342
349
  /** Get raw Polymarket snapshots for a specific stock ticker. */
343
350
  async mentions(ticker, options = {}) {
344
351
  return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {
345
- days: options.days,
352
+ ...periodParams(options),
346
353
  limit: options.limit,
347
354
  offset: options.offset
348
355
  });
@@ -351,7 +358,7 @@ var PolymarketNamespace = class extends PlatformNamespace {
351
358
  async search(query, options = {}) {
352
359
  return this.request("/search", {
353
360
  q: query,
354
- days: options.days,
361
+ ...periodParams(options),
355
362
  limit: options.limit
356
363
  });
357
364
  }
@@ -359,13 +366,13 @@ var PolymarketNamespace = class extends PlatformNamespace {
359
366
  async compare(tickers, options = {}) {
360
367
  return this.request("/compare", {
361
368
  tickers: tickers.join(","),
362
- days: options.days
369
+ ...periodParams(options)
363
370
  });
364
371
  }
365
372
  /** Get the service-level Polymarket market sentiment snapshot. */
366
373
  async marketSentiment(options = {}) {
367
374
  return this.request("/market-sentiment", {
368
- days: options.days
375
+ ...periodParams(options)
369
376
  });
370
377
  }
371
378
  /** Get Polymarket data statistics. */
@@ -385,7 +392,7 @@ var RedditCryptoNamespace = class extends PlatformNamespace {
385
392
  /** Get trending crypto tokens on Reddit. */
386
393
  async trending(options = {}) {
387
394
  return this.request("/trending", {
388
- days: options.days,
395
+ ...periodParams(options),
389
396
  limit: options.limit,
390
397
  offset: options.offset
391
398
  });
@@ -393,13 +400,13 @@ var RedditCryptoNamespace = class extends PlatformNamespace {
393
400
  /** Get sentiment for a specific crypto token. */
394
401
  async token(symbol, options = {}) {
395
402
  return this.request(`/token/${encodeURIComponent(symbol)}`, {
396
- days: options.days
403
+ ...periodParams(options)
397
404
  });
398
405
  }
399
406
  /** Get raw Reddit mentions for a specific crypto token. */
400
407
  async mentions(symbol, options = {}) {
401
408
  return this.request(`/token/${encodeURIComponent(symbol)}/mentions`, {
402
- days: options.days,
409
+ ...periodParams(options),
403
410
  limit: options.limit,
404
411
  offset: options.offset,
405
412
  include_inherited: options.includeInherited?.toString()
@@ -409,7 +416,7 @@ var RedditCryptoNamespace = class extends PlatformNamespace {
409
416
  async search(query, options = {}) {
410
417
  return this.request("/search", {
411
418
  q: query,
412
- days: options.days,
419
+ ...periodParams(options),
413
420
  limit: options.limit
414
421
  });
415
422
  }
@@ -417,13 +424,13 @@ var RedditCryptoNamespace = class extends PlatformNamespace {
417
424
  async compare(symbols, options = {}) {
418
425
  return this.request("/compare", {
419
426
  symbols: symbols.join(","),
420
- days: options.days
427
+ ...periodParams(options)
421
428
  });
422
429
  }
423
430
  /** Get the service-level Reddit Crypto market sentiment snapshot. */
424
431
  async marketSentiment(options = {}) {
425
432
  return this.request("/market-sentiment", {
426
- days: options.days
433
+ ...periodParams(options)
427
434
  });
428
435
  }
429
436
  /** Get Reddit crypto data statistics. */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Adanos Market Sentiment API — TypeScript SDK\n *\n * Analyze stock sentiment across News, Reddit, X/Twitter, and Polymarket.\n *\n * @example\n * ```ts\n * import { AdanosClient } from 'finance-sentiment';\n *\n * const client = new AdanosClient({ apiKey: 'adanos_api_key_here' });\n * const trending = await client.reddit.trending({ days: 7 });\n * ```\n */\n\n// ── Errors ──────────────────────────────────────────────────────────\n\nexport class StockSentimentError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'StockSentimentError';\n }\n}\n\nexport class ApiError extends StockSentimentError {\n status: number;\n detail: string;\n\n constructor(status: number, detail: string) {\n super(`${status}: ${detail}`);\n this.name = 'ApiError';\n this.status = status;\n this.detail = detail;\n }\n}\n\n// ── Option types ────────────────────────────────────────────────────\n\nexport interface ClientOptions {\n apiKey: string;\n baseUrl?: string;\n /** Request timeout in milliseconds. Default: 30000 */\n timeout?: number;\n}\n\nexport interface TrendingOptions {\n /** Time period in days (1-90). Free tier limited to 30. */\n days?: number;\n /** Max results (1-100). Default: 20. */\n limit?: number;\n /** Pagination offset. Default: 0. */\n offset?: number;\n /** Filter by \"stock\", \"etf\", \"all\", or undefined for all. */\n type?: string;\n}\n\nexport interface TrendingGroupOptions {\n days?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface StockOptions {\n /** Time period in days (1-90). Default: 7. */\n days?: number;\n}\n\n/** Alias — compare accepts the same options as a single-stock lookup. */\nexport type CompareOptions = StockOptions;\nexport type SearchOptions = Pick<TrendingGroupOptions, 'days' | 'limit'>;\nexport type MarketSentimentOptions = Pick<TrendingGroupOptions, 'days'>;\n\nexport interface RawMentionsOptions {\n /** Time period in days. */\n days?: number;\n /** Max raw rows to return. */\n limit?: number;\n /** Pagination offset. Default: 0. */\n offset?: number;\n /** Include inherited Reddit thread context where supported. */\n includeInherited?: boolean;\n}\n\nexport interface NewsSourceOptions {\n /** Optional strict source filter (canonical source id or known alias). */\n source?: string;\n}\n\nexport interface NewsTrendingOptions extends TrendingOptions, NewsSourceOptions {}\nexport interface NewsTrendingGroupOptions extends TrendingGroupOptions, NewsSourceOptions {}\nexport type NewsStockOptions = StockOptions;\nexport type NewsCompareOptions = CompareOptions;\n\n// ── Response types (snake_case — matches API JSON exactly) ──────────\n\n// Reddit response types\n\nexport interface TrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n total_upvotes: number;\n company_name?: string | null;\n trend_history?: number[];\n}\n\nexport interface StockSentiment {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n total_upvotes?: number | null;\n unique_posts?: number | null;\n subreddit_count?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n top_subreddits?: SubredditCount[] | null;\n daily_trend?: DailyTrendItem[] | null;\n top_mentions?: TopMention[] | null;\n}\n\nexport interface SubredditCount {\n subreddit: string;\n count: number;\n}\n\nexport interface DailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface TopMention {\n text_snippet: string;\n sentiment_score: number;\n sentiment_label: string;\n upvotes: number;\n subreddit: string;\n created_utc: string;\n}\n\nexport interface StockExplanationResponse {\n ticker: string;\n company_name?: string | null;\n explanation: string;\n cached: boolean;\n generated_at: string;\n model?: string | null;\n}\n\nexport interface SchedulerStatus {\n running: boolean;\n last_scrape?: string | null;\n scrape_count?: number;\n error_count?: number;\n success_rate?: number | null;\n note?: string | null;\n}\n\nexport interface CryptoSchedulerStatus extends SchedulerStatus {\n timed_out_scrape_threads?: number;\n}\n\nexport interface HealthResponse {\n status: string;\n service?: string | null;\n version?: string | null;\n total_mentions?: number;\n tickers_tracked?: number;\n scheduler?: SchedulerStatus | null;\n error?: string | null;\n}\n\nexport interface CryptoHealthResponse {\n status: string;\n service?: string | null;\n version?: string | null;\n total_mentions?: number;\n tokens_tracked?: number;\n scheduler?: CryptoSchedulerStatus | null;\n error?: string | null;\n}\n\nexport interface XSchedulerStatus {\n running: boolean;\n last_scrape?: string | null;\n scrape_count?: number;\n error_count?: number;\n success_rate?: number;\n note?: string | null;\n}\n\nexport interface XHealthResponse {\n status: string;\n service: string;\n version: string;\n total_mentions: number;\n tickers_tracked: number;\n scheduler?: XSchedulerStatus | null;\n error?: string | null;\n}\n\nexport type PolymarketSchedulerStatus = XSchedulerStatus;\n\nexport interface PolymarketHealthResponse {\n status: string;\n service: string;\n version: string;\n total_mentions: number;\n tickers_tracked: number;\n scheduler?: PolymarketSchedulerStatus | null;\n error?: string | null;\n}\n\nexport interface RootHealthSummary {\n total: number;\n healthy: number;\n unhealthy: number;\n unhealthy_services: string[];\n}\n\nexport interface RootHealthResponse {\n status: string;\n service?: string | null;\n version: string;\n summary: RootHealthSummary;\n services: Record<string, unknown>;\n}\n\nexport interface StatsResponse {\n total_mentions: number;\n unique_tickers: number;\n mentions_today?: number;\n unique_tickers_today?: number;\n tickers?: string[];\n supported_tickers: number;\n}\n\nexport type RedditStatsResponse = StatsResponse;\n\nexport interface NewsStatsResponse extends StatsResponse {\n tickers: string[];\n}\n\nexport interface StockSearchSummary {\n mentions: number;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n unique_posts: number;\n subreddit_count: number;\n total_upvotes: number;\n}\n\nexport interface SearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases?: string[] | null;\n summary: StockSearchSummary;\n}\n\nexport interface SearchResponse<T = SearchResultItem> {\n query: string;\n count: number;\n period_days: number;\n results: T[];\n}\n\nexport interface CompareResponse {\n period_days: number;\n stocks: CompareStockItem[];\n}\n\nexport interface CompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes: number;\n trend_history: number[];\n}\n\nexport interface MarketSentimentDriver {\n ticker: string;\n buzz_score: number;\n sentiment_score?: number | null;\n mentions: number;\n}\n\nexport interface RedditMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n total_upvotes: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: MarketSentimentDriver[];\n}\n\nexport interface RedditRawMentionItem {\n post_id?: string | null;\n comment_id?: string | null;\n subreddit?: string | null;\n author?: string | null;\n text_snippet: string;\n created_utc: string;\n upvotes: number;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n is_inherited: boolean;\n}\n\nexport interface RedditRawMentionsResponse {\n ticker: string;\n period_days: number;\n count: number;\n results: RedditRawMentionItem[];\n}\n\ninterface TrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n total_upvotes: number;\n top_tickers: string[];\n}\n\nexport interface TrendingSector extends TrendingGroupBase {\n sector: string;\n subreddit_count: number;\n}\n\nexport interface TrendingCountry extends TrendingGroupBase {\n country: string;\n subreddit_count: number;\n}\n\n// News response types\n\nexport interface NewsTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n source_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n company_name?: string | null;\n trend_history?: number[];\n}\n\nexport interface NewsSourceCount {\n source: string;\n count: number;\n}\n\nexport interface NewsTopMention {\n text_snippet: string;\n sentiment_score: number;\n sentiment_label: string;\n source: string;\n created_utc: string;\n}\n\nexport interface NewsSearchSummary {\n mentions: number;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n source_count: number;\n}\n\nexport interface NewsSearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases?: string[] | null;\n summary: NewsSearchSummary;\n}\n\nexport interface NewsStockSentiment {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n source_count?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n top_sources?: NewsSourceCount[] | null;\n daily_trend?: DailyTrendItem[] | null;\n top_mentions?: NewsTopMention[] | null;\n}\n\ninterface NewsTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n source_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n top_tickers: string[];\n}\n\nexport interface NewsTrendingSector extends NewsTrendingGroupBase {\n sector: string;\n}\n\nexport interface NewsTrendingCountry extends NewsTrendingGroupBase {\n country: string;\n}\n\nexport interface NewsCompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n source_count: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n trend_history: number[];\n}\n\nexport interface NewsCompareResponse {\n period_days: number;\n stocks: NewsCompareStockItem[];\n}\n\nexport interface NewsMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_articles: number;\n source_count: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: MarketSentimentDriver[];\n}\n\nexport interface NewsRawMentionItem {\n article_id?: string | null;\n source: string;\n url?: string | null;\n title?: string | null;\n summary?: string | null;\n text_snippet: string;\n author?: string | null;\n created_utc?: string | null;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n}\n\nexport interface NewsRawMentionsResponse {\n ticker: string;\n period_days: number;\n count: number;\n results: NewsRawMentionItem[];\n}\n\n// X/Twitter response types\n\nexport interface XTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: string;\n mentions: number;\n company_name?: string | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes?: number | null;\n unique_tweets?: number | null;\n is_validated: boolean;\n trend_history?: number[];\n}\n\nexport interface XStockDetail {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n total_upvotes?: number | null;\n unique_tweets?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n daily_trend?: XDailyTrendItem[] | null;\n top_tweets?: XTopTweet[] | null;\n is_validated: boolean;\n}\n\nexport interface XDailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: number | null;\n avg_rank?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface XSearchSummary {\n mentions: number;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n unique_tweets: number;\n total_upvotes: number;\n}\n\nexport interface XSearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases?: string[] | null;\n summary: XSearchSummary;\n}\n\nexport type XSearchResponse = SearchResponse<XSearchResultItem>;\n\nexport interface XCompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_tweets: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes: number;\n trend_history?: number[];\n}\n\nexport interface XCompareResponse {\n period_days: number;\n stocks: XCompareStockItem[];\n}\n\nexport interface XTopTweet {\n text_snippet: string;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n likes: number;\n retweets: number;\n views?: number | null;\n author?: string | null;\n created_at?: string | null;\n}\n\ninterface XTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n unique_authors: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes?: number | null;\n top_tickers: string[];\n}\n\nexport interface XTrendingSector extends XTrendingGroupBase {\n sector: string;\n}\n\nexport interface XTrendingCountry extends XTrendingGroupBase {\n country: string;\n}\n\nexport interface XMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_tweets: number;\n unique_authors: number;\n total_upvotes: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: MarketSentimentDriver[];\n}\n\nexport interface XRawMentionItem {\n tweet_id: string;\n author?: string | null;\n text_snippet: string;\n created_utc?: string | null;\n likes: number;\n retweets: number;\n views?: number | null;\n is_reply: boolean;\n parent_tweet_id?: string | null;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n}\n\nexport interface XRawMentionsResponse {\n ticker: string;\n period_days: number;\n count: number;\n results: XRawMentionItem[];\n}\n\nexport interface XStatsResponse {\n total_appearances?: number;\n unique_tickers?: number;\n mentions_today?: number;\n unique_tickers_today?: number;\n tickers?: string[];\n supported_tickers?: number;\n last_fetch?: string | null;\n}\n\n// Polymarket response types\n\nexport interface PolymarketTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_traders?: number | null;\n bullish_pct: number;\n bearish_pct: number;\n total_liquidity: number;\n company_name?: string | null;\n sentiment_score?: number | null;\n trend_history?: number[];\n}\n\nexport interface PolymarketDailyTrendItem {\n date: string;\n trade_count: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface PolymarketTopMention {\n condition_id: string;\n question: string;\n market_type: string;\n trade_count?: number | null;\n sentiment_score?: number | null;\n yes_price?: number | null;\n no_price?: number | null;\n liquidity: number;\n volume_24h: number;\n end_date?: string | null;\n active: boolean;\n}\n\nexport interface PolymarketStockDetail {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n period_days?: number | null;\n trade_count?: number | null;\n market_count?: number | null;\n current_market_count?: number | null;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_liquidity?: number | null;\n daily_trend?: PolymarketDailyTrendItem[] | null;\n top_mentions?: PolymarketTopMention[] | null;\n}\n\ninterface PolymarketTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_tickers: number;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n bullish_pct: number;\n bearish_pct: number;\n total_liquidity: number;\n top_tickers: string[];\n}\n\nexport interface PolymarketTrendingSector extends PolymarketTrendingGroupBase {\n sector: string;\n}\n\nexport interface PolymarketTrendingCountry extends PolymarketTrendingGroupBase {\n country: string;\n}\n\nexport interface PolymarketCompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_liquidity: number;\n trend_history: number[];\n}\n\nexport interface PolymarketCompareResponse {\n period_days: number;\n stocks: PolymarketCompareStockItem[];\n}\n\nexport interface PolymarketMarketSentimentDriver {\n ticker: string;\n trade_count: number;\n buzz_score: number;\n sentiment_score?: number | null;\n}\n\nexport interface PolymarketMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_traders: number;\n total_liquidity: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: PolymarketMarketSentimentDriver[];\n}\n\nexport interface PolymarketSearchSummary {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_liquidity: number;\n}\n\nexport interface PolymarketSearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases: string[];\n summary: PolymarketSearchSummary;\n}\n\nexport interface PolymarketSearchResponse {\n query: string;\n count: number;\n period_days: number;\n results: PolymarketSearchResultItem[];\n}\n\nexport interface PolymarketRawMentionItem {\n condition_id: string;\n event_id: string;\n market_slug?: string | null;\n question: string;\n market_type: string;\n strike_price?: number | null;\n yes_price?: number | null;\n no_price?: number | null;\n reference_price?: number | null;\n reference_price_timestamp?: string | null;\n liquidity: number;\n volume_24h: number;\n trade_count: number;\n buy_trades: number;\n sell_trades: number;\n unique_traders: number;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n end_date?: string | null;\n active: boolean;\n fetched_at: string;\n}\n\nexport interface PolymarketRawMentionsResponse {\n ticker: string;\n period_days: number;\n count: number;\n results: PolymarketRawMentionItem[];\n}\n\nexport interface PolymarketStatsResponse {\n total_trades: number;\n total_markets: number;\n unique_tickers: number;\n mentions_today?: number;\n unique_tickers_today?: number;\n tickers: string[];\n supported_tickers: number;\n}\n\n// Reddit crypto response types\n\nexport interface CryptoTrendingToken {\n symbol: string;\n name?: string | null;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes: number;\n trend_history?: number[];\n}\n\nexport interface CryptoSubredditCount {\n subreddit: string;\n count: number;\n}\n\nexport interface CryptoDailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface CryptoTopMention {\n text_snippet: string;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n upvotes: number;\n subreddit?: string | null;\n created_utc: string;\n}\n\nexport interface CryptoTokenSentiment {\n symbol: string;\n name?: string | null;\n found: boolean;\n buzz_score?: number | null;\n mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n total_upvotes?: number | null;\n unique_posts?: number | null;\n subreddit_count?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n top_subreddits?: CryptoSubredditCount[] | null;\n daily_trend?: CryptoDailyTrendItem[] | null;\n top_mentions?: CryptoTopMention[] | null;\n}\n\nexport interface CryptoSearchSummary {\n mentions: number;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n unique_posts: number;\n subreddit_count: number;\n total_upvotes: number;\n}\n\nexport interface CryptoSearchItem {\n symbol: string;\n name: string;\n market_cap_rank?: number | null;\n market_cap_usd?: number | null;\n aliases?: string[];\n summary: CryptoSearchSummary;\n}\n\nexport interface CryptoSearchResponse {\n query: string;\n count: number;\n period_days: number;\n results: CryptoSearchItem[];\n}\n\nexport interface CryptoCompareResponse {\n period_days: number;\n tokens: CryptoCompareTokenItem[];\n}\n\nexport interface CryptoCompareTokenItem {\n symbol: string;\n name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes: number;\n trend_history?: number[];\n}\n\nexport interface CryptoRawMentionItem extends RedditRawMentionItem {}\n\nexport interface CryptoRawMentionsResponse {\n symbol: string;\n period_days: number;\n count: number;\n results: CryptoRawMentionItem[];\n}\n\nexport interface CryptoMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n total_upvotes: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: CryptoMarketSentimentDriver[];\n}\n\nexport interface CryptoMarketSentimentDriver {\n symbol: string;\n mentions: number;\n buzz_score: number;\n sentiment_score?: number | null;\n}\n\nexport interface CryptoStatsResponse {\n total_mentions: number;\n unique_tokens: number;\n mentions_today?: number;\n unique_tokens_today?: number;\n tokens: string[];\n supported_tokens: number;\n}\n\n// ── Internal HTTP client ────────────────────────────────────────────\n\ntype QueryParams = Record<string, string | number | undefined>;\n\nclass HttpClient {\n private baseUrl: string;\n private apiKey: string;\n private timeout: number;\n\n constructor(baseUrl: string, apiKey: string, timeout: number) {\n this.baseUrl = baseUrl.replace(/\\/+$/, '');\n this.apiKey = apiKey;\n this.timeout = timeout;\n }\n\n async get<T>(path: string, params?: QueryParams): Promise<T> {\n const url = new URL(`${this.baseUrl}${path}`);\n\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'X-API-Key': this.apiKey,\n 'Accept': 'application/json',\n },\n signal: AbortSignal.timeout(this.timeout),\n });\n\n if (!response.ok) {\n let detail: string;\n try {\n const body = await response.json();\n detail = body.detail ?? JSON.stringify(body);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail);\n }\n\n return response.json() as Promise<T>;\n }\n}\n\n// ── Platform namespaces ─────────────────────────────────────────────\n\nclass PlatformNamespace {\n protected http: HttpClient;\n protected prefix: string;\n\n constructor(http: HttpClient, prefix: string) {\n this.http = http;\n this.prefix = prefix;\n }\n\n protected request<T>(path: string, params?: QueryParams): Promise<T> {\n return this.http.get<T>(`${this.prefix}${path}`, params);\n }\n}\n\nexport class RedditNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/reddit/stocks/v1');\n }\n\n /** Get trending stocks on Reddit. */\n async trending(options: TrendingOptions = {}): Promise<TrendingStock[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on Reddit. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<TrendingSector[]> {\n return this.request('/trending/sectors', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on Reddit. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<TrendingCountry[]> {\n return this.request('/trending/countries', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<StockSentiment> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n days: options.days,\n });\n }\n\n /** Get raw Reddit mentions for a specific stock ticker. */\n async mentions(ticker: string, options: RawMentionsOptions = {}): Promise<RedditRawMentionsResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n include_inherited: options.includeInherited?.toString(),\n });\n }\n\n /** Get AI-generated explanation for a stock's trend. */\n async explain(ticker: string): Promise<StockExplanationResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);\n }\n\n /** Search for stocks by name or ticker. */\n async search(query: string, options: SearchOptions = {}): Promise<SearchResponse> {\n return this.request('/search', {\n q: query,\n days: options.days,\n limit: options.limit,\n });\n }\n\n /** Compare multiple stocks side-by-side. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<CompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n days: options.days,\n });\n }\n\n /** Get the service-level Reddit market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<RedditMarketSentiment> {\n return this.request('/market-sentiment', {\n days: options.days,\n });\n }\n\n /** Get Reddit stock data statistics. */\n async stats(): Promise<RedditStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public Reddit stock service health. */\n async health(): Promise<HealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class NewsNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/news/stocks/v1');\n }\n\n /** Get trending stocks from news. */\n async trending(options: NewsTrendingOptions = {}): Promise<NewsTrendingStock[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n source: options.source,\n });\n }\n\n /** Get trending sectors from news. */\n async trendingSectors(options: NewsTrendingGroupOptions = {}): Promise<NewsTrendingSector[]> {\n return this.request('/trending/sectors', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n source: options.source,\n });\n }\n\n /** Get trending countries from news. */\n async trendingCountries(options: NewsTrendingGroupOptions = {}): Promise<NewsTrendingCountry[]> {\n return this.request('/trending/countries', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n source: options.source,\n });\n }\n\n /** Get sentiment for a specific stock ticker from news. */\n async stock(ticker: string, options: StockOptions = {}): Promise<NewsStockSentiment> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n days: options.days,\n });\n }\n\n /** Get raw news mentions for a specific stock ticker. */\n async mentions(ticker: string, options: RawMentionsOptions = {}): Promise<NewsRawMentionsResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get AI-generated explanation for a stock's news trend. */\n async explain(ticker: string): Promise<StockExplanationResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);\n }\n\n /** Search for stocks by name or ticker in news. */\n async search(query: string, options: SearchOptions = {}): Promise<SearchResponse<NewsSearchResultItem>> {\n return this.request('/search', {\n q: query,\n days: options.days,\n limit: options.limit,\n });\n }\n\n /** Compare multiple stocks side-by-side using news sentiment. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<NewsCompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n days: options.days,\n });\n }\n\n /** Get the service-level News market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<NewsMarketSentiment> {\n return this.request('/market-sentiment', {\n days: options.days,\n });\n }\n\n /** Get news data statistics. */\n async stats(): Promise<NewsStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public news service health (no auth required on server side). */\n async health(): Promise<HealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class XNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/x/stocks/v1');\n }\n\n /** Get trending stocks on X/Twitter. */\n async trending(options: TrendingOptions = {}): Promise<XTrendingStock[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on X/Twitter. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<XTrendingSector[]> {\n return this.request('/trending/sectors', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on X/Twitter. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<XTrendingCountry[]> {\n return this.request('/trending/countries', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get X/Twitter sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<XStockDetail> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n days: options.days,\n });\n }\n\n /** Get raw X/Twitter mentions for a specific stock ticker. */\n async mentions(ticker: string, options: RawMentionsOptions = {}): Promise<XRawMentionsResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get AI-generated explanation for a stock's X/Twitter trend. */\n async explain(ticker: string): Promise<StockExplanationResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);\n }\n\n /** Search for stocks by name or ticker on X/Twitter. */\n async search(query: string, options: SearchOptions = {}): Promise<XSearchResponse> {\n return this.request('/search', {\n q: query,\n days: options.days,\n limit: options.limit,\n });\n }\n\n /** Compare multiple stocks side-by-side on X/Twitter. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<XCompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n days: options.days,\n });\n }\n\n /** Get the service-level X/Twitter market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<XMarketSentiment> {\n return this.request('/market-sentiment', {\n days: options.days,\n });\n }\n\n /** Get X/Twitter data statistics. */\n async stats(): Promise<XStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public X/Twitter service health. */\n async health(): Promise<XHealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class PolymarketNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/polymarket/stocks/v1');\n }\n\n /** Get trending stocks on Polymarket. */\n async trending(options: TrendingOptions = {}): Promise<PolymarketTrendingStock[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on Polymarket. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<PolymarketTrendingSector[]> {\n return this.request('/trending/sectors', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on Polymarket. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<PolymarketTrendingCountry[]> {\n return this.request('/trending/countries', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get Polymarket sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<PolymarketStockDetail> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n days: options.days,\n });\n }\n\n /** Get raw Polymarket snapshots for a specific stock ticker. */\n async mentions(ticker: string, options: RawMentionsOptions = {}): Promise<PolymarketRawMentionsResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Search for stocks by name or ticker on Polymarket. */\n async search(query: string, options: SearchOptions = {}): Promise<PolymarketSearchResponse> {\n return this.request('/search', {\n q: query,\n days: options.days,\n limit: options.limit,\n });\n }\n\n /** Compare multiple stocks side-by-side on Polymarket. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<PolymarketCompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n days: options.days,\n });\n }\n\n /** Get the service-level Polymarket market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<PolymarketMarketSentiment> {\n return this.request('/market-sentiment', {\n days: options.days,\n });\n }\n\n /** Get Polymarket data statistics. */\n async stats(): Promise<PolymarketStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public Polymarket service health. */\n async health(): Promise<PolymarketHealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class RedditCryptoNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/reddit/crypto/v1');\n }\n\n /** Get trending crypto tokens on Reddit. */\n async trending(options: TrendingGroupOptions = {}): Promise<CryptoTrendingToken[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get sentiment for a specific crypto token. */\n async token(symbol: string, options: StockOptions = {}): Promise<CryptoTokenSentiment> {\n return this.request(`/token/${encodeURIComponent(symbol)}`, {\n days: options.days,\n });\n }\n\n /** Get raw Reddit mentions for a specific crypto token. */\n async mentions(symbol: string, options: RawMentionsOptions = {}): Promise<CryptoRawMentionsResponse> {\n return this.request(`/token/${encodeURIComponent(symbol)}/mentions`, {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n include_inherited: options.includeInherited?.toString(),\n });\n }\n\n /** Search crypto tokens by symbol, name, or alias. */\n async search(query: string, options: SearchOptions = {}): Promise<CryptoSearchResponse> {\n return this.request('/search', {\n q: query,\n days: options.days,\n limit: options.limit,\n });\n }\n\n /** Compare multiple crypto tokens side-by-side. */\n async compare(symbols: string[], options: CompareOptions = {}): Promise<CryptoCompareResponse> {\n return this.request('/compare', {\n symbols: symbols.join(','),\n days: options.days,\n });\n }\n\n /** Get the service-level Reddit Crypto market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<CryptoMarketSentiment> {\n return this.request('/market-sentiment', {\n days: options.days,\n });\n }\n\n /** Get Reddit crypto data statistics. */\n async stats(): Promise<CryptoStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public Reddit crypto service health. */\n async health(): Promise<CryptoHealthResponse> {\n return this.request('/health');\n }\n}\n\n// ── Client ──────────────────────────────────────────────────────────\n\nexport class AdanosClient {\n readonly news: NewsNamespace;\n readonly reddit: RedditNamespace;\n readonly crypto: RedditCryptoNamespace;\n readonly redditCrypto: RedditCryptoNamespace;\n readonly x: XNamespace;\n readonly polymarket: PolymarketNamespace;\n private readonly http: HttpClient;\n\n /**\n * Create a new Adanos Market Sentiment API client.\n *\n * @param options.apiKey - Your API key (`adanos_api_key_here`).\n * @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.\n * @param options.timeout - Request timeout in ms. Default: 30000.\n */\n constructor(options: ClientOptions) {\n const baseUrl = options.baseUrl ?? 'https://api.adanos.org';\n const timeout = options.timeout ?? 30_000;\n const http = new HttpClient(baseUrl, options.apiKey, timeout);\n this.http = http;\n\n this.news = new NewsNamespace(http);\n this.reddit = new RedditNamespace(http);\n this.crypto = new RedditCryptoNamespace(http);\n this.redditCrypto = this.crypto;\n this.x = new XNamespace(http);\n this.polymarket = new PolymarketNamespace(http);\n }\n\n /** Get aggregate API health across all public market sentiment services. */\n async health(): Promise<RootHealthResponse> {\n return this.http.get('/health');\n }\n}\n\nexport const StockSentimentClient = AdanosClient;\n"],"mappings":";AAgBO,IAAM,sBAAN,cAAkC,MAAM;AAAA,EAC7C,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,WAAN,cAAuB,oBAAoB;AAAA,EAChD;AAAA,EACA;AAAA,EAEA,YAAY,QAAgB,QAAgB;AAC1C,UAAM,GAAG,MAAM,KAAK,MAAM,EAAE;AAC5B,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,SAAS;AAAA,EAChB;AACF;AAq/BA,IAAM,aAAN,MAAiB;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EAER,YAAY,SAAiB,QAAgB,SAAiB;AAC5D,SAAK,UAAU,QAAQ,QAAQ,QAAQ,EAAE;AACzC,SAAK,SAAS;AACd,SAAK,UAAU;AAAA,EACjB;AAAA,EAEA,MAAM,IAAO,MAAc,QAAkC;AAC3D,UAAM,MAAM,IAAI,IAAI,GAAG,KAAK,OAAO,GAAG,IAAI,EAAE;AAE5C,QAAI,QAAQ;AACV,iBAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,MAAM,GAAG;AACjD,YAAI,UAAU,QAAW;AACvB,cAAI,aAAa,IAAI,KAAK,OAAO,KAAK,CAAC;AAAA,QACzC;AAAA,MACF;AAAA,IACF;AAEA,UAAM,WAAW,MAAM,MAAM,IAAI,SAAS,GAAG;AAAA,MAC3C,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,aAAa,KAAK;AAAA,QAClB,UAAU;AAAA,MACZ;AAAA,MACA,QAAQ,YAAY,QAAQ,KAAK,OAAO;AAAA,IAC1C,CAAC;AAED,QAAI,CAAC,SAAS,IAAI;AAChB,UAAI;AACJ,UAAI;AACF,cAAM,OAAO,MAAM,SAAS,KAAK;AACjC,iBAAS,K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EAChD;AAAA;AAAA,EAGA,MAAM,SAAsC;AAC1C,WAAO,KAAK,KAAK,IAAI,SAAS;AAAA,EAChC;AACF;AAEO,IAAM,uBAAuB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Adanos Market Sentiment API — TypeScript SDK\n *\n * Analyze stock sentiment across News, Reddit, X/Twitter, and Polymarket.\n *\n * @example\n * ```ts\n * import { AdanosClient } from 'finance-sentiment';\n *\n * const client = new AdanosClient({ apiKey: 'adanos_api_key_here' });\n * const trending = await client.reddit.trending({ limit: 10 });\n * ```\n */\n\n// ── Errors ──────────────────────────────────────────────────────────\n\nexport class StockSentimentError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'StockSentimentError';\n }\n}\n\nexport class ApiError extends StockSentimentError {\n status: number;\n detail: string;\n\n constructor(status: number, detail: string) {\n super(`${status}: ${detail}`);\n this.name = 'ApiError';\n this.status = status;\n this.detail = detail;\n }\n}\n\n// ── Option types ────────────────────────────────────────────────────\n\nexport interface ClientOptions {\n apiKey: string;\n baseUrl?: string;\n /** Request timeout in milliseconds. Default: 30000 */\n timeout?: number;\n}\n\nexport interface TrendingOptions {\n /** Inclusive UTC start date (`YYYY-MM-DD`). Recommended for explicit periods. */\n from?: string;\n /** Inclusive UTC end date (`YYYY-MM-DD`). Recommended for explicit periods. */\n to?: string;\n /** Legacy period shorthand in days. Do not combine with both `from` and `to`. */\n days?: number;\n /** Max results (1-100). Default: 20. */\n limit?: number;\n /** Pagination offset. Default: 0. */\n offset?: number;\n /** Filter by \"stock\", \"etf\", \"all\", or undefined for all. */\n type?: string;\n}\n\nexport interface TrendingGroupOptions {\n from?: string;\n to?: string;\n /** Legacy period shorthand in days. Do not combine with both `from` and `to`. */\n days?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface StockOptions {\n /** Inclusive UTC start date (`YYYY-MM-DD`). Recommended for explicit periods. */\n from?: string;\n /** Inclusive UTC end date (`YYYY-MM-DD`). Recommended for explicit periods. */\n to?: string;\n /** Legacy period shorthand in days. Do not combine with both `from` and `to`. */\n days?: number;\n}\n\n/** Alias — compare accepts the same options as a single-stock lookup. */\nexport type CompareOptions = StockOptions;\nexport type SearchOptions = Pick<TrendingGroupOptions, 'from' | 'to' | 'days' | 'limit'>;\nexport type MarketSentimentOptions = Pick<TrendingGroupOptions, 'from' | 'to' | 'days'>;\n\nexport interface RawMentionsOptions {\n /** Inclusive UTC start date (`YYYY-MM-DD`). Recommended for raw mention windows. */\n from?: string;\n /** Inclusive UTC end date (`YYYY-MM-DD`). Recommended for raw mention windows. */\n to?: string;\n /** Legacy period shorthand in days. Do not combine with both `from` and `to`. */\n days?: number;\n /** Max raw rows to return. */\n limit?: number;\n /** Pagination offset. Default: 0. */\n offset?: number;\n /** Include inherited Reddit thread context where supported. */\n includeInherited?: boolean;\n}\n\nexport interface NewsSourceOptions {\n /** Optional strict source filter (canonical source id or known alias). */\n source?: string;\n}\n\nexport interface NewsTrendingOptions extends TrendingOptions, NewsSourceOptions {}\nexport interface NewsTrendingGroupOptions extends TrendingGroupOptions, NewsSourceOptions {}\nexport type NewsStockOptions = StockOptions;\nexport type NewsCompareOptions = CompareOptions;\n\n// ── Response types (snake_case — matches API JSON exactly) ──────────\n\n// Reddit response types\n\nexport interface TrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n total_upvotes: number;\n company_name?: string | null;\n trend_history?: number[];\n}\n\nexport interface StockSentiment {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n total_upvotes?: number | null;\n unique_posts?: number | null;\n subreddit_count?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n top_subreddits?: SubredditCount[] | null;\n daily_trend?: DailyTrendItem[] | null;\n top_mentions?: TopMention[] | null;\n}\n\nexport interface SubredditCount {\n subreddit: string;\n count: number;\n}\n\nexport interface DailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface TopMention {\n text_snippet: string;\n sentiment_score: number;\n sentiment_label: string;\n upvotes: number;\n subreddit: string;\n created_utc: string;\n}\n\nexport interface StockExplanationResponse {\n ticker: string;\n company_name?: string | null;\n explanation: string;\n cached: boolean;\n generated_at: string;\n model?: string | null;\n}\n\nexport interface SchedulerStatus {\n running: boolean;\n last_scrape?: string | null;\n scrape_count?: number;\n error_count?: number;\n success_rate?: number | null;\n note?: string | null;\n}\n\nexport interface CryptoSchedulerStatus extends SchedulerStatus {\n timed_out_scrape_threads?: number;\n}\n\nexport interface HealthResponse {\n status: string;\n service?: string | null;\n version?: string | null;\n total_mentions?: number;\n tickers_tracked?: number;\n scheduler?: SchedulerStatus | null;\n error?: string | null;\n}\n\nexport interface CryptoHealthResponse {\n status: string;\n service?: string | null;\n version?: string | null;\n total_mentions?: number;\n tokens_tracked?: number;\n scheduler?: CryptoSchedulerStatus | null;\n error?: string | null;\n}\n\nexport interface XSchedulerStatus {\n running: boolean;\n last_scrape?: string | null;\n scrape_count?: number;\n error_count?: number;\n success_rate?: number;\n note?: string | null;\n}\n\nexport interface XHealthResponse {\n status: string;\n service: string;\n version: string;\n total_mentions: number;\n tickers_tracked: number;\n scheduler?: XSchedulerStatus | null;\n error?: string | null;\n}\n\nexport type PolymarketSchedulerStatus = XSchedulerStatus;\n\nexport interface PolymarketHealthResponse {\n status: string;\n service: string;\n version: string;\n total_mentions: number;\n tickers_tracked: number;\n scheduler?: PolymarketSchedulerStatus | null;\n error?: string | null;\n}\n\nexport interface RootHealthSummary {\n total: number;\n healthy: number;\n unhealthy: number;\n unhealthy_services: string[];\n}\n\nexport interface RootHealthResponse {\n status: string;\n service?: string | null;\n version: string;\n summary: RootHealthSummary;\n services: Record<string, unknown>;\n}\n\nexport interface StatsResponse {\n total_mentions: number;\n unique_tickers: number;\n mentions_today?: number;\n unique_tickers_today?: number;\n supported_tickers: number;\n}\n\nexport type RedditStatsResponse = StatsResponse;\nexport type NewsStatsResponse = StatsResponse;\n\nexport interface StockSearchSummary {\n mentions: number;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n unique_posts: number;\n subreddit_count: number;\n total_upvotes: number;\n}\n\nexport interface SearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases?: string[] | null;\n summary: StockSearchSummary;\n}\n\nexport interface SearchResponse<T = SearchResultItem> {\n query: string;\n count: number;\n period_days: number;\n results: T[];\n}\n\nexport interface CompareResponse {\n period_days: number;\n stocks: CompareStockItem[];\n}\n\nexport interface CompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes: number;\n trend_history: number[];\n}\n\nexport interface MarketSentimentDriver {\n ticker: string;\n buzz_score: number;\n sentiment_score?: number | null;\n mentions: number;\n}\n\nexport interface RedditMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n total_upvotes: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: MarketSentimentDriver[];\n}\n\nexport interface RedditRawMentionItem {\n post_id?: string | null;\n comment_id?: string | null;\n subreddit?: string | null;\n author?: string | null;\n text_snippet: string;\n created_utc: string;\n upvotes: number;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n is_inherited: boolean;\n}\n\nexport interface RedditRawMentionsResponse {\n ticker: string;\n period_days: number;\n count: number;\n results: RedditRawMentionItem[];\n}\n\ninterface TrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n total_upvotes: number;\n top_tickers: string[];\n}\n\nexport interface TrendingSector extends TrendingGroupBase {\n sector: string;\n subreddit_count: number;\n}\n\nexport interface TrendingCountry extends TrendingGroupBase {\n country: string;\n subreddit_count: number;\n}\n\n// News response types\n\nexport interface NewsTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n source_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n company_name?: string | null;\n trend_history?: number[];\n}\n\nexport interface NewsSourceCount {\n source: string;\n count: number;\n}\n\nexport interface NewsTopMention {\n text_snippet: string;\n sentiment_score: number;\n sentiment_label: string;\n source: string;\n created_utc: string;\n}\n\nexport interface NewsSearchSummary {\n mentions: number;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n source_count: number;\n}\n\nexport interface NewsSearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases?: string[] | null;\n summary: NewsSearchSummary;\n}\n\nexport interface NewsStockSentiment {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n source_count?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n top_sources?: NewsSourceCount[] | null;\n daily_trend?: DailyTrendItem[] | null;\n top_mentions?: NewsTopMention[] | null;\n}\n\ninterface NewsTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n source_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n top_tickers: string[];\n}\n\nexport interface NewsTrendingSector extends NewsTrendingGroupBase {\n sector: string;\n}\n\nexport interface NewsTrendingCountry extends NewsTrendingGroupBase {\n country: string;\n}\n\nexport interface NewsCompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n source_count: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n trend_history: number[];\n}\n\nexport interface NewsCompareResponse {\n period_days: number;\n stocks: NewsCompareStockItem[];\n}\n\nexport interface NewsMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_articles: number;\n source_count: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: MarketSentimentDriver[];\n}\n\nexport interface NewsRawMentionItem {\n article_id?: string | null;\n source: string;\n url?: string | null;\n title?: string | null;\n summary?: string | null;\n text_snippet: string;\n author?: string | null;\n created_utc?: string | null;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n}\n\nexport interface NewsRawMentionsResponse {\n ticker: string;\n period_days: number;\n count: number;\n results: NewsRawMentionItem[];\n}\n\n// X/Twitter response types\n\nexport interface XTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: string;\n mentions: number;\n company_name?: string | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes?: number | null;\n unique_tweets?: number | null;\n is_validated: boolean;\n trend_history?: number[];\n}\n\nexport interface XStockDetail {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n total_upvotes?: number | null;\n unique_tweets?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n daily_trend?: XDailyTrendItem[] | null;\n top_tweets?: XTopTweet[] | null;\n is_validated: boolean;\n}\n\nexport interface XDailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: number | null;\n avg_rank?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface XSearchSummary {\n mentions: number;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n unique_tweets: number;\n total_upvotes: number;\n}\n\nexport interface XSearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases?: string[] | null;\n summary: XSearchSummary;\n}\n\nexport type XSearchResponse = SearchResponse<XSearchResultItem>;\n\nexport interface XCompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_tweets: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes: number;\n trend_history?: number[];\n}\n\nexport interface XCompareResponse {\n period_days: number;\n stocks: XCompareStockItem[];\n}\n\nexport interface XTopTweet {\n text_snippet: string;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n likes: number;\n retweets: number;\n views?: number | null;\n author?: string | null;\n created_at?: string | null;\n}\n\ninterface XTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n unique_authors: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes?: number | null;\n top_tickers: string[];\n}\n\nexport interface XTrendingSector extends XTrendingGroupBase {\n sector: string;\n}\n\nexport interface XTrendingCountry extends XTrendingGroupBase {\n country: string;\n}\n\nexport interface XMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_tweets: number;\n unique_authors: number;\n total_upvotes: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: MarketSentimentDriver[];\n}\n\nexport interface XRawMentionItem {\n tweet_id: string;\n author?: string | null;\n text_snippet: string;\n created_utc?: string | null;\n likes: number;\n retweets: number;\n views?: number | null;\n is_reply: boolean;\n parent_tweet_id?: string | null;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n}\n\nexport interface XRawMentionsResponse {\n ticker: string;\n period_days: number;\n count: number;\n results: XRawMentionItem[];\n}\n\nexport type XStatsResponse = StatsResponse;\n\n// Polymarket response types\n\nexport interface PolymarketTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_traders?: number | null;\n bullish_pct: number;\n bearish_pct: number;\n total_liquidity: number;\n company_name?: string | null;\n sentiment_score?: number | null;\n trend_history?: number[];\n}\n\nexport interface PolymarketDailyTrendItem {\n date: string;\n trade_count: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface PolymarketTopMention {\n condition_id: string;\n question: string;\n market_type: string;\n trade_count?: number | null;\n sentiment_score?: number | null;\n yes_price?: number | null;\n no_price?: number | null;\n liquidity: number;\n volume_24h: number;\n end_date?: string | null;\n active: boolean;\n}\n\nexport interface PolymarketStockDetail {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n period_days?: number | null;\n trade_count?: number | null;\n market_count?: number | null;\n current_market_count?: number | null;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_liquidity?: number | null;\n daily_trend?: PolymarketDailyTrendItem[] | null;\n top_mentions?: PolymarketTopMention[] | null;\n}\n\ninterface PolymarketTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_tickers: number;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n bullish_pct: number;\n bearish_pct: number;\n total_liquidity: number;\n top_tickers: string[];\n}\n\nexport interface PolymarketTrendingSector extends PolymarketTrendingGroupBase {\n sector: string;\n}\n\nexport interface PolymarketTrendingCountry extends PolymarketTrendingGroupBase {\n country: string;\n}\n\nexport interface PolymarketCompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_liquidity: number;\n trend_history: number[];\n}\n\nexport interface PolymarketCompareResponse {\n period_days: number;\n stocks: PolymarketCompareStockItem[];\n}\n\nexport interface PolymarketMarketSentimentDriver {\n ticker: string;\n trade_count: number;\n buzz_score: number;\n sentiment_score?: number | null;\n}\n\nexport interface PolymarketMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_traders: number;\n total_liquidity: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: PolymarketMarketSentimentDriver[];\n}\n\nexport interface PolymarketSearchSummary {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n trade_count: number;\n market_count: number;\n current_market_count: number;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_liquidity: number;\n}\n\nexport interface PolymarketSearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases: string[];\n summary: PolymarketSearchSummary;\n}\n\nexport interface PolymarketSearchResponse {\n query: string;\n count: number;\n period_days: number;\n results: PolymarketSearchResultItem[];\n}\n\nexport interface PolymarketRawMentionItem {\n condition_id: string;\n event_id: string;\n market_slug?: string | null;\n question: string;\n market_type: string;\n strike_price?: number | null;\n yes_price?: number | null;\n no_price?: number | null;\n reference_price?: number | null;\n reference_price_timestamp?: string | null;\n liquidity: number;\n volume_24h: number;\n trade_count: number;\n buy_trades: number;\n sell_trades: number;\n unique_traders: number;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n end_date?: string | null;\n active: boolean;\n fetched_at: string;\n}\n\nexport interface PolymarketRawMentionsResponse {\n ticker: string;\n period_days: number;\n count: number;\n results: PolymarketRawMentionItem[];\n}\n\nexport interface PolymarketStatsResponse {\n total_trades: number;\n total_markets: number;\n unique_tickers: number;\n trades_today?: number;\n unique_tickers_today?: number;\n supported_tickers: number;\n}\n\n// Reddit crypto response types\n\nexport interface CryptoTrendingToken {\n symbol: string;\n name?: string | null;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes: number;\n trend_history?: number[];\n}\n\nexport interface CryptoSubredditCount {\n subreddit: string;\n count: number;\n}\n\nexport interface CryptoDailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface CryptoTopMention {\n text_snippet: string;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n upvotes: number;\n subreddit?: string | null;\n created_utc: string;\n}\n\nexport interface CryptoTokenSentiment {\n symbol: string;\n name?: string | null;\n found: boolean;\n buzz_score?: number | null;\n mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n total_upvotes?: number | null;\n unique_posts?: number | null;\n subreddit_count?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n top_subreddits?: CryptoSubredditCount[] | null;\n daily_trend?: CryptoDailyTrendItem[] | null;\n top_mentions?: CryptoTopMention[] | null;\n}\n\nexport interface CryptoSearchSummary {\n mentions: number;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n unique_posts: number;\n subreddit_count: number;\n total_upvotes: number;\n}\n\nexport interface CryptoSearchItem {\n symbol: string;\n name: string;\n market_cap_rank?: number | null;\n market_cap_usd?: number | null;\n aliases?: string[];\n summary: CryptoSearchSummary;\n}\n\nexport interface CryptoSearchResponse {\n query: string;\n count: number;\n period_days: number;\n results: CryptoSearchItem[];\n}\n\nexport interface CryptoCompareResponse {\n period_days: number;\n tokens: CryptoCompareTokenItem[];\n}\n\nexport interface CryptoCompareTokenItem {\n symbol: string;\n name?: string | null;\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes: number;\n trend_history?: number[];\n}\n\nexport interface CryptoRawMentionItem extends RedditRawMentionItem {}\n\nexport interface CryptoRawMentionsResponse {\n symbol: string;\n period_days: number;\n count: number;\n results: CryptoRawMentionItem[];\n}\n\nexport interface CryptoMarketSentiment {\n buzz_score: number;\n trend?: 'rising' | 'falling' | 'stable' | null;\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n total_upvotes: number;\n active_tickers: number;\n sentiment_score?: number | null;\n positive_count: number;\n negative_count: number;\n neutral_count: number;\n bullish_pct: number;\n bearish_pct: number;\n trend_history: number[];\n drivers: CryptoMarketSentimentDriver[];\n}\n\nexport interface CryptoMarketSentimentDriver {\n symbol: string;\n mentions: number;\n buzz_score: number;\n sentiment_score?: number | null;\n}\n\nexport interface CryptoStatsResponse {\n total_mentions: number;\n unique_tokens: number;\n mentions_today?: number;\n unique_tokens_today?: number;\n supported_tokens: number;\n}\n\n// ── Internal HTTP client ────────────────────────────────────────────\n\ntype QueryParams = Record<string, string | number | undefined>;\n\ntype PeriodOptions = {\n from?: string;\n to?: string;\n days?: number;\n};\n\nfunction periodParams(options: PeriodOptions): QueryParams {\n return {\n from: options.from,\n to: options.to,\n days: options.days,\n };\n}\n\nclass HttpClient {\n private baseUrl: string;\n private apiKey: string;\n private timeout: number;\n\n constructor(baseUrl: string, apiKey: string, timeout: number) {\n this.baseUrl = baseUrl.replace(/\\/+$/, '');\n this.apiKey = apiKey;\n this.timeout = timeout;\n }\n\n async get<T>(path: string, params?: QueryParams): Promise<T> {\n const url = new URL(`${this.baseUrl}${path}`);\n\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'X-API-Key': this.apiKey,\n 'Accept': 'application/json',\n },\n signal: AbortSignal.timeout(this.timeout),\n });\n\n if (!response.ok) {\n let detail: string;\n try {\n const body = await response.json();\n detail = body.detail ?? JSON.stringify(body);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail);\n }\n\n return response.json() as Promise<T>;\n }\n}\n\n// ── Platform namespaces ─────────────────────────────────────────────\n\nclass PlatformNamespace {\n protected http: HttpClient;\n protected prefix: string;\n\n constructor(http: HttpClient, prefix: string) {\n this.http = http;\n this.prefix = prefix;\n }\n\n protected request<T>(path: string, params?: QueryParams): Promise<T> {\n return this.http.get<T>(`${this.prefix}${path}`, params);\n }\n}\n\nexport class RedditNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/reddit/stocks/v1');\n }\n\n /** Get trending stocks on Reddit. */\n async trending(options: TrendingOptions = {}): Promise<TrendingStock[]> {\n return this.request('/trending', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on Reddit. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<TrendingSector[]> {\n return this.request('/trending/sectors', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on Reddit. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<TrendingCountry[]> {\n return this.request('/trending/countries', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<StockSentiment> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n ...periodParams(options),\n });\n }\n\n /** Get raw Reddit mentions for a specific stock ticker. */\n async mentions(ticker: string, options: RawMentionsOptions = {}): Promise<RedditRawMentionsResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n include_inherited: options.includeInherited?.toString(),\n });\n }\n\n /** Get AI-generated explanation for a stock's trend. */\n async explain(ticker: string): Promise<StockExplanationResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);\n }\n\n /** Search for stocks by name or ticker. */\n async search(query: string, options: SearchOptions = {}): Promise<SearchResponse> {\n return this.request('/search', {\n q: query,\n ...periodParams(options),\n limit: options.limit,\n });\n }\n\n /** Compare multiple stocks side-by-side. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<CompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n ...periodParams(options),\n });\n }\n\n /** Get the service-level Reddit market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<RedditMarketSentiment> {\n return this.request('/market-sentiment', {\n ...periodParams(options),\n });\n }\n\n /** Get Reddit stock data statistics. */\n async stats(): Promise<RedditStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public Reddit stock service health. */\n async health(): Promise<HealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class NewsNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/news/stocks/v1');\n }\n\n /** Get trending stocks from news. */\n async trending(options: NewsTrendingOptions = {}): Promise<NewsTrendingStock[]> {\n return this.request('/trending', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n source: options.source,\n });\n }\n\n /** Get trending sectors from news. */\n async trendingSectors(options: NewsTrendingGroupOptions = {}): Promise<NewsTrendingSector[]> {\n return this.request('/trending/sectors', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n source: options.source,\n });\n }\n\n /** Get trending countries from news. */\n async trendingCountries(options: NewsTrendingGroupOptions = {}): Promise<NewsTrendingCountry[]> {\n return this.request('/trending/countries', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n source: options.source,\n });\n }\n\n /** Get sentiment for a specific stock ticker from news. */\n async stock(ticker: string, options: StockOptions = {}): Promise<NewsStockSentiment> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n ...periodParams(options),\n });\n }\n\n /** Get raw news mentions for a specific stock ticker. */\n async mentions(ticker: string, options: RawMentionsOptions = {}): Promise<NewsRawMentionsResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get AI-generated explanation for a stock's news trend. */\n async explain(ticker: string): Promise<StockExplanationResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);\n }\n\n /** Search for stocks by name or ticker in news. */\n async search(query: string, options: SearchOptions = {}): Promise<SearchResponse<NewsSearchResultItem>> {\n return this.request('/search', {\n q: query,\n ...periodParams(options),\n limit: options.limit,\n });\n }\n\n /** Compare multiple stocks side-by-side using news sentiment. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<NewsCompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n ...periodParams(options),\n });\n }\n\n /** Get the service-level News market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<NewsMarketSentiment> {\n return this.request('/market-sentiment', {\n ...periodParams(options),\n });\n }\n\n /** Get news data statistics. */\n async stats(): Promise<NewsStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public news service health (no auth required on server side). */\n async health(): Promise<HealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class XNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/x/stocks/v1');\n }\n\n /** Get trending stocks on X/Twitter. */\n async trending(options: TrendingOptions = {}): Promise<XTrendingStock[]> {\n return this.request('/trending', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on X/Twitter. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<XTrendingSector[]> {\n return this.request('/trending/sectors', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on X/Twitter. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<XTrendingCountry[]> {\n return this.request('/trending/countries', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get X/Twitter sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<XStockDetail> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n ...periodParams(options),\n });\n }\n\n /** Get raw X/Twitter mentions for a specific stock ticker. */\n async mentions(ticker: string, options: RawMentionsOptions = {}): Promise<XRawMentionsResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get AI-generated explanation for a stock's X/Twitter trend. */\n async explain(ticker: string): Promise<StockExplanationResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);\n }\n\n /** Search for stocks by name or ticker on X/Twitter. */\n async search(query: string, options: SearchOptions = {}): Promise<XSearchResponse> {\n return this.request('/search', {\n q: query,\n ...periodParams(options),\n limit: options.limit,\n });\n }\n\n /** Compare multiple stocks side-by-side on X/Twitter. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<XCompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n ...periodParams(options),\n });\n }\n\n /** Get the service-level X/Twitter market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<XMarketSentiment> {\n return this.request('/market-sentiment', {\n ...periodParams(options),\n });\n }\n\n /** Get X/Twitter data statistics. */\n async stats(): Promise<XStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public X/Twitter service health. */\n async health(): Promise<XHealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class PolymarketNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/polymarket/stocks/v1');\n }\n\n /** Get trending stocks on Polymarket. */\n async trending(options: TrendingOptions = {}): Promise<PolymarketTrendingStock[]> {\n return this.request('/trending', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on Polymarket. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<PolymarketTrendingSector[]> {\n return this.request('/trending/sectors', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on Polymarket. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<PolymarketTrendingCountry[]> {\n return this.request('/trending/countries', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get Polymarket sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<PolymarketStockDetail> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n ...periodParams(options),\n });\n }\n\n /** Get raw Polymarket snapshots for a specific stock ticker. */\n async mentions(ticker: string, options: RawMentionsOptions = {}): Promise<PolymarketRawMentionsResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/mentions`, {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Search for stocks by name or ticker on Polymarket. */\n async search(query: string, options: SearchOptions = {}): Promise<PolymarketSearchResponse> {\n return this.request('/search', {\n q: query,\n ...periodParams(options),\n limit: options.limit,\n });\n }\n\n /** Compare multiple stocks side-by-side on Polymarket. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<PolymarketCompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n ...periodParams(options),\n });\n }\n\n /** Get the service-level Polymarket market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<PolymarketMarketSentiment> {\n return this.request('/market-sentiment', {\n ...periodParams(options),\n });\n }\n\n /** Get Polymarket data statistics. */\n async stats(): Promise<PolymarketStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public Polymarket service health. */\n async health(): Promise<PolymarketHealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class RedditCryptoNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/reddit/crypto/v1');\n }\n\n /** Get trending crypto tokens on Reddit. */\n async trending(options: TrendingGroupOptions = {}): Promise<CryptoTrendingToken[]> {\n return this.request('/trending', {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get sentiment for a specific crypto token. */\n async token(symbol: string, options: StockOptions = {}): Promise<CryptoTokenSentiment> {\n return this.request(`/token/${encodeURIComponent(symbol)}`, {\n ...periodParams(options),\n });\n }\n\n /** Get raw Reddit mentions for a specific crypto token. */\n async mentions(symbol: string, options: RawMentionsOptions = {}): Promise<CryptoRawMentionsResponse> {\n return this.request(`/token/${encodeURIComponent(symbol)}/mentions`, {\n ...periodParams(options),\n limit: options.limit,\n offset: options.offset,\n include_inherited: options.includeInherited?.toString(),\n });\n }\n\n /** Search crypto tokens by symbol, name, or alias. */\n async search(query: string, options: SearchOptions = {}): Promise<CryptoSearchResponse> {\n return this.request('/search', {\n q: query,\n ...periodParams(options),\n limit: options.limit,\n });\n }\n\n /** Compare multiple crypto tokens side-by-side. */\n async compare(symbols: string[], options: CompareOptions = {}): Promise<CryptoCompareResponse> {\n return this.request('/compare', {\n symbols: symbols.join(','),\n ...periodParams(options),\n });\n }\n\n /** Get the service-level Reddit Crypto market sentiment snapshot. */\n async marketSentiment(options: MarketSentimentOptions = {}): Promise<CryptoMarketSentiment> {\n return this.request('/market-sentiment', {\n ...periodParams(options),\n });\n }\n\n /** Get Reddit crypto data statistics. */\n async stats(): Promise<CryptoStatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public Reddit crypto service health. */\n async health(): Promise<CryptoHealthResponse> {\n return this.request('/health');\n }\n}\n\n// ── Client ──────────────────────────────────────────────────────────\n\nexport class AdanosClient {\n readonly news: NewsNamespace;\n readonly reddit: RedditNamespace;\n readonly crypto: RedditCryptoNamespace;\n readonly redditCrypto: RedditCryptoNamespace;\n readonly x: XNamespace;\n readonly polymarket: PolymarketNamespace;\n private readonly http: HttpClient;\n\n /**\n * Create a new Adanos Market Sentiment API client.\n *\n * @param options.apiKey - Your API key (`adanos_api_key_here`).\n * @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.\n * @param options.timeout - Request timeout in ms. Default: 30000.\n */\n constructor(options: ClientOptions) {\n const baseUrl = options.baseUrl ?? 'https://api.adanos.org';\n const timeout = options.timeout ?? 30_000;\n const http = new HttpClient(baseUrl, options.apiKey, timeout);\n this.http = http;\n\n this.news = new NewsNamespace(http);\n this.reddit = new RedditNamespace(http);\n this.crypto = new RedditCryptoNamespace(http);\n this.redditCrypto = this.crypto;\n this.x = new XNamespace(http);\n this.polymarket = new PolymarketNamespace(http);\n }\n\n /** Get aggregate API health across all public market sentiment services. */\n async health(): Promise<RootHealthResponse> {\n return this.http.get('/health');\n }\n}\n\nexport const StockSentimentClient = AdanosClient;\n"],"mappings":";AAgBO,IAAM,sBAAN,cAAkC,MAAM;AAAA,EA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,IAAI,gBAAgB,IAAI;AACtC,SAAK,SAAS,IAAI,sBAAsB,IAAI;AAC5C,SAAK,eAAe,KAAK;AACzB,SAAK,IAAI,IAAI,WAAW,IAAI;AAC5B,SAAK,aAAa,IAAI,oBAAoB,IAAI;AAAA,EAChD;AAAA;AAAA,EAGA,MAAM,SAAsC;AAC1C,WAAO,KAAK,KAAK,IAAI,SAAS;AAAA,EAChC;AACF;AAEO,IAAM,uBAAuB;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "finance-sentiment",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "TypeScript SDK for the Adanos Market Sentiment API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",