finance-sentiment 1.3.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -48,6 +48,14 @@ interface StockOptions {
48
48
  type CompareOptions = StockOptions;
49
49
  type SearchOptions = Pick<TrendingGroupOptions, 'days' | 'limit'>;
50
50
  type MarketSentimentOptions = Pick<TrendingGroupOptions, 'days'>;
51
+ interface RawMentionsOptions {
52
+ /** Time period in days. */
53
+ days?: number;
54
+ /** Max raw rows to return. */
55
+ limit?: number;
56
+ /** Include inherited Reddit thread context where supported. */
57
+ includeInherited?: boolean;
58
+ }
51
59
  interface NewsSourceOptions {
52
60
  /** Optional strict source filter (canonical source id or known alias). */
53
61
  source?: string;
@@ -78,7 +86,6 @@ interface StockSentiment {
78
86
  company_name?: string | null;
79
87
  buzz_score?: number | null;
80
88
  mentions?: number | null;
81
- total_mentions?: number | null;
82
89
  sentiment_score?: number | null;
83
90
  positive_count?: number | null;
84
91
  negative_count?: number | null;
@@ -102,7 +109,6 @@ interface DailyTrendItem {
102
109
  date: string;
103
110
  mentions: number;
104
111
  sentiment_score?: number | null;
105
- sentiment?: number | null;
106
112
  buzz_score?: number | null;
107
113
  }
108
114
  interface TopMention {
@@ -184,11 +190,9 @@ interface CompareStockItem {
184
190
  unique_posts: number;
185
191
  subreddit_count: number;
186
192
  sentiment_score?: number | null;
187
- sentiment?: number | null;
188
193
  bullish_pct?: number | null;
189
194
  bearish_pct?: number | null;
190
195
  total_upvotes: number;
191
- upvotes?: number | null;
192
196
  trend_history: number[];
193
197
  }
194
198
  interface MarketSentimentDriver {
@@ -214,6 +218,24 @@ interface RedditMarketSentiment {
214
218
  trend_history: number[];
215
219
  drivers: MarketSentimentDriver[];
216
220
  }
221
+ interface RedditRawMentionItem {
222
+ post_id?: string | null;
223
+ comment_id?: string | null;
224
+ subreddit?: string | null;
225
+ author?: string | null;
226
+ text_snippet: string;
227
+ created_utc: string;
228
+ upvotes: number;
229
+ sentiment_score?: number | null;
230
+ sentiment_label?: string | null;
231
+ is_inherited: boolean;
232
+ }
233
+ interface RedditRawMentionsResponse {
234
+ ticker: string;
235
+ period_days: number;
236
+ count: number;
237
+ results: RedditRawMentionItem[];
238
+ }
217
239
  interface TrendingGroupBase {
218
240
  buzz_score: number;
219
241
  trend: 'rising' | 'falling' | 'stable';
@@ -281,7 +303,6 @@ interface NewsStockSentiment {
281
303
  company_name?: string | null;
282
304
  buzz_score?: number | null;
283
305
  mentions?: number | null;
284
- total_mentions?: number | null;
285
306
  sentiment_score?: number | null;
286
307
  positive_count?: number | null;
287
308
  negative_count?: number | null;
@@ -320,7 +341,6 @@ interface NewsCompareStockItem {
320
341
  mentions: number;
321
342
  source_count: number;
322
343
  sentiment_score?: number | null;
323
- sentiment?: number | null;
324
344
  bullish_pct?: number | null;
325
345
  bearish_pct?: number | null;
326
346
  trend_history: number[];
@@ -345,6 +365,24 @@ interface NewsMarketSentiment {
345
365
  trend_history: number[];
346
366
  drivers: MarketSentimentDriver[];
347
367
  }
368
+ interface NewsRawMentionItem {
369
+ article_id?: string | null;
370
+ source: string;
371
+ url?: string | null;
372
+ title?: string | null;
373
+ summary?: string | null;
374
+ text_snippet: string;
375
+ author?: string | null;
376
+ created_utc?: string | null;
377
+ sentiment_score?: number | null;
378
+ sentiment_label?: string | null;
379
+ }
380
+ interface NewsRawMentionsResponse {
381
+ ticker: string;
382
+ period_days: number;
383
+ count: number;
384
+ results: NewsRawMentionItem[];
385
+ }
348
386
  interface XTrendingStock {
349
387
  ticker: string;
350
388
  buzz_score: number;
@@ -365,7 +403,6 @@ interface XStockDetail {
365
403
  company_name?: string | null;
366
404
  buzz_score?: number | null;
367
405
  mentions?: number | null;
368
- total_mentions?: number | null;
369
406
  sentiment_score?: number | null;
370
407
  positive_count?: number | null;
371
408
  negative_count?: number | null;
@@ -384,7 +421,6 @@ interface XDailyTrendItem {
384
421
  date: string;
385
422
  mentions: number;
386
423
  sentiment_score?: number | null;
387
- sentiment?: number | null;
388
424
  avg_rank?: number | null;
389
425
  buzz_score?: number | null;
390
426
  }
@@ -454,6 +490,25 @@ interface XMarketSentiment {
454
490
  trend_history: number[];
455
491
  drivers: MarketSentimentDriver[];
456
492
  }
493
+ interface XRawMentionItem {
494
+ tweet_id: string;
495
+ author?: string | null;
496
+ text_snippet: string;
497
+ created_utc?: string | null;
498
+ likes: number;
499
+ retweets: number;
500
+ views?: number | null;
501
+ is_reply: boolean;
502
+ parent_tweet_id?: string | null;
503
+ sentiment_score?: number | null;
504
+ sentiment_label?: string | null;
505
+ }
506
+ interface XRawMentionsResponse {
507
+ ticker: string;
508
+ period_days: number;
509
+ count: number;
510
+ results: XRawMentionItem[];
511
+ }
457
512
  interface PolymarketTrendingStock {
458
513
  ticker: string;
459
514
  buzz_score: number;
@@ -472,7 +527,6 @@ interface PolymarketDailyTrendItem {
472
527
  date: string;
473
528
  trade_count: number;
474
529
  sentiment_score?: number | null;
475
- sentiment?: number | null;
476
530
  buzz_score?: number | null;
477
531
  }
478
532
  interface PolymarketTopMention {
@@ -536,7 +590,6 @@ interface PolymarketCompareStockItem {
536
590
  market_count: number;
537
591
  unique_traders?: number | null;
538
592
  sentiment_score?: number | null;
539
- sentiment?: number | null;
540
593
  bullish_pct?: number | null;
541
594
  bearish_pct?: number | null;
542
595
  total_liquidity: number;
@@ -596,6 +649,125 @@ interface PolymarketSearchResponse {
596
649
  period_days: number;
597
650
  results: PolymarketSearchResultItem[];
598
651
  }
652
+ interface PolymarketRawMentionItem {
653
+ condition_id: string;
654
+ event_id: string;
655
+ market_slug?: string | null;
656
+ question: string;
657
+ market_type: string;
658
+ strike_price?: number | null;
659
+ yes_price?: number | null;
660
+ no_price?: number | null;
661
+ reference_price?: number | null;
662
+ reference_price_timestamp?: string | null;
663
+ liquidity: number;
664
+ volume_24h: number;
665
+ trade_count: number;
666
+ buy_trades: number;
667
+ sell_trades: number;
668
+ unique_traders: number;
669
+ sentiment_score?: number | null;
670
+ sentiment_label?: string | null;
671
+ end_date?: string | null;
672
+ active: boolean;
673
+ fetched_at: string;
674
+ }
675
+ interface PolymarketRawMentionsResponse {
676
+ ticker: string;
677
+ period_days: number;
678
+ count: number;
679
+ results: PolymarketRawMentionItem[];
680
+ }
681
+ interface CryptoTrendingToken {
682
+ symbol: string;
683
+ name?: string | null;
684
+ buzz_score: number;
685
+ trend: 'rising' | 'falling' | 'stable';
686
+ mentions: number;
687
+ unique_posts: number;
688
+ subreddit_count: number;
689
+ sentiment_score?: number | null;
690
+ bullish_pct?: number | null;
691
+ bearish_pct?: number | null;
692
+ total_upvotes: number;
693
+ trend_history?: number[];
694
+ }
695
+ interface CryptoTokenSentiment {
696
+ symbol: string;
697
+ name?: string | null;
698
+ found: boolean;
699
+ buzz_score?: number | null;
700
+ mentions?: number | null;
701
+ sentiment_score?: number | null;
702
+ positive_count?: number | null;
703
+ negative_count?: number | null;
704
+ neutral_count?: number | null;
705
+ total_upvotes?: number | null;
706
+ unique_posts?: number | null;
707
+ subreddit_count?: number | null;
708
+ trend?: 'rising' | 'falling' | 'stable' | null;
709
+ bullish_pct?: number | null;
710
+ bearish_pct?: number | null;
711
+ period_days?: number | null;
712
+ top_subreddits?: SubredditCount[] | null;
713
+ daily_trend?: DailyTrendItem[] | null;
714
+ top_mentions?: TopMention[] | null;
715
+ }
716
+ interface CryptoSearchItem {
717
+ symbol: string;
718
+ name: string;
719
+ aliases?: string[] | null;
720
+ summary: StockSearchSummary;
721
+ }
722
+ interface CryptoSearchResponse {
723
+ query: string;
724
+ count: number;
725
+ period_days: number;
726
+ results: CryptoSearchItem[];
727
+ }
728
+ interface CryptoCompareTokenItem extends CryptoTokenSentiment {
729
+ trend_history?: number[];
730
+ }
731
+ interface CryptoCompareResponse {
732
+ period_days: number;
733
+ tokens: CryptoCompareTokenItem[];
734
+ }
735
+ interface CryptoRawMentionItem extends RedditRawMentionItem {
736
+ }
737
+ interface CryptoRawMentionsResponse {
738
+ symbol: string;
739
+ period_days: number;
740
+ count: number;
741
+ results: CryptoRawMentionItem[];
742
+ }
743
+ interface CryptoMarketSentiment {
744
+ buzz_score: number;
745
+ trend?: 'rising' | 'falling' | 'stable' | null;
746
+ mentions: number;
747
+ unique_posts: number;
748
+ subreddit_count: number;
749
+ total_upvotes: number;
750
+ active_tokens: number;
751
+ sentiment_score?: number | null;
752
+ positive_count: number;
753
+ negative_count: number;
754
+ neutral_count: number;
755
+ bullish_pct: number;
756
+ bearish_pct: number;
757
+ trend_history: number[];
758
+ drivers: Array<{
759
+ symbol: string;
760
+ buzz_score: number;
761
+ sentiment_score?: number | null;
762
+ mentions: number;
763
+ }>;
764
+ }
765
+ interface CryptoStatsResponse {
766
+ total_mentions: number;
767
+ unique_tokens: number;
768
+ tokens: string[];
769
+ supported_tokens: number;
770
+ }
599
771
  type QueryParams = Record<string, string | number | undefined>;
600
772
  declare class HttpClient {
601
773
  private baseUrl;
@@ -621,6 +793,8 @@ declare class RedditNamespace extends PlatformNamespace {
621
793
  trendingCountries(options?: TrendingGroupOptions): Promise<TrendingCountry[]>;
622
794
  /** Get sentiment for a specific stock ticker. */
623
795
  stock(ticker: string, options?: StockOptions): Promise<StockSentiment>;
796
+ /** Get raw Reddit mentions for a specific stock ticker. */
797
+ mentions(ticker: string, options?: RawMentionsOptions): Promise<RedditRawMentionsResponse>;
624
798
  /** Get AI-generated explanation for a stock's trend. */
625
799
  explain(ticker: string): Promise<StockExplanationResponse>;
626
800
  /** Search for stocks by name or ticker. */
@@ -629,6 +803,10 @@ declare class RedditNamespace extends PlatformNamespace {
629
803
  compare(tickers: string[], options?: CompareOptions): Promise<CompareResponse>;
630
804
  /** Get the service-level Reddit market sentiment snapshot. */
631
805
  marketSentiment(options?: MarketSentimentOptions): Promise<RedditMarketSentiment>;
806
+ /** Get Reddit stock data statistics. */
807
+ stats(): Promise<StatsResponse>;
808
+ /** Get public Reddit stock service health. */
809
+ health(): Promise<HealthResponse>;
632
810
  }
633
811
  declare class NewsNamespace extends PlatformNamespace {
634
812
  /** @internal */
@@ -641,6 +819,8 @@ declare class NewsNamespace extends PlatformNamespace {
641
819
  trendingCountries(options?: NewsTrendingGroupOptions): Promise<NewsTrendingCountry[]>;
642
820
  /** Get sentiment for a specific stock ticker from news. */
643
821
  stock(ticker: string, options?: StockOptions): Promise<NewsStockSentiment>;
822
+ /** Get raw news mentions for a specific stock ticker. */
823
+ mentions(ticker: string, options?: RawMentionsOptions): Promise<NewsRawMentionsResponse>;
644
824
  /** Get AI-generated explanation for a stock's news trend. */
645
825
  explain(ticker: string): Promise<StockExplanationResponse>;
646
826
  /** Search for stocks by name or ticker in news. */
@@ -665,6 +845,8 @@ declare class XNamespace extends PlatformNamespace {
665
845
  trendingCountries(options?: TrendingGroupOptions): Promise<XTrendingCountry[]>;
666
846
  /** Get X/Twitter sentiment for a specific stock ticker. */
667
847
  stock(ticker: string, options?: StockOptions): Promise<XStockDetail>;
848
+ /** Get raw X/Twitter mentions for a specific stock ticker. */
849
+ mentions(ticker: string, options?: RawMentionsOptions): Promise<XRawMentionsResponse>;
668
850
  /** Get AI-generated explanation for a stock's X/Twitter trend. */
669
851
  explain(ticker: string): Promise<StockExplanationResponse>;
670
852
  /** Search for stocks by name or ticker on X/Twitter. */
@@ -673,6 +855,10 @@ declare class XNamespace extends PlatformNamespace {
673
855
  compare(tickers: string[], options?: CompareOptions): Promise<CompareResponse>;
674
856
  /** Get the service-level X/Twitter market sentiment snapshot. */
675
857
  marketSentiment(options?: MarketSentimentOptions): Promise<XMarketSentiment>;
858
+ /** Get X/Twitter data statistics. */
859
+ stats(): Promise<StatsResponse>;
860
+ /** Get public X/Twitter service health. */
861
+ health(): Promise<HealthResponse>;
676
862
  }
677
863
  declare class PolymarketNamespace extends PlatformNamespace {
678
864
  /** @internal */
@@ -685,16 +871,44 @@ declare class PolymarketNamespace extends PlatformNamespace {
685
871
  trendingCountries(options?: TrendingGroupOptions): Promise<PolymarketTrendingCountry[]>;
686
872
  /** Get Polymarket sentiment for a specific stock ticker. */
687
873
  stock(ticker: string, options?: StockOptions): Promise<PolymarketStockDetail>;
874
+ /** Get raw Polymarket snapshots for a specific stock ticker. */
875
+ mentions(ticker: string, options?: RawMentionsOptions): Promise<PolymarketRawMentionsResponse>;
688
876
  /** Search for stocks by name or ticker on Polymarket. */
689
877
  search(query: string, options?: SearchOptions): Promise<PolymarketSearchResponse>;
690
878
  /** Compare multiple stocks side-by-side on Polymarket. */
691
879
  compare(tickers: string[], options?: CompareOptions): Promise<PolymarketCompareResponse>;
692
880
  /** Get the service-level Polymarket market sentiment snapshot. */
693
881
  marketSentiment(options?: MarketSentimentOptions): Promise<PolymarketMarketSentiment>;
882
+ /** Get Polymarket data statistics. */
883
+ stats(): Promise<StatsResponse>;
884
+ /** Get public Polymarket service health. */
885
+ health(): Promise<HealthResponse>;
886
+ }
887
+ declare class RedditCryptoNamespace extends PlatformNamespace {
888
+ /** @internal */
889
+ constructor(http: HttpClient);
890
+ /** Get trending crypto tokens on Reddit. */
891
+ trending(options?: TrendingGroupOptions): Promise<CryptoTrendingToken[]>;
892
+ /** Get sentiment for a specific crypto token. */
893
+ token(symbol: string, options?: StockOptions): Promise<CryptoTokenSentiment>;
894
+ /** Get raw Reddit mentions for a specific crypto token. */
895
+ mentions(symbol: string, options?: RawMentionsOptions): Promise<CryptoRawMentionsResponse>;
896
+ /** Search crypto tokens by symbol, name, or alias. */
897
+ search(query: string, options?: SearchOptions): Promise<CryptoSearchResponse>;
898
+ /** Compare multiple crypto tokens side-by-side. */
899
+ compare(symbols: string[], options?: CompareOptions): Promise<CryptoCompareResponse>;
900
+ /** Get the service-level Reddit Crypto market sentiment snapshot. */
901
+ marketSentiment(options?: MarketSentimentOptions): Promise<CryptoMarketSentiment>;
902
+ /** Get Reddit crypto data statistics. */
903
+ stats(): Promise<CryptoStatsResponse>;
904
+ /** Get public Reddit crypto service health. */
905
+ health(): Promise<HealthResponse>;
694
906
  }
695
907
  declare class AdanosClient {
696
908
  readonly news: NewsNamespace;
697
909
  readonly reddit: RedditNamespace;
910
+ readonly crypto: RedditCryptoNamespace;
911
+ readonly redditCrypto: RedditCryptoNamespace;
698
912
  readonly x: XNamespace;
699
913
  readonly polymarket: PolymarketNamespace;
700
914
  /**
@@ -708,4 +922,4 @@ declare class AdanosClient {
708
922
  }
709
923
  declare const StockSentimentClient: typeof AdanosClient;
710
924
 
711
- export { AdanosClient, ApiError, type ClientOptions, type CompareOptions, type CompareResponse, type CompareStockItem, type DailyTrendItem, type HealthResponse, type MarketSentimentDriver, type MarketSentimentOptions, type NewsCompareOptions, type NewsCompareResponse, type NewsCompareStockItem, type NewsMarketSentiment, NewsNamespace, type NewsSearchResultItem, type NewsSearchSummary, type NewsSourceCount, type NewsSourceOptions, type NewsStockOptions, type NewsStockSentiment, type NewsTopMention, type NewsTrendingCountry, type NewsTrendingGroupOptions, type NewsTrendingOptions, type NewsTrendingSector, type NewsTrendingStock, type PolymarketCompareResponse, type PolymarketCompareStockItem, type PolymarketDailyTrendItem, type PolymarketMarketSentiment, type PolymarketMarketSentimentDriver, PolymarketNamespace, type PolymarketSearchResponse, type PolymarketSearchResultItem, type PolymarketSearchSummary, type PolymarketStockDetail, type PolymarketTopMention, type PolymarketTrendingCountry, type PolymarketTrendingSector, type PolymarketTrendingStock, type RedditMarketSentiment, RedditNamespace, type SchedulerStatus, type SearchOptions, type SearchResponse, type SearchResultItem, 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 XDailyTrendItem, type XMarketSentiment, XNamespace, type XSearchResponse, type XSearchResultItem, type XSearchSummary, type XStockDetail, type XTopTweet, type XTrendingCountry, type XTrendingSector, type XTrendingStock };
925
+ export { AdanosClient, ApiError, type ClientOptions, type CompareOptions, type CompareResponse, type CompareStockItem, type CryptoCompareResponse, type CryptoCompareTokenItem, type CryptoMarketSentiment, type CryptoRawMentionItem, type CryptoRawMentionsResponse, type CryptoSearchItem, type CryptoSearchResponse, type CryptoStatsResponse, type CryptoTokenSentiment, type CryptoTrendingToken, type DailyTrendItem, type HealthResponse, 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 NewsStockOptions, type NewsStockSentiment, type NewsTopMention, type NewsTrendingCountry, type NewsTrendingGroupOptions, type NewsTrendingOptions, type NewsTrendingSector, type NewsTrendingStock, type PolymarketCompareResponse, type PolymarketCompareStockItem, type PolymarketDailyTrendItem, type PolymarketMarketSentiment, type PolymarketMarketSentimentDriver, PolymarketNamespace, type PolymarketRawMentionItem, type PolymarketRawMentionsResponse, type PolymarketSearchResponse, type PolymarketSearchResultItem, type PolymarketSearchSummary, type PolymarketStockDetail, type PolymarketTopMention, type PolymarketTrendingCountry, type PolymarketTrendingSector, type PolymarketTrendingStock, type RawMentionsOptions, RedditCryptoNamespace, type RedditMarketSentiment, RedditNamespace, type RedditRawMentionItem, type RedditRawMentionsResponse, type SchedulerStatus, type SearchOptions, type SearchResponse, type SearchResultItem, 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 XDailyTrendItem, type XMarketSentiment, XNamespace, type XRawMentionItem, type XRawMentionsResponse, type XSearchResponse, type XSearchResultItem, type XSearchSummary, type XStockDetail, type XTopTweet, type XTrendingCountry, type XTrendingSector, type XTrendingStock };