finance-sentiment 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/finance-sentiment.svg)](https://www.npmjs.com/package/finance-sentiment)
4
4
 
5
- `finance-sentiment` is the public TypeScript SDK for the [Adanos Market Sentiment API](https://api.adanos.org/docs).
5
+ `finance-sentiment` is the public TypeScript SDK for the [Adanos Market Sentiment API](https://api.adanos.com/docs).
6
6
 
7
7
  It gives you typed access to:
8
8
  - Reddit stock sentiment
@@ -15,8 +15,8 @@ It gives you typed access to:
15
15
  Links:
16
16
  - Source: https://github.com/adanos-software/adanos-ts-sdk
17
17
  - npm: https://www.npmjs.com/package/finance-sentiment
18
- - API docs: https://api.adanos.org/docs
19
- - Homepage: https://adanos.org
18
+ - API docs: https://api.adanos.com/docs
19
+ - Homepage: https://adanos.com
20
20
 
21
21
  Package and import:
22
22
  - npm package: `finance-sentiment`
@@ -167,7 +167,11 @@ Polymarket semantics:
167
167
  - `buzz_score` is activity-first and optimized for current market attention
168
168
  - `total_liquidity` is a windowed signal over the selected period
169
169
  - `current_market_count` is the live-only active-market breadth; `market_count` remains the selected-window breadth
170
- - `top_mentions` on `stock()` are relevance-sorted by trading activity first
170
+ - `unique_traders` can be `null` when retained wallet-level trades do not fully cover the requested window
171
+ - `pulse` on `stock()` provides a compact current interpretation; use its evidence and warnings as data-quality context
172
+ - `top_mentions` on `stock()` are representative sentiment evidence, with directional markets prioritized
173
+
174
+ Across platforms, each `trend_history` value represents its own UTC calendar day. The final value for a live window describes the current partial UTC day and is not expected to equal the top-level period `buzz_score`.
171
175
 
172
176
  ## Available Methods
173
177
 
@@ -259,7 +263,19 @@ Period options: use `from` and `to` as `YYYY-MM-DD` inclusive UTC dates for repr
259
263
 
260
264
  | Method | Description |
261
265
  |--------|-------------|
262
- | `analyze(text)` | Analyze one finance or trading text. Requires a Professional account. |
266
+ | `analyze(text, { target })` | Analyze financial text, optionally for a company name or ticker. Requires a Professional account. |
267
+
268
+ `target` is optional and nullable, with a maximum length of 100 characters. The company should appear in the text. A company name works best.
269
+
270
+ ```typescript
271
+ const result = await client.sentiment.analyze(
272
+ "Goldman Sachs cuts Apple price target",
273
+ { target: "Apple" },
274
+ );
275
+ console.log(result.components.model_score);
276
+ ```
277
+
278
+ `components.model_score` is optional and nullable. It contains the raw model score. `sentiment_score` uses the shared sentiment scale. The legacy component fields remain available and are deprecated.
263
279
 
264
280
  ## Error Handling
265
281
 
@@ -281,18 +297,24 @@ try {
281
297
 
282
298
  ## Authentication and Configuration
283
299
 
284
- Get your API key at [adanos.org](https://adanos.org).
300
+ Get your API key at [adanos.com](https://adanos.com).
285
301
 
286
302
  ```typescript
287
303
  import { AdanosClient } from "finance-sentiment";
288
304
 
289
305
  const client = new AdanosClient({
290
306
  apiKey: "adanos_api_key_here",
291
- baseUrl: "https://api.adanos.org",
307
+ baseUrl: "https://api.adanos.com",
292
308
  timeout: 60_000,
293
309
  });
294
310
  ```
295
311
 
312
+ The default host is `https://api.adanos.com` for API `1.54.0`. You can keep an explicit `https://api.adanos.org` base URL or a custom gateway URL. Endpoint paths and authentication stay the same.
313
+
314
+ News stock methods accept a single company ticker, including an exchange suffix such as `ABX.DE`. A valid unknown ticker returns HTTP 404. Compare preserves zero-mention company rows. Metadata such as exchange or sector can be empty. Raw `created_utc` timestamps are UTC strings ending in `Z`. Reddit Crypto upvote totals can be negative.
315
+
316
+ Contributor metrics expose `mentions`, nullable `sentiment_score`, and nullable `buzz_score`. The `count` alias remains available and is deprecated. Sector and country results expose daily `trend_history`. Polymarket top mentions expose nullable `buzz_score`.
317
+
296
318
  ## Rate Limits
297
319
 
298
320
  | Tier | Monthly Requests | Burst Limit |
package/dist/index.cjs CHANGED
@@ -540,8 +540,8 @@ var SentimentNamespace = class {
540
540
  this.http = http;
541
541
  }
542
542
  /** Analyze one finance or trading text with the direct Finance Sentiment API. */
543
- async analyze(text) {
544
- return this.http.post("/sentiment/v1/analyze", { text });
543
+ async analyze(text, options = {}) {
544
+ return this.http.post("/sentiment/v1/analyze", { text, target: options.target });
545
545
  }
546
546
  };
547
547
  var AdanosClient = class {
@@ -557,11 +557,11 @@ var AdanosClient = class {
557
557
  * Create a new Adanos Market Sentiment API client.
558
558
  *
559
559
  * @param options.apiKey - Your API key (`adanos_api_key_here`).
560
- * @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.
560
+ * @param options.baseUrl - API base URL. Default: `https://api.adanos.com`.
561
561
  * @param options.timeout - Request timeout in ms. Default: 30000.
562
562
  */
563
563
  constructor(options) {
564
- const baseUrl = options.baseUrl ?? "https://api.adanos.org";
564
+ const baseUrl = options.baseUrl ?? "https://api.adanos.com";
565
565
  const timeout = options.timeout ?? 3e4;
566
566
  const http = new HttpClient(baseUrl, options.apiKey, timeout);
567
567
  this.http = http;
@@ -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({ 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 payload?: unknown;\n\n constructor(status: number, detail: string, payload?: unknown) {\n super(`${status}: ${detail}`);\n this.name = 'ApiError';\n this.status = status;\n this.detail = detail;\n this.payload = payload;\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, '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\nexport interface InvalidPeriodErrorDetail {\n error: string;\n message: string;\n period_from?: string | null;\n available_since?: string | null;\n platform?: string | null;\n}\n\nexport interface InvalidPeriodErrorResponse {\n detail: InvalidPeriodErrorDetail;\n}\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}\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}\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 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 top_authors?: XTopAuthor[] | null;\n}\n\nexport interface XDailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: 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}\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\nexport interface XTopAuthor {\n author: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. Kept while the API still returns the alias. */\n count: number;\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 market_status?: string | null;\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 sentiment_score?: number | null;\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 market_status?: string | null;\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 open_markets_current?: number;\n open_tickers_current?: number;\n traded_markets_today?: number;\n traded_tickers_today?: number;\n trades_today?: number;\n supported_tickers: number;\n}\n\nexport interface SentimentPhraseMatch {\n phrase: string;\n score: number;\n}\n\nexport interface SentimentComponents {\n engine_version: string;\n vader_compound?: number | null;\n roberta_score?: number | null;\n emoji_score: number;\n phrase_adjustment: number;\n phrase_matches: SentimentPhraseMatch[];\n contextual_finance_matches: string[];\n}\n\nexport interface SentimentAnalyzeResponse {\n text: string;\n sentiment_score: number;\n sentiment_label: 'positive' | 'neutral' | 'negative';\n components: SentimentComponents;\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}\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 isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction formatValidationLocation(loc: unknown): string {\n if (Array.isArray(loc)) {\n return loc.map(String).join('.');\n }\n return loc === undefined || loc === null ? '' : String(loc);\n}\n\nfunction formatErrorDetail(detail: unknown): string {\n if (typeof detail === 'string' && detail.trim()) {\n return detail.trim();\n }\n\n if (Array.isArray(detail)) {\n const messages = detail\n .map((item) => {\n if (!isRecord(item)) return null;\n const message = item.msg ?? item.message ?? item.error;\n if (typeof message !== 'string' || !message.trim()) return null;\n const location = formatValidationLocation(item.loc);\n return location ? `${location}: ${message.trim()}` : message.trim();\n })\n .filter((message): message is string => Boolean(message));\n if (messages.length > 0) {\n return messages.join('; ');\n }\n }\n\n if (isRecord(detail)) {\n for (const key of ['message', 'error', 'detail']) {\n const value = detail[key];\n if (typeof value === 'string' && value.trim()) {\n return value.trim();\n }\n }\n }\n\n return JSON.stringify(detail);\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 let payload: unknown;\n try {\n payload = await response.json();\n detail = isRecord(payload) && 'detail' in payload\n ? formatErrorDetail(payload.detail)\n : JSON.stringify(payload);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail, payload);\n }\n\n return response.json() as Promise<T>;\n }\n\n async post<T>(path: string, body: unknown): Promise<T> {\n const url = new URL(`${this.baseUrl}${path}`);\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'X-API-Key': this.apiKey,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n signal: AbortSignal.timeout(this.timeout),\n });\n\n if (!response.ok) {\n let detail: string;\n let payload: unknown;\n try {\n payload = await response.json();\n detail = isRecord(payload) && 'detail' in payload\n ? formatErrorDetail(payload.detail)\n : JSON.stringify(payload);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail, payload);\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 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 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 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 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 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\nexport class SentimentNamespace {\n private http: HttpClient;\n\n /** @internal */\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** Analyze one finance or trading text with the direct Finance Sentiment API. */\n async analyze(text: string): Promise<SentimentAnalyzeResponse> {\n return this.http.post('/sentiment/v1/analyze', { text });\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 readonly sentiment: SentimentNamespace;\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 this.sentiment = new SentimentNamespace(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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,EACA;AAAA,EAEA,YAAY,QAAgB,QAAgB,SAAmB;AAC7D,UAAM,GAAG,MAAM,KAAK,MAAM,EAAE;AAC5B,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,SAAS;AACd,SAAK,UAAU;AAAA,EACjB;AACF;AAmhCA,SAAS,SAAS,OAAkD;AAClE,SAAO,OAA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MAAiD;AAC7D,WAAO,KAAK,KAAK,KAAK,yBAAyB,EAAE,KAAK,CAAC;AAAA,EACzD;AACF;AAIO,IAAM,eAAN,MAAmB;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASjB,YAAY,SAAwB;AAClC,UAAM,UAAU,QAAQ,WAAW;AACnC,UAAM,UAAU,QAAQ,WAAW;AACnC,UAAM,OAAO,IAAI,WAAW,SAAS,QAAQ,QAAQ,OAAO;AAC5D,SAAK,OAAO;AAEZ,SAAK,OAAO,IAAI,cAAc,IAAI;AAClC,SAAK,SAAS,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;AAC9C,SAAK,YAAY,IAAI,mBAAmB,IAAI;AAAA,EAC9C;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 payload?: unknown;\n\n constructor(status: number, detail: string, payload?: unknown) {\n super(`${status}: ${detail}`);\n this.name = 'ApiError';\n this.status = status;\n this.detail = detail;\n this.payload = payload;\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, '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 SentimentAnalyzeOptions {\n /** Company name or ticker to judge the text for. Maximum 100 characters. */\n target?: string | null;\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\nexport interface InvalidPeriodErrorDetail {\n error: string;\n message: string;\n field?: string | null;\n value?: string | number | null;\n today?: string | null;\n period_from?: string | null;\n period_to?: string | null;\n available_since?: string | null;\n retention_from?: string | null;\n requested_days?: number | null;\n max_days?: number | null;\n platform?: string | null;\n}\n\nexport interface InvalidPeriodErrorResponse {\n detail: InvalidPeriodErrorDetail;\n}\n\nexport interface CompareLimitErrorDetail {\n error: string;\n message: string;\n max_items: number;\n item_name: string;\n}\n\nexport interface CompareLimitErrorResponse {\n detail: CompareLimitErrorDetail;\n}\n\nexport interface UnsupportedAssetErrorDetail {\n error_code: string;\n message: string;\n}\n\nexport interface UnsupportedAssetErrorResponse {\n detail: UnsupportedAssetErrorDetail;\n}\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 mentions?: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. */\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 bullish_pct?: number | null;\n bearish_pct?: 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}\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 trend_history?: number[];\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 mentions?: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. */\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}\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 trend_history?: number[];\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: 'rising' | 'falling' | 'stable';\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 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 top_authors?: XTopAuthor[] | null;\n}\n\nexport interface XDailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: 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}\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\nexport interface XTopAuthor {\n author: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. Kept while the API still returns the alias. */\n count: number;\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 trend_history?: number[];\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 bullish_pct?: number | null;\n bearish_pct?: number | null;\n}\n\nexport interface PolymarketPulseEvidence {\n directional_coverage?: number | null;\n traded_market_pct?: number | null;\n zero_trade_market_pct?: number | null;\n avg_spread?: number | null;\n snapshot_at?: string | null;\n}\n\nexport interface PolymarketTickerPulse {\n mood: 'bullish' | 'bearish' | 'mixed' | 'event_driven' | 'illiquid' | 'unclear';\n confidence: number;\n thin_data: boolean;\n why: string[];\n warnings?: string[];\n evidence: PolymarketPulseEvidence;\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 buzz_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 market_status?: string | null;\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 pulse?: PolymarketTickerPulse | 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 trend_history?: number[];\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 | null;\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 sentiment_score?: number | null;\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 market_status?: string | null;\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 open_markets_current?: number;\n open_tickers_current?: number;\n traded_markets_today?: number;\n traded_tickers_today?: number;\n trades_today?: number;\n supported_tickers: number;\n}\n\nexport interface SentimentPhraseMatch {\n phrase: string;\n score: number;\n}\n\nexport interface SentimentComponents {\n engine_version: string;\n model_score?: number | null;\n /** @deprecated Engine 5.5 returns null. */\n vader_compound?: number | null;\n /** @deprecated Engine 5.5 returns null. Use `model_score` instead. */\n roberta_score?: number | null;\n /** @deprecated Engine 5.5 returns zero. */\n emoji_score: number;\n /** @deprecated Engine 5.5 returns zero. */\n phrase_adjustment: number;\n /** @deprecated Engine 5.5 returns an empty array. */\n phrase_matches: SentimentPhraseMatch[];\n /** @deprecated Engine 5.5 returns an empty array. */\n contextual_finance_matches: string[];\n}\n\nexport interface SentimentAnalyzeResponse {\n text: string;\n sentiment_score: number;\n sentiment_label: 'positive' | 'neutral' | 'negative';\n components: SentimentComponents;\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 mentions?: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. */\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 bullish_pct?: number | null;\n bearish_pct?: 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}\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 isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction formatValidationLocation(loc: unknown): string {\n if (Array.isArray(loc)) {\n return loc.map(String).join('.');\n }\n return loc === undefined || loc === null ? '' : String(loc);\n}\n\nfunction formatErrorDetail(detail: unknown): string {\n if (typeof detail === 'string' && detail.trim()) {\n return detail.trim();\n }\n\n if (Array.isArray(detail)) {\n const messages = detail\n .map((item) => {\n if (!isRecord(item)) return null;\n const message = item.msg ?? item.message ?? item.error;\n if (typeof message !== 'string' || !message.trim()) return null;\n const location = formatValidationLocation(item.loc);\n return location ? `${location}: ${message.trim()}` : message.trim();\n })\n .filter((message): message is string => Boolean(message));\n if (messages.length > 0) {\n return messages.join('; ');\n }\n }\n\n if (isRecord(detail)) {\n for (const key of ['message', 'error', 'detail']) {\n const value = detail[key];\n if (typeof value === 'string' && value.trim()) {\n return value.trim();\n }\n }\n }\n\n return JSON.stringify(detail);\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 let payload: unknown;\n try {\n payload = await response.json();\n detail = isRecord(payload) && 'detail' in payload\n ? formatErrorDetail(payload.detail)\n : JSON.stringify(payload);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail, payload);\n }\n\n return response.json() as Promise<T>;\n }\n\n async post<T>(path: string, body: unknown): Promise<T> {\n const url = new URL(`${this.baseUrl}${path}`);\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'X-API-Key': this.apiKey,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n signal: AbortSignal.timeout(this.timeout),\n });\n\n if (!response.ok) {\n let detail: string;\n let payload: unknown;\n try {\n payload = await response.json();\n detail = isRecord(payload) && 'detail' in payload\n ? formatErrorDetail(payload.detail)\n : JSON.stringify(payload);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail, payload);\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 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 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 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 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 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\nexport class SentimentNamespace {\n private http: HttpClient;\n\n /** @internal */\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** Analyze one finance or trading text with the direct Finance Sentiment API. */\n async analyze(text: string, options: SentimentAnalyzeOptions = {}): Promise<SentimentAnalyzeResponse> {\n return this.http.post('/sentiment/v1/analyze', { text, target: options.target });\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 readonly sentiment: SentimentNamespace;\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.com`.\n * @param options.timeout - Request timeout in ms. Default: 30000.\n */\n constructor(options: ClientOptions) {\n const baseUrl = options.baseUrl ?? 'https://api.adanos.com';\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 this.sentiment = new SentimentNamespace(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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,IAAM,sBAAN,cAAkC,MAAM;AAAA,EAC7C,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;A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AAAA,EAGA,MAAM,QAAsC;AAC1C,WAAO,KAAK,QAAQ,QAAQ;AAAA,EAC9B;AAAA;AAAA,EAGA,MAAM,SAAwC;AAC5C,WAAO,KAAK,QAAQ,SAAS;AAAA,EAC/B;AACF;AAEO,IAAM,qBAAN,MAAyB;AAAA,EACtB;AAAA;AAAA,EAGR,YAAY,MAAkB;AAC5B,SAAK,OAAO;AAAA,EACd;AAAA;AAAA,EAGA,MAAM,QAAQ,MAAc,UAAmC,CAAC,GAAsC;AACpG,WAAO,KAAK,KAAK,KAAK,yBAAyB,EAAE,MAAM,QAAQ,QAAQ,OAAO,CAAC;AAAA,EACjF;AACF;AAIO,IAAM,eAAN,MAAmB;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASjB,YAAY,SAAwB;AAClC,UAAM,UAAU,QAAQ,WAAW;AACnC,UAAM,UAAU,QAAQ,WAAW;AACnC,UAAM,OAAO,IAAI,WAAW,SAAS,QAAQ,QAAQ,OAAO;AAC5D,SAAK,OAAO;AAEZ,SAAK,OAAO,IAAI,cAAc,IAAI;AAClC,SAAK,SAAS,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;AAC9C,SAAK,YAAY,IAAI,mBAAmB,IAAI;AAAA,EAC9C;AAAA;AAAA,EAGA,MAAM,SAAsC;AAC1C,WAAO,KAAK,KAAK,IAAI,SAAS;AAAA,EAChC;AACF;AAEO,IAAM,uBAAuB;","names":[]}
package/dist/index.d.cts CHANGED
@@ -74,6 +74,10 @@ interface RawMentionsOptions {
74
74
  /** Include inherited Reddit thread context where supported. */
75
75
  includeInherited?: boolean;
76
76
  }
77
+ interface SentimentAnalyzeOptions {
78
+ /** Company name or ticker to judge the text for. Maximum 100 characters. */
79
+ target?: string | null;
80
+ }
77
81
  interface NewsSourceOptions {
78
82
  /** Optional strict source filter (canonical source id or known alias). */
79
83
  source?: string;
@@ -87,13 +91,36 @@ type NewsCompareOptions = CompareOptions;
87
91
  interface InvalidPeriodErrorDetail {
88
92
  error: string;
89
93
  message: string;
94
+ field?: string | null;
95
+ value?: string | number | null;
96
+ today?: string | null;
90
97
  period_from?: string | null;
98
+ period_to?: string | null;
91
99
  available_since?: string | null;
100
+ retention_from?: string | null;
101
+ requested_days?: number | null;
102
+ max_days?: number | null;
92
103
  platform?: string | null;
93
104
  }
94
105
  interface InvalidPeriodErrorResponse {
95
106
  detail: InvalidPeriodErrorDetail;
96
107
  }
108
+ interface CompareLimitErrorDetail {
109
+ error: string;
110
+ message: string;
111
+ max_items: number;
112
+ item_name: string;
113
+ }
114
+ interface CompareLimitErrorResponse {
115
+ detail: CompareLimitErrorDetail;
116
+ }
117
+ interface UnsupportedAssetErrorDetail {
118
+ error_code: string;
119
+ message: string;
120
+ }
121
+ interface UnsupportedAssetErrorResponse {
122
+ detail: UnsupportedAssetErrorDetail;
123
+ }
97
124
  interface TrendingStock {
98
125
  ticker: string;
99
126
  buzz_score: number;
@@ -131,6 +158,10 @@ interface StockSentiment {
131
158
  }
132
159
  interface SubredditCount {
133
160
  subreddit: string;
161
+ mentions?: number;
162
+ sentiment_score?: number | null;
163
+ buzz_score?: number | null;
164
+ /** @deprecated Use `mentions` instead. */
134
165
  count: number;
135
166
  }
136
167
  interface DailyTrendItem {
@@ -138,6 +169,8 @@ interface DailyTrendItem {
138
169
  mentions: number;
139
170
  sentiment_score?: number | null;
140
171
  buzz_score?: number | null;
172
+ bullish_pct?: number | null;
173
+ bearish_pct?: number | null;
141
174
  }
142
175
  interface TopMention {
143
176
  text_snippet: string;
@@ -324,6 +357,7 @@ interface TrendingGroupBase {
324
357
  bearish_pct: number;
325
358
  total_upvotes: number;
326
359
  top_tickers: string[];
360
+ trend_history?: number[];
327
361
  }
328
362
  interface TrendingSector extends TrendingGroupBase {
329
363
  sector: string;
@@ -347,6 +381,10 @@ interface NewsTrendingStock {
347
381
  }
348
382
  interface NewsSourceCount {
349
383
  source: string;
384
+ mentions?: number;
385
+ sentiment_score?: number | null;
386
+ buzz_score?: number | null;
387
+ /** @deprecated Use `mentions` instead. */
350
388
  count: number;
351
389
  }
352
390
  interface NewsTopMention {
@@ -401,6 +439,7 @@ interface NewsTrendingGroupBase {
401
439
  bullish_pct: number;
402
440
  bearish_pct: number;
403
441
  top_tickers: string[];
442
+ trend_history?: number[];
404
443
  }
405
444
  interface NewsTrendingSector extends NewsTrendingGroupBase {
406
445
  sector: string;
@@ -461,7 +500,7 @@ interface NewsRawMentionsResponse {
461
500
  interface XTrendingStock {
462
501
  ticker: string;
463
502
  buzz_score: number;
464
- trend: string;
503
+ trend: 'rising' | 'falling' | 'stable';
465
504
  mentions: number;
466
505
  company_name?: string | null;
467
506
  sentiment_score?: number | null;
@@ -496,6 +535,8 @@ interface XDailyTrendItem {
496
535
  mentions: number;
497
536
  sentiment_score?: number | null;
498
537
  buzz_score?: number | null;
538
+ bullish_pct?: number | null;
539
+ bearish_pct?: number | null;
499
540
  }
500
541
  interface XSearchSummary {
501
542
  mentions: number;
@@ -560,6 +601,7 @@ interface XTrendingGroupBase {
560
601
  bearish_pct?: number | null;
561
602
  total_upvotes?: number | null;
562
603
  top_tickers: string[];
604
+ trend_history?: number[];
563
605
  }
564
606
  interface XTrendingSector extends XTrendingGroupBase {
565
607
  sector: string;
@@ -624,6 +666,23 @@ interface PolymarketDailyTrendItem {
624
666
  trade_count: number;
625
667
  sentiment_score?: number | null;
626
668
  buzz_score?: number | null;
669
+ bullish_pct?: number | null;
670
+ bearish_pct?: number | null;
671
+ }
672
+ interface PolymarketPulseEvidence {
673
+ directional_coverage?: number | null;
674
+ traded_market_pct?: number | null;
675
+ zero_trade_market_pct?: number | null;
676
+ avg_spread?: number | null;
677
+ snapshot_at?: string | null;
678
+ }
679
+ interface PolymarketTickerPulse {
680
+ mood: 'bullish' | 'bearish' | 'mixed' | 'event_driven' | 'illiquid' | 'unclear';
681
+ confidence: number;
682
+ thin_data: boolean;
683
+ why: string[];
684
+ warnings?: string[];
685
+ evidence: PolymarketPulseEvidence;
627
686
  }
628
687
  interface PolymarketTopMention {
629
688
  condition_id: string;
@@ -631,6 +690,7 @@ interface PolymarketTopMention {
631
690
  market_type: string;
632
691
  trade_count?: number | null;
633
692
  sentiment_score?: number | null;
693
+ buzz_score?: number | null;
634
694
  yes_price?: number | null;
635
695
  no_price?: number | null;
636
696
  liquidity: number;
@@ -659,6 +719,7 @@ interface PolymarketStockDetail {
659
719
  total_liquidity?: number | null;
660
720
  daily_trend?: PolymarketDailyTrendItem[] | null;
661
721
  top_mentions?: PolymarketTopMention[] | null;
722
+ pulse?: PolymarketTickerPulse | null;
662
723
  }
663
724
  interface PolymarketTrendingGroupBase {
664
725
  buzz_score: number;
@@ -673,6 +734,7 @@ interface PolymarketTrendingGroupBase {
673
734
  bearish_pct: number;
674
735
  total_liquidity: number;
675
736
  top_tickers: string[];
737
+ trend_history?: number[];
676
738
  }
677
739
  interface PolymarketTrendingSector extends PolymarketTrendingGroupBase {
678
740
  sector: string;
@@ -711,7 +773,7 @@ interface PolymarketMarketSentiment {
711
773
  trade_count: number;
712
774
  market_count: number;
713
775
  current_market_count: number;
714
- unique_traders: number;
776
+ unique_traders: number | null;
715
777
  total_liquidity: number;
716
778
  active_tickers: number;
717
779
  sentiment_score?: number | null;
@@ -792,11 +854,18 @@ interface SentimentPhraseMatch {
792
854
  }
793
855
  interface SentimentComponents {
794
856
  engine_version: string;
857
+ model_score?: number | null;
858
+ /** @deprecated Engine 5.5 returns null. */
795
859
  vader_compound?: number | null;
860
+ /** @deprecated Engine 5.5 returns null. Use `model_score` instead. */
796
861
  roberta_score?: number | null;
862
+ /** @deprecated Engine 5.5 returns zero. */
797
863
  emoji_score: number;
864
+ /** @deprecated Engine 5.5 returns zero. */
798
865
  phrase_adjustment: number;
866
+ /** @deprecated Engine 5.5 returns an empty array. */
799
867
  phrase_matches: SentimentPhraseMatch[];
868
+ /** @deprecated Engine 5.5 returns an empty array. */
800
869
  contextual_finance_matches: string[];
801
870
  }
802
871
  interface SentimentAnalyzeResponse {
@@ -821,6 +890,10 @@ interface CryptoTrendingToken {
821
890
  }
822
891
  interface CryptoSubredditCount {
823
892
  subreddit: string;
893
+ mentions?: number;
894
+ sentiment_score?: number | null;
895
+ buzz_score?: number | null;
896
+ /** @deprecated Use `mentions` instead. */
824
897
  count: number;
825
898
  }
826
899
  interface CryptoDailyTrendItem {
@@ -828,6 +901,8 @@ interface CryptoDailyTrendItem {
828
901
  mentions: number;
829
902
  sentiment_score?: number | null;
830
903
  buzz_score?: number | null;
904
+ bullish_pct?: number | null;
905
+ bearish_pct?: number | null;
831
906
  }
832
907
  interface CryptoTopMention {
833
908
  text_snippet: string;
@@ -1076,7 +1151,7 @@ declare class SentimentNamespace {
1076
1151
  /** @internal */
1077
1152
  constructor(http: HttpClient);
1078
1153
  /** Analyze one finance or trading text with the direct Finance Sentiment API. */
1079
- analyze(text: string): Promise<SentimentAnalyzeResponse>;
1154
+ analyze(text: string, options?: SentimentAnalyzeOptions): Promise<SentimentAnalyzeResponse>;
1080
1155
  }
1081
1156
  declare class AdanosClient {
1082
1157
  readonly news: NewsNamespace;
@@ -1091,7 +1166,7 @@ declare class AdanosClient {
1091
1166
  * Create a new Adanos Market Sentiment API client.
1092
1167
  *
1093
1168
  * @param options.apiKey - Your API key (`adanos_api_key_here`).
1094
- * @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.
1169
+ * @param options.baseUrl - API base URL. Default: `https://api.adanos.com`.
1095
1170
  * @param options.timeout - Request timeout in ms. Default: 30000.
1096
1171
  */
1097
1172
  constructor(options: ClientOptions);
@@ -1100,4 +1175,4 @@ declare class AdanosClient {
1100
1175
  }
1101
1176
  declare const StockSentimentClient: typeof AdanosClient;
1102
1177
 
1103
- export { AdanosClient, ApiError, type ClientOptions, type CompareOptions, type CompareResponse, type CompareStockItem, type CryptoCompareResponse, type CryptoCompareTokenItem, type CryptoDailyTrendItem, type CryptoHealthResponse, type CryptoMarketSentiment, type CryptoMarketSentimentDriver, type CryptoRawMentionItem, type CryptoRawMentionsResponse, type CryptoSchedulerStatus, type CryptoSearchItem, type CryptoSearchResponse, type CryptoSearchSummary, type CryptoStatsResponse, type CryptoSubredditCount, type CryptoTokenSentiment, type CryptoTopMention, type CryptoTrendingToken, type DailyTrendItem, type HealthResponse, type InvalidPeriodErrorDetail, type InvalidPeriodErrorResponse, type MarketSentimentDriver, type MarketSentimentOptions, type NewsCompareOptions, type NewsCompareResponse, type NewsCompareStockItem, type NewsMarketSentiment, NewsNamespace, type NewsRawMentionItem, type NewsRawMentionsResponse, type NewsSearchResultItem, type NewsSearchSummary, type NewsSourceCount, type NewsSourceOptions, type NewsStatsResponse, type NewsStockOptions, type NewsStockSentiment, type NewsTopMention, type NewsTrendingCountry, type NewsTrendingGroupOptions, type NewsTrendingOptions, type NewsTrendingSector, type NewsTrendingStock, type PolymarketCompareResponse, type PolymarketCompareStockItem, type PolymarketDailyTrendItem, type PolymarketHealthResponse, type PolymarketMarketSentiment, type PolymarketMarketSentimentDriver, PolymarketNamespace, type PolymarketRawMentionItem, type PolymarketRawMentionsResponse, type PolymarketSchedulerStatus, type PolymarketSearchResponse, type PolymarketSearchResultItem, type PolymarketSearchSummary, type PolymarketStatsResponse, type PolymarketStockDetail, type PolymarketTopMention, type PolymarketTrendingCountry, type PolymarketTrendingSector, type PolymarketTrendingStock, type RawMentionsOptions, RedditCryptoNamespace, type RedditMarketSentiment, RedditNamespace, type RedditRawMentionItem, type RedditRawMentionsResponse, type RedditStatsResponse, type RootHealthResponse, type RootHealthSummary, type SchedulerStatus, type SearchOptions, type SearchResponse, type SearchResultItem, type SentimentAnalyzeResponse, type SentimentComponents, SentimentNamespace, type SentimentPhraseMatch, type StatsResponse, type StockExplanationResponse, type StockOptions, type StockSearchSummary, type StockSentiment, StockSentimentClient, StockSentimentError, type SubredditCount, type TopMention, type TrendingCountry, type TrendingGroupOptions, type TrendingOptions, type TrendingSector, type TrendingStock, type XCompareResponse, type XCompareStockItem, type XDailyTrendItem, type XHealthResponse, type XMarketSentiment, XNamespace, type XRawMentionItem, type XRawMentionsResponse, type XSchedulerStatus, type XSearchResponse, type XSearchResultItem, type XSearchSummary, type XStatsResponse, type XStockDetail, type XTopAuthor, type XTopTweet, type XTrendingCountry, type XTrendingSector, type XTrendingStock };
1178
+ export { AdanosClient, ApiError, type ClientOptions, type CompareLimitErrorDetail, type CompareLimitErrorResponse, type CompareOptions, type CompareResponse, type CompareStockItem, type CryptoCompareResponse, type CryptoCompareTokenItem, type CryptoDailyTrendItem, type CryptoHealthResponse, type CryptoMarketSentiment, type CryptoMarketSentimentDriver, type CryptoRawMentionItem, type CryptoRawMentionsResponse, type CryptoSchedulerStatus, type CryptoSearchItem, type CryptoSearchResponse, type CryptoSearchSummary, type CryptoStatsResponse, type CryptoSubredditCount, type CryptoTokenSentiment, type CryptoTopMention, type CryptoTrendingToken, type DailyTrendItem, type HealthResponse, type InvalidPeriodErrorDetail, type InvalidPeriodErrorResponse, type MarketSentimentDriver, type MarketSentimentOptions, type NewsCompareOptions, type NewsCompareResponse, type NewsCompareStockItem, type NewsMarketSentiment, NewsNamespace, type NewsRawMentionItem, type NewsRawMentionsResponse, type NewsSearchResultItem, type NewsSearchSummary, type NewsSourceCount, type NewsSourceOptions, type NewsStatsResponse, type NewsStockOptions, type NewsStockSentiment, type NewsTopMention, type NewsTrendingCountry, type NewsTrendingGroupOptions, type NewsTrendingOptions, type NewsTrendingSector, type NewsTrendingStock, type PolymarketCompareResponse, type PolymarketCompareStockItem, type PolymarketDailyTrendItem, type PolymarketHealthResponse, type PolymarketMarketSentiment, type PolymarketMarketSentimentDriver, PolymarketNamespace, type PolymarketPulseEvidence, type PolymarketRawMentionItem, type PolymarketRawMentionsResponse, type PolymarketSchedulerStatus, type PolymarketSearchResponse, type PolymarketSearchResultItem, type PolymarketSearchSummary, type PolymarketStatsResponse, type PolymarketStockDetail, type PolymarketTickerPulse, type PolymarketTopMention, type PolymarketTrendingCountry, type PolymarketTrendingSector, type PolymarketTrendingStock, type RawMentionsOptions, RedditCryptoNamespace, type RedditMarketSentiment, RedditNamespace, type RedditRawMentionItem, type RedditRawMentionsResponse, type RedditStatsResponse, type RootHealthResponse, type RootHealthSummary, type SchedulerStatus, type SearchOptions, type SearchResponse, type SearchResultItem, type SentimentAnalyzeOptions, type SentimentAnalyzeResponse, type SentimentComponents, SentimentNamespace, type SentimentPhraseMatch, type StatsResponse, type StockExplanationResponse, type StockOptions, type StockSearchSummary, type StockSentiment, StockSentimentClient, StockSentimentError, type SubredditCount, type TopMention, type TrendingCountry, type TrendingGroupOptions, type TrendingOptions, type TrendingSector, type TrendingStock, type UnsupportedAssetErrorDetail, type UnsupportedAssetErrorResponse, type XCompareResponse, type XCompareStockItem, type XDailyTrendItem, type XHealthResponse, type XMarketSentiment, XNamespace, type XRawMentionItem, type XRawMentionsResponse, type XSchedulerStatus, type XSearchResponse, type XSearchResultItem, type XSearchSummary, type XStatsResponse, type XStockDetail, type XTopAuthor, type XTopTweet, type XTrendingCountry, type XTrendingSector, type XTrendingStock };
package/dist/index.d.ts CHANGED
@@ -74,6 +74,10 @@ interface RawMentionsOptions {
74
74
  /** Include inherited Reddit thread context where supported. */
75
75
  includeInherited?: boolean;
76
76
  }
77
+ interface SentimentAnalyzeOptions {
78
+ /** Company name or ticker to judge the text for. Maximum 100 characters. */
79
+ target?: string | null;
80
+ }
77
81
  interface NewsSourceOptions {
78
82
  /** Optional strict source filter (canonical source id or known alias). */
79
83
  source?: string;
@@ -87,13 +91,36 @@ type NewsCompareOptions = CompareOptions;
87
91
  interface InvalidPeriodErrorDetail {
88
92
  error: string;
89
93
  message: string;
94
+ field?: string | null;
95
+ value?: string | number | null;
96
+ today?: string | null;
90
97
  period_from?: string | null;
98
+ period_to?: string | null;
91
99
  available_since?: string | null;
100
+ retention_from?: string | null;
101
+ requested_days?: number | null;
102
+ max_days?: number | null;
92
103
  platform?: string | null;
93
104
  }
94
105
  interface InvalidPeriodErrorResponse {
95
106
  detail: InvalidPeriodErrorDetail;
96
107
  }
108
+ interface CompareLimitErrorDetail {
109
+ error: string;
110
+ message: string;
111
+ max_items: number;
112
+ item_name: string;
113
+ }
114
+ interface CompareLimitErrorResponse {
115
+ detail: CompareLimitErrorDetail;
116
+ }
117
+ interface UnsupportedAssetErrorDetail {
118
+ error_code: string;
119
+ message: string;
120
+ }
121
+ interface UnsupportedAssetErrorResponse {
122
+ detail: UnsupportedAssetErrorDetail;
123
+ }
97
124
  interface TrendingStock {
98
125
  ticker: string;
99
126
  buzz_score: number;
@@ -131,6 +158,10 @@ interface StockSentiment {
131
158
  }
132
159
  interface SubredditCount {
133
160
  subreddit: string;
161
+ mentions?: number;
162
+ sentiment_score?: number | null;
163
+ buzz_score?: number | null;
164
+ /** @deprecated Use `mentions` instead. */
134
165
  count: number;
135
166
  }
136
167
  interface DailyTrendItem {
@@ -138,6 +169,8 @@ interface DailyTrendItem {
138
169
  mentions: number;
139
170
  sentiment_score?: number | null;
140
171
  buzz_score?: number | null;
172
+ bullish_pct?: number | null;
173
+ bearish_pct?: number | null;
141
174
  }
142
175
  interface TopMention {
143
176
  text_snippet: string;
@@ -324,6 +357,7 @@ interface TrendingGroupBase {
324
357
  bearish_pct: number;
325
358
  total_upvotes: number;
326
359
  top_tickers: string[];
360
+ trend_history?: number[];
327
361
  }
328
362
  interface TrendingSector extends TrendingGroupBase {
329
363
  sector: string;
@@ -347,6 +381,10 @@ interface NewsTrendingStock {
347
381
  }
348
382
  interface NewsSourceCount {
349
383
  source: string;
384
+ mentions?: number;
385
+ sentiment_score?: number | null;
386
+ buzz_score?: number | null;
387
+ /** @deprecated Use `mentions` instead. */
350
388
  count: number;
351
389
  }
352
390
  interface NewsTopMention {
@@ -401,6 +439,7 @@ interface NewsTrendingGroupBase {
401
439
  bullish_pct: number;
402
440
  bearish_pct: number;
403
441
  top_tickers: string[];
442
+ trend_history?: number[];
404
443
  }
405
444
  interface NewsTrendingSector extends NewsTrendingGroupBase {
406
445
  sector: string;
@@ -461,7 +500,7 @@ interface NewsRawMentionsResponse {
461
500
  interface XTrendingStock {
462
501
  ticker: string;
463
502
  buzz_score: number;
464
- trend: string;
503
+ trend: 'rising' | 'falling' | 'stable';
465
504
  mentions: number;
466
505
  company_name?: string | null;
467
506
  sentiment_score?: number | null;
@@ -496,6 +535,8 @@ interface XDailyTrendItem {
496
535
  mentions: number;
497
536
  sentiment_score?: number | null;
498
537
  buzz_score?: number | null;
538
+ bullish_pct?: number | null;
539
+ bearish_pct?: number | null;
499
540
  }
500
541
  interface XSearchSummary {
501
542
  mentions: number;
@@ -560,6 +601,7 @@ interface XTrendingGroupBase {
560
601
  bearish_pct?: number | null;
561
602
  total_upvotes?: number | null;
562
603
  top_tickers: string[];
604
+ trend_history?: number[];
563
605
  }
564
606
  interface XTrendingSector extends XTrendingGroupBase {
565
607
  sector: string;
@@ -624,6 +666,23 @@ interface PolymarketDailyTrendItem {
624
666
  trade_count: number;
625
667
  sentiment_score?: number | null;
626
668
  buzz_score?: number | null;
669
+ bullish_pct?: number | null;
670
+ bearish_pct?: number | null;
671
+ }
672
+ interface PolymarketPulseEvidence {
673
+ directional_coverage?: number | null;
674
+ traded_market_pct?: number | null;
675
+ zero_trade_market_pct?: number | null;
676
+ avg_spread?: number | null;
677
+ snapshot_at?: string | null;
678
+ }
679
+ interface PolymarketTickerPulse {
680
+ mood: 'bullish' | 'bearish' | 'mixed' | 'event_driven' | 'illiquid' | 'unclear';
681
+ confidence: number;
682
+ thin_data: boolean;
683
+ why: string[];
684
+ warnings?: string[];
685
+ evidence: PolymarketPulseEvidence;
627
686
  }
628
687
  interface PolymarketTopMention {
629
688
  condition_id: string;
@@ -631,6 +690,7 @@ interface PolymarketTopMention {
631
690
  market_type: string;
632
691
  trade_count?: number | null;
633
692
  sentiment_score?: number | null;
693
+ buzz_score?: number | null;
634
694
  yes_price?: number | null;
635
695
  no_price?: number | null;
636
696
  liquidity: number;
@@ -659,6 +719,7 @@ interface PolymarketStockDetail {
659
719
  total_liquidity?: number | null;
660
720
  daily_trend?: PolymarketDailyTrendItem[] | null;
661
721
  top_mentions?: PolymarketTopMention[] | null;
722
+ pulse?: PolymarketTickerPulse | null;
662
723
  }
663
724
  interface PolymarketTrendingGroupBase {
664
725
  buzz_score: number;
@@ -673,6 +734,7 @@ interface PolymarketTrendingGroupBase {
673
734
  bearish_pct: number;
674
735
  total_liquidity: number;
675
736
  top_tickers: string[];
737
+ trend_history?: number[];
676
738
  }
677
739
  interface PolymarketTrendingSector extends PolymarketTrendingGroupBase {
678
740
  sector: string;
@@ -711,7 +773,7 @@ interface PolymarketMarketSentiment {
711
773
  trade_count: number;
712
774
  market_count: number;
713
775
  current_market_count: number;
714
- unique_traders: number;
776
+ unique_traders: number | null;
715
777
  total_liquidity: number;
716
778
  active_tickers: number;
717
779
  sentiment_score?: number | null;
@@ -792,11 +854,18 @@ interface SentimentPhraseMatch {
792
854
  }
793
855
  interface SentimentComponents {
794
856
  engine_version: string;
857
+ model_score?: number | null;
858
+ /** @deprecated Engine 5.5 returns null. */
795
859
  vader_compound?: number | null;
860
+ /** @deprecated Engine 5.5 returns null. Use `model_score` instead. */
796
861
  roberta_score?: number | null;
862
+ /** @deprecated Engine 5.5 returns zero. */
797
863
  emoji_score: number;
864
+ /** @deprecated Engine 5.5 returns zero. */
798
865
  phrase_adjustment: number;
866
+ /** @deprecated Engine 5.5 returns an empty array. */
799
867
  phrase_matches: SentimentPhraseMatch[];
868
+ /** @deprecated Engine 5.5 returns an empty array. */
800
869
  contextual_finance_matches: string[];
801
870
  }
802
871
  interface SentimentAnalyzeResponse {
@@ -821,6 +890,10 @@ interface CryptoTrendingToken {
821
890
  }
822
891
  interface CryptoSubredditCount {
823
892
  subreddit: string;
893
+ mentions?: number;
894
+ sentiment_score?: number | null;
895
+ buzz_score?: number | null;
896
+ /** @deprecated Use `mentions` instead. */
824
897
  count: number;
825
898
  }
826
899
  interface CryptoDailyTrendItem {
@@ -828,6 +901,8 @@ interface CryptoDailyTrendItem {
828
901
  mentions: number;
829
902
  sentiment_score?: number | null;
830
903
  buzz_score?: number | null;
904
+ bullish_pct?: number | null;
905
+ bearish_pct?: number | null;
831
906
  }
832
907
  interface CryptoTopMention {
833
908
  text_snippet: string;
@@ -1076,7 +1151,7 @@ declare class SentimentNamespace {
1076
1151
  /** @internal */
1077
1152
  constructor(http: HttpClient);
1078
1153
  /** Analyze one finance or trading text with the direct Finance Sentiment API. */
1079
- analyze(text: string): Promise<SentimentAnalyzeResponse>;
1154
+ analyze(text: string, options?: SentimentAnalyzeOptions): Promise<SentimentAnalyzeResponse>;
1080
1155
  }
1081
1156
  declare class AdanosClient {
1082
1157
  readonly news: NewsNamespace;
@@ -1091,7 +1166,7 @@ declare class AdanosClient {
1091
1166
  * Create a new Adanos Market Sentiment API client.
1092
1167
  *
1093
1168
  * @param options.apiKey - Your API key (`adanos_api_key_here`).
1094
- * @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.
1169
+ * @param options.baseUrl - API base URL. Default: `https://api.adanos.com`.
1095
1170
  * @param options.timeout - Request timeout in ms. Default: 30000.
1096
1171
  */
1097
1172
  constructor(options: ClientOptions);
@@ -1100,4 +1175,4 @@ declare class AdanosClient {
1100
1175
  }
1101
1176
  declare const StockSentimentClient: typeof AdanosClient;
1102
1177
 
1103
- export { AdanosClient, ApiError, type ClientOptions, type CompareOptions, type CompareResponse, type CompareStockItem, type CryptoCompareResponse, type CryptoCompareTokenItem, type CryptoDailyTrendItem, type CryptoHealthResponse, type CryptoMarketSentiment, type CryptoMarketSentimentDriver, type CryptoRawMentionItem, type CryptoRawMentionsResponse, type CryptoSchedulerStatus, type CryptoSearchItem, type CryptoSearchResponse, type CryptoSearchSummary, type CryptoStatsResponse, type CryptoSubredditCount, type CryptoTokenSentiment, type CryptoTopMention, type CryptoTrendingToken, type DailyTrendItem, type HealthResponse, type InvalidPeriodErrorDetail, type InvalidPeriodErrorResponse, type MarketSentimentDriver, type MarketSentimentOptions, type NewsCompareOptions, type NewsCompareResponse, type NewsCompareStockItem, type NewsMarketSentiment, NewsNamespace, type NewsRawMentionItem, type NewsRawMentionsResponse, type NewsSearchResultItem, type NewsSearchSummary, type NewsSourceCount, type NewsSourceOptions, type NewsStatsResponse, type NewsStockOptions, type NewsStockSentiment, type NewsTopMention, type NewsTrendingCountry, type NewsTrendingGroupOptions, type NewsTrendingOptions, type NewsTrendingSector, type NewsTrendingStock, type PolymarketCompareResponse, type PolymarketCompareStockItem, type PolymarketDailyTrendItem, type PolymarketHealthResponse, type PolymarketMarketSentiment, type PolymarketMarketSentimentDriver, PolymarketNamespace, type PolymarketRawMentionItem, type PolymarketRawMentionsResponse, type PolymarketSchedulerStatus, type PolymarketSearchResponse, type PolymarketSearchResultItem, type PolymarketSearchSummary, type PolymarketStatsResponse, type PolymarketStockDetail, type PolymarketTopMention, type PolymarketTrendingCountry, type PolymarketTrendingSector, type PolymarketTrendingStock, type RawMentionsOptions, RedditCryptoNamespace, type RedditMarketSentiment, RedditNamespace, type RedditRawMentionItem, type RedditRawMentionsResponse, type RedditStatsResponse, type RootHealthResponse, type RootHealthSummary, type SchedulerStatus, type SearchOptions, type SearchResponse, type SearchResultItem, type SentimentAnalyzeResponse, type SentimentComponents, SentimentNamespace, type SentimentPhraseMatch, type StatsResponse, type StockExplanationResponse, type StockOptions, type StockSearchSummary, type StockSentiment, StockSentimentClient, StockSentimentError, type SubredditCount, type TopMention, type TrendingCountry, type TrendingGroupOptions, type TrendingOptions, type TrendingSector, type TrendingStock, type XCompareResponse, type XCompareStockItem, type XDailyTrendItem, type XHealthResponse, type XMarketSentiment, XNamespace, type XRawMentionItem, type XRawMentionsResponse, type XSchedulerStatus, type XSearchResponse, type XSearchResultItem, type XSearchSummary, type XStatsResponse, type XStockDetail, type XTopAuthor, type XTopTweet, type XTrendingCountry, type XTrendingSector, type XTrendingStock };
1178
+ export { AdanosClient, ApiError, type ClientOptions, type CompareLimitErrorDetail, type CompareLimitErrorResponse, type CompareOptions, type CompareResponse, type CompareStockItem, type CryptoCompareResponse, type CryptoCompareTokenItem, type CryptoDailyTrendItem, type CryptoHealthResponse, type CryptoMarketSentiment, type CryptoMarketSentimentDriver, type CryptoRawMentionItem, type CryptoRawMentionsResponse, type CryptoSchedulerStatus, type CryptoSearchItem, type CryptoSearchResponse, type CryptoSearchSummary, type CryptoStatsResponse, type CryptoSubredditCount, type CryptoTokenSentiment, type CryptoTopMention, type CryptoTrendingToken, type DailyTrendItem, type HealthResponse, type InvalidPeriodErrorDetail, type InvalidPeriodErrorResponse, type MarketSentimentDriver, type MarketSentimentOptions, type NewsCompareOptions, type NewsCompareResponse, type NewsCompareStockItem, type NewsMarketSentiment, NewsNamespace, type NewsRawMentionItem, type NewsRawMentionsResponse, type NewsSearchResultItem, type NewsSearchSummary, type NewsSourceCount, type NewsSourceOptions, type NewsStatsResponse, type NewsStockOptions, type NewsStockSentiment, type NewsTopMention, type NewsTrendingCountry, type NewsTrendingGroupOptions, type NewsTrendingOptions, type NewsTrendingSector, type NewsTrendingStock, type PolymarketCompareResponse, type PolymarketCompareStockItem, type PolymarketDailyTrendItem, type PolymarketHealthResponse, type PolymarketMarketSentiment, type PolymarketMarketSentimentDriver, PolymarketNamespace, type PolymarketPulseEvidence, type PolymarketRawMentionItem, type PolymarketRawMentionsResponse, type PolymarketSchedulerStatus, type PolymarketSearchResponse, type PolymarketSearchResultItem, type PolymarketSearchSummary, type PolymarketStatsResponse, type PolymarketStockDetail, type PolymarketTickerPulse, type PolymarketTopMention, type PolymarketTrendingCountry, type PolymarketTrendingSector, type PolymarketTrendingStock, type RawMentionsOptions, RedditCryptoNamespace, type RedditMarketSentiment, RedditNamespace, type RedditRawMentionItem, type RedditRawMentionsResponse, type RedditStatsResponse, type RootHealthResponse, type RootHealthSummary, type SchedulerStatus, type SearchOptions, type SearchResponse, type SearchResultItem, type SentimentAnalyzeOptions, type SentimentAnalyzeResponse, type SentimentComponents, SentimentNamespace, type SentimentPhraseMatch, type StatsResponse, type StockExplanationResponse, type StockOptions, type StockSearchSummary, type StockSentiment, StockSentimentClient, StockSentimentError, type SubredditCount, type TopMention, type TrendingCountry, type TrendingGroupOptions, type TrendingOptions, type TrendingSector, type TrendingStock, type UnsupportedAssetErrorDetail, type UnsupportedAssetErrorResponse, type XCompareResponse, type XCompareStockItem, type XDailyTrendItem, type XHealthResponse, type XMarketSentiment, XNamespace, type XRawMentionItem, type XRawMentionsResponse, type XSchedulerStatus, type XSearchResponse, type XSearchResultItem, type XSearchSummary, type XStatsResponse, type XStockDetail, type XTopAuthor, type XTopTweet, type XTrendingCountry, type XTrendingSector, type XTrendingStock };
package/dist/index.js CHANGED
@@ -507,8 +507,8 @@ var SentimentNamespace = class {
507
507
  this.http = http;
508
508
  }
509
509
  /** Analyze one finance or trading text with the direct Finance Sentiment API. */
510
- async analyze(text) {
511
- return this.http.post("/sentiment/v1/analyze", { text });
510
+ async analyze(text, options = {}) {
511
+ return this.http.post("/sentiment/v1/analyze", { text, target: options.target });
512
512
  }
513
513
  };
514
514
  var AdanosClient = class {
@@ -524,11 +524,11 @@ var AdanosClient = class {
524
524
  * Create a new Adanos Market Sentiment API client.
525
525
  *
526
526
  * @param options.apiKey - Your API key (`adanos_api_key_here`).
527
- * @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.
527
+ * @param options.baseUrl - API base URL. Default: `https://api.adanos.com`.
528
528
  * @param options.timeout - Request timeout in ms. Default: 30000.
529
529
  */
530
530
  constructor(options) {
531
- const baseUrl = options.baseUrl ?? "https://api.adanos.org";
531
+ const baseUrl = options.baseUrl ?? "https://api.adanos.com";
532
532
  const timeout = options.timeout ?? 3e4;
533
533
  const http = new HttpClient(baseUrl, options.apiKey, timeout);
534
534
  this.http = http;
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({ 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 payload?: unknown;\n\n constructor(status: number, detail: string, payload?: unknown) {\n super(`${status}: ${detail}`);\n this.name = 'ApiError';\n this.status = status;\n this.detail = detail;\n this.payload = payload;\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, '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\nexport interface InvalidPeriodErrorDetail {\n error: string;\n message: string;\n period_from?: string | null;\n available_since?: string | null;\n platform?: string | null;\n}\n\nexport interface InvalidPeriodErrorResponse {\n detail: InvalidPeriodErrorDetail;\n}\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}\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}\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 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 top_authors?: XTopAuthor[] | null;\n}\n\nexport interface XDailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: 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}\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\nexport interface XTopAuthor {\n author: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. Kept while the API still returns the alias. */\n count: number;\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 market_status?: string | null;\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 sentiment_score?: number | null;\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 market_status?: string | null;\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 open_markets_current?: number;\n open_tickers_current?: number;\n traded_markets_today?: number;\n traded_tickers_today?: number;\n trades_today?: number;\n supported_tickers: number;\n}\n\nexport interface SentimentPhraseMatch {\n phrase: string;\n score: number;\n}\n\nexport interface SentimentComponents {\n engine_version: string;\n vader_compound?: number | null;\n roberta_score?: number | null;\n emoji_score: number;\n phrase_adjustment: number;\n phrase_matches: SentimentPhraseMatch[];\n contextual_finance_matches: string[];\n}\n\nexport interface SentimentAnalyzeResponse {\n text: string;\n sentiment_score: number;\n sentiment_label: 'positive' | 'neutral' | 'negative';\n components: SentimentComponents;\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}\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 isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction formatValidationLocation(loc: unknown): string {\n if (Array.isArray(loc)) {\n return loc.map(String).join('.');\n }\n return loc === undefined || loc === null ? '' : String(loc);\n}\n\nfunction formatErrorDetail(detail: unknown): string {\n if (typeof detail === 'string' && detail.trim()) {\n return detail.trim();\n }\n\n if (Array.isArray(detail)) {\n const messages = detail\n .map((item) => {\n if (!isRecord(item)) return null;\n const message = item.msg ?? item.message ?? item.error;\n if (typeof message !== 'string' || !message.trim()) return null;\n const location = formatValidationLocation(item.loc);\n return location ? `${location}: ${message.trim()}` : message.trim();\n })\n .filter((message): message is string => Boolean(message));\n if (messages.length > 0) {\n return messages.join('; ');\n }\n }\n\n if (isRecord(detail)) {\n for (const key of ['message', 'error', 'detail']) {\n const value = detail[key];\n if (typeof value === 'string' && value.trim()) {\n return value.trim();\n }\n }\n }\n\n return JSON.stringify(detail);\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 let payload: unknown;\n try {\n payload = await response.json();\n detail = isRecord(payload) && 'detail' in payload\n ? formatErrorDetail(payload.detail)\n : JSON.stringify(payload);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail, payload);\n }\n\n return response.json() as Promise<T>;\n }\n\n async post<T>(path: string, body: unknown): Promise<T> {\n const url = new URL(`${this.baseUrl}${path}`);\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'X-API-Key': this.apiKey,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n signal: AbortSignal.timeout(this.timeout),\n });\n\n if (!response.ok) {\n let detail: string;\n let payload: unknown;\n try {\n payload = await response.json();\n detail = isRecord(payload) && 'detail' in payload\n ? formatErrorDetail(payload.detail)\n : JSON.stringify(payload);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail, payload);\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 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 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 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 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 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\nexport class SentimentNamespace {\n private http: HttpClient;\n\n /** @internal */\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** Analyze one finance or trading text with the direct Finance Sentiment API. */\n async analyze(text: string): Promise<SentimentAnalyzeResponse> {\n return this.http.post('/sentiment/v1/analyze', { text });\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 readonly sentiment: SentimentNamespace;\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 this.sentiment = new SentimentNamespace(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,EACA;AAAA,EAEA,YAAY,QAAgB,QAAgB,SAAmB;AAC7D,UAAM,GAAG,MAAM,KAAK,MAAM,EAAE;AAC5B,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,SAAS;AACd,SAAK,UAAU;AAAA,EACjB;AACF;AAmhCA,SAAS,SAAS,OAAkD;AAClE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,yBAAyB,KAAsB;AACtD,MAAI,MAAM,QAAQ,GAAG,GAAG;AACtB,WAAO,IAAI,IAAI,MAAM,EAAE,KAAK,GAAG;AAAA,EACjC;AACA,SAAO,QAAQ,UAAa,QAAQ,OAAO,KAAK,OAAO,GAAG;AAC5D;AAEA,SAAS,kBAAkB,QAAyB;AAClD,MAAI,OAAO,WAAW,YAAY,OAAO,KAAK,GAAG;AAC/C,WAAO,OAAO,KAAK;AAAA,EACrB;AAEA,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,UAAM,WAAW,OACd,IAAI,CAAC,SAAS;AACb,UAAI,CAAC,SAAS,IAAI,EAAG,QAAO;AAC5B,YAAM,UAAU,KAAK,OAAO,KAAK,WAAW,KAAK;AACjD,UAAI,OAAO,YAAY,YAAY,CAAC,QAAQ,KAAK,EAAG,QAAO;AAC3D,YAAM,WAAW,yBAAyB,KAAK,GAAG;AAClD,aAAO,WAAW,GAAG,QAAQ,KAAK,QAAQ,KAAK,CAAC,KAAK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,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 payload?: unknown;\n\n constructor(status: number, detail: string, payload?: unknown) {\n super(`${status}: ${detail}`);\n this.name = 'ApiError';\n this.status = status;\n this.detail = detail;\n this.payload = payload;\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, '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 SentimentAnalyzeOptions {\n /** Company name or ticker to judge the text for. Maximum 100 characters. */\n target?: string | null;\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\nexport interface InvalidPeriodErrorDetail {\n error: string;\n message: string;\n field?: string | null;\n value?: string | number | null;\n today?: string | null;\n period_from?: string | null;\n period_to?: string | null;\n available_since?: string | null;\n retention_from?: string | null;\n requested_days?: number | null;\n max_days?: number | null;\n platform?: string | null;\n}\n\nexport interface InvalidPeriodErrorResponse {\n detail: InvalidPeriodErrorDetail;\n}\n\nexport interface CompareLimitErrorDetail {\n error: string;\n message: string;\n max_items: number;\n item_name: string;\n}\n\nexport interface CompareLimitErrorResponse {\n detail: CompareLimitErrorDetail;\n}\n\nexport interface UnsupportedAssetErrorDetail {\n error_code: string;\n message: string;\n}\n\nexport interface UnsupportedAssetErrorResponse {\n detail: UnsupportedAssetErrorDetail;\n}\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 mentions?: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. */\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 bullish_pct?: number | null;\n bearish_pct?: 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}\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 trend_history?: number[];\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 mentions?: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. */\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}\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 trend_history?: number[];\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: 'rising' | 'falling' | 'stable';\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 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 top_authors?: XTopAuthor[] | null;\n}\n\nexport interface XDailyTrendItem {\n date: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: 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}\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\nexport interface XTopAuthor {\n author: string;\n mentions: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. Kept while the API still returns the alias. */\n count: number;\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 trend_history?: number[];\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 bullish_pct?: number | null;\n bearish_pct?: number | null;\n}\n\nexport interface PolymarketPulseEvidence {\n directional_coverage?: number | null;\n traded_market_pct?: number | null;\n zero_trade_market_pct?: number | null;\n avg_spread?: number | null;\n snapshot_at?: string | null;\n}\n\nexport interface PolymarketTickerPulse {\n mood: 'bullish' | 'bearish' | 'mixed' | 'event_driven' | 'illiquid' | 'unclear';\n confidence: number;\n thin_data: boolean;\n why: string[];\n warnings?: string[];\n evidence: PolymarketPulseEvidence;\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 buzz_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 market_status?: string | null;\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 pulse?: PolymarketTickerPulse | 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 trend_history?: number[];\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 | null;\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 sentiment_score?: number | null;\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 market_status?: string | null;\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 open_markets_current?: number;\n open_tickers_current?: number;\n traded_markets_today?: number;\n traded_tickers_today?: number;\n trades_today?: number;\n supported_tickers: number;\n}\n\nexport interface SentimentPhraseMatch {\n phrase: string;\n score: number;\n}\n\nexport interface SentimentComponents {\n engine_version: string;\n model_score?: number | null;\n /** @deprecated Engine 5.5 returns null. */\n vader_compound?: number | null;\n /** @deprecated Engine 5.5 returns null. Use `model_score` instead. */\n roberta_score?: number | null;\n /** @deprecated Engine 5.5 returns zero. */\n emoji_score: number;\n /** @deprecated Engine 5.5 returns zero. */\n phrase_adjustment: number;\n /** @deprecated Engine 5.5 returns an empty array. */\n phrase_matches: SentimentPhraseMatch[];\n /** @deprecated Engine 5.5 returns an empty array. */\n contextual_finance_matches: string[];\n}\n\nexport interface SentimentAnalyzeResponse {\n text: string;\n sentiment_score: number;\n sentiment_label: 'positive' | 'neutral' | 'negative';\n components: SentimentComponents;\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 mentions?: number;\n sentiment_score?: number | null;\n buzz_score?: number | null;\n /** @deprecated Use `mentions` instead. */\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 bullish_pct?: number | null;\n bearish_pct?: 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}\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 isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction formatValidationLocation(loc: unknown): string {\n if (Array.isArray(loc)) {\n return loc.map(String).join('.');\n }\n return loc === undefined || loc === null ? '' : String(loc);\n}\n\nfunction formatErrorDetail(detail: unknown): string {\n if (typeof detail === 'string' && detail.trim()) {\n return detail.trim();\n }\n\n if (Array.isArray(detail)) {\n const messages = detail\n .map((item) => {\n if (!isRecord(item)) return null;\n const message = item.msg ?? item.message ?? item.error;\n if (typeof message !== 'string' || !message.trim()) return null;\n const location = formatValidationLocation(item.loc);\n return location ? `${location}: ${message.trim()}` : message.trim();\n })\n .filter((message): message is string => Boolean(message));\n if (messages.length > 0) {\n return messages.join('; ');\n }\n }\n\n if (isRecord(detail)) {\n for (const key of ['message', 'error', 'detail']) {\n const value = detail[key];\n if (typeof value === 'string' && value.trim()) {\n return value.trim();\n }\n }\n }\n\n return JSON.stringify(detail);\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 let payload: unknown;\n try {\n payload = await response.json();\n detail = isRecord(payload) && 'detail' in payload\n ? formatErrorDetail(payload.detail)\n : JSON.stringify(payload);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail, payload);\n }\n\n return response.json() as Promise<T>;\n }\n\n async post<T>(path: string, body: unknown): Promise<T> {\n const url = new URL(`${this.baseUrl}${path}`);\n const response = await fetch(url.toString(), {\n method: 'POST',\n headers: {\n 'X-API-Key': this.apiKey,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n signal: AbortSignal.timeout(this.timeout),\n });\n\n if (!response.ok) {\n let detail: string;\n let payload: unknown;\n try {\n payload = await response.json();\n detail = isRecord(payload) && 'detail' in payload\n ? formatErrorDetail(payload.detail)\n : JSON.stringify(payload);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail, payload);\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 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 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 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 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 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\nexport class SentimentNamespace {\n private http: HttpClient;\n\n /** @internal */\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n /** Analyze one finance or trading text with the direct Finance Sentiment API. */\n async analyze(text: string, options: SentimentAnalyzeOptions = {}): Promise<SentimentAnalyzeResponse> {\n return this.http.post('/sentiment/v1/analyze', { text, target: options.target });\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 readonly sentiment: SentimentNamespace;\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.com`.\n * @param options.timeout - Request timeout in ms. Default: 30000.\n */\n constructor(options: ClientOptions) {\n const baseUrl = options.baseUrl ?? 'https://api.adanos.com';\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 this.sentiment = new SentimentNamespace(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,EACA;AAAA,EAEA,YAAY,QAAgB,QAAgB,SAAmB;AAC7D,UAAM,GAAG,MAAM,KAAK,MAAM,EAAE;AAC5B,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,SAAS;AACd,SAAK,UAAU;AAAA,EACjB;AACF;AAqmCA,SAAS,SAAS,OAAkD;AAClE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,yBAAyB,KAAsB;AACtD,MAAI,MAAM,QAAQ,GAAG,GAAG;AACtB,WAAO,IAAI,IAAI,MAAM,EAAE,KAAK,GAAG;AAAA,EACjC;AACA,SAAO,QAAQ,UAAa,QAAQ,OAAO,KAAK,OAAO,GAAG;AAC5D;AAEA,SAAS,kBAAkB,QAAyB;AAClD,MAAI,OAAO,WAAW,YAAY,OAAO,KAAK,GAAG;AAC/C,WAAO,OAAO,KAAK;AAAA,EACrB;AAEA,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,UAAM,WAAW,OACd,IAAI,CAAC,SAAS;AACb,UAAI,CAAC,SAAS,IAAI,EAAG,QAAO;AAC5B,YAAM,UAAU,KAAK,OAAO,KA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;AACtC,SAAK,SAAS,IAAI,sBAAsB,IAAI;AAC5C,SAAK,eAAe,KAAK;AACzB,SAAK,IAAI,IAAI,WAAW,IAAI;AAC5B,SAAK,aAAa,IAAI,oBAAoB,IAAI;AAC9C,SAAK,YAAY,IAAI,mBAAmB,IAAI;AAAA,EAC9C;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.6.0",
3
+ "version": "2.8.0",
4
4
  "description": "TypeScript SDK for the Adanos Market Sentiment API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "author": "Alexander Schneider",
49
49
  "license": "MIT",
50
- "homepage": "https://adanos.org",
50
+ "homepage": "https://adanos.com",
51
51
  "bugs": {
52
52
  "url": "https://github.com/adanos-software/adanos-ts-sdk/issues"
53
53
  },