agent-finance-cli 0.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.
Files changed (48) hide show
  1. package/Cargo.lock +2632 -0
  2. package/Cargo.toml +31 -0
  3. package/LICENSE-APACHE +202 -0
  4. package/LICENSE-MIT +21 -0
  5. package/README.md +119 -0
  6. package/bin/agent-finance.js +27 -0
  7. package/npm/check-binary-links.js +50 -0
  8. package/npm/check-package.js +39 -0
  9. package/npm/create-platform-package.js +90 -0
  10. package/npm/platform.js +33 -0
  11. package/npm/postinstall.js +62 -0
  12. package/npm/resolve-binary.js +38 -0
  13. package/package.json +54 -0
  14. package/skills/core-full.md +74 -0
  15. package/skills/core.md +59 -0
  16. package/skills/futures.md +18 -0
  17. package/skills/history-indicators.md +42 -0
  18. package/skills/price.md +40 -0
  19. package/skills/providers.md +25 -0
  20. package/skills/research-data.md +34 -0
  21. package/src/app.rs +642 -0
  22. package/src/cache.rs +67 -0
  23. package/src/cli.rs +651 -0
  24. package/src/history.rs +150 -0
  25. package/src/http.rs +76 -0
  26. package/src/indicators.rs +82 -0
  27. package/src/lib.rs +15 -0
  28. package/src/main.rs +4 -0
  29. package/src/model.rs +347 -0
  30. package/src/output.rs +544 -0
  31. package/src/page_read.rs +443 -0
  32. package/src/price.rs +255 -0
  33. package/src/providers/binance_futures.rs +342 -0
  34. package/src/providers/capabilities.rs +322 -0
  35. package/src/providers/cnbc.rs +302 -0
  36. package/src/providers/mod.rs +117 -0
  37. package/src/providers/robinhood.rs +580 -0
  38. package/src/providers/sec_edgar.rs +399 -0
  39. package/src/providers/stooq/catalog.rs +159 -0
  40. package/src/providers/stooq.rs +904 -0
  41. package/src/providers/yahoo.rs +836 -0
  42. package/src/research/fetchers.rs +111 -0
  43. package/src/research/highlights.rs +345 -0
  44. package/src/research/mod.rs +943 -0
  45. package/src/research/tests.rs +42 -0
  46. package/src/skills.rs +58 -0
  47. package/src/stream.rs +356 -0
  48. package/src/time.rs +21 -0
package/src/cli.rs ADDED
@@ -0,0 +1,651 @@
1
+ use std::path::PathBuf;
2
+
3
+ use clap::{Parser, Subcommand, ValueEnum};
4
+
5
+ use crate::time::DEFAULT_TIMEZONE;
6
+ pub const HISTORY_INTERVAL_HELP: &str = "Bar interval. Provider-specific values: Yahoo 1m/2m/5m/15m/30m/60m/90m/1h/1d/5d/1wk/1mo/3mo; Robinhood 5m/10m/1h/1d/1w; Stooq live 1d/1w/1mo; Stooq bulk 5m/1h after sync; Binance klines 1m/3m/5m/15m/30m/1h/2h/4h/6h/8h/12h/1d/3d/1w/1M.";
7
+
8
+ #[derive(Parser, Debug)]
9
+ #[command(name = "agent-finance")]
10
+ #[command(
11
+ about = "Fetch financial market data and research context for humans and AI agents.",
12
+ after_help = "AI agents: start with `agent-finance skills get core` before choosing provider-specific commands."
13
+ )]
14
+ pub struct Cli {
15
+ /// Explicit proxy URL, for example http://127.0.0.1:7890 or socks5h://127.0.0.1:7890.
16
+ /// If omitted, AGENT_FINANCE_PROXY and standard proxy environment variables are checked.
17
+ #[arg(long, global = true)]
18
+ pub proxy: Option<String>,
19
+
20
+ /// Disable proxy use for this invocation.
21
+ #[arg(long, global = true)]
22
+ pub no_proxy: bool,
23
+
24
+ /// Human-output timezone. UTC is still preserved in JSON fields.
25
+ #[arg(long, global = true, default_value = DEFAULT_TIMEZONE)]
26
+ pub timezone: String,
27
+
28
+ /// HTTP timeout in seconds.
29
+ #[arg(long, global = true, default_value_t = 10)]
30
+ pub timeout_seconds: u64,
31
+
32
+ #[command(subcommand)]
33
+ pub command: Command,
34
+ }
35
+
36
+ #[derive(Subcommand, Debug)]
37
+ pub enum Command {
38
+ /// Print the current investable price summary for one or more symbols.
39
+ Price(PriceArgs),
40
+ /// Print regular/pre/post/overnight/provider split for one symbol.
41
+ Sessions(SessionsArgs),
42
+ /// Fetch OHLCV history.
43
+ History(HistoryArgs),
44
+ /// Compute local derived indicators from history.
45
+ Indicators(IndicatorsArgs),
46
+ /// Fetch Binance futures / TradFi proxy stats.
47
+ Futures(FuturesArgs),
48
+ /// Fetch fundamentals, valuation, statements, cash-flow, and SEC official facts.
49
+ Fundamentals(ProviderResearchArgs),
50
+ /// Fetch Yahoo analyst targets, recommendations, estimates, and revisions.
51
+ Analysis(ResearchArgs),
52
+ /// Fetch Yahoo option expiries and nearest/full option chains.
53
+ Options(OptionsArgs),
54
+ /// Fetch Yahoo holder and insider ownership modules.
55
+ Ownership(ResearchArgs),
56
+ /// Fetch earnings/dividend/split/calendar modules and SEC filing events.
57
+ Events(ProviderResearchArgs),
58
+ /// Fetch Yahoo news/search articles for a ticker.
59
+ News(NewsArgs),
60
+ /// Read a URL into AI-friendly text/Markdown with extraction fallbacks.
61
+ ReadUrl(ReadUrlArgs),
62
+ /// Search Yahoo Finance for tickers and news.
63
+ Search(SearchArgs),
64
+ /// Run Yahoo predefined screeners.
65
+ Screen(ScreenArgs),
66
+ /// Inspect or import Stooq bulk historical data packages.
67
+ Stooq(StooqArgs),
68
+ /// Print provider capability matrix.
69
+ Providers(ProvidersArgs),
70
+ /// Poll live price summaries repeatedly.
71
+ Watch(WatchArgs),
72
+ /// Stream Yahoo real-time price updates over WebSocket.
73
+ Stream(StreamArgs),
74
+ /// Print built-in AI-agent skill documents.
75
+ Skills(SkillsArgs),
76
+ }
77
+
78
+ #[derive(Parser, Debug)]
79
+ pub struct PriceArgs {
80
+ #[arg(required = true)]
81
+ pub symbols: Vec<String>,
82
+
83
+ #[arg(long, value_enum, default_value_t = SessionMode::Smart)]
84
+ pub session: SessionMode,
85
+
86
+ /// Optional Binance futures / TradFi proxy symbol to display beside the quote.
87
+ #[arg(long)]
88
+ pub proxy_symbol: Option<String>,
89
+
90
+ #[arg(long, default_value_t = false)]
91
+ pub json: bool,
92
+ }
93
+
94
+ #[derive(Parser, Debug)]
95
+ pub struct SessionsArgs {
96
+ pub symbol: String,
97
+
98
+ /// Optional Binance futures / TradFi proxy symbol to display beside the quote.
99
+ #[arg(long)]
100
+ pub proxy_symbol: Option<String>,
101
+
102
+ #[arg(long, default_value_t = false)]
103
+ pub json: bool,
104
+ }
105
+
106
+ #[derive(Parser, Debug)]
107
+ pub struct HistoryArgs {
108
+ pub symbol: String,
109
+
110
+ #[arg(long, value_enum, default_value_t = Provider::Auto)]
111
+ pub provider: Provider,
112
+
113
+ #[arg(long, value_enum, default_value_t = HistorySession::Regular)]
114
+ pub session: HistorySession,
115
+
116
+ #[arg(long, value_enum, default_value_t = HistoryAdjustment::Auto)]
117
+ pub adjustment: HistoryAdjustment,
118
+
119
+ #[arg(long)]
120
+ pub no_actions: bool,
121
+
122
+ #[arg(long)]
123
+ pub repair: bool,
124
+
125
+ #[arg(long, default_value = "1d", help = HISTORY_INTERVAL_HELP)]
126
+ pub interval: String,
127
+
128
+ #[arg(long, default_value = "6mo")]
129
+ pub range: String,
130
+
131
+ #[arg(long, default_value_t = 60)]
132
+ pub limit: usize,
133
+
134
+ /// Stooq bulk market scope for 5m/1h cache reads.
135
+ #[arg(long, value_enum, default_value_t = StooqMarket::Us)]
136
+ pub stooq_market: StooqMarket,
137
+
138
+ /// Stooq bulk asset scope for 5m/1h cache reads.
139
+ #[arg(long, value_enum, default_value_t = StooqAsset::Stocks)]
140
+ pub stooq_asset: StooqAsset,
141
+
142
+ #[arg(long)]
143
+ pub json: bool,
144
+ }
145
+
146
+ #[derive(Parser, Debug)]
147
+ pub struct IndicatorsArgs {
148
+ #[arg(required = true)]
149
+ pub symbols: Vec<String>,
150
+
151
+ #[arg(long, value_enum, default_value_t = Provider::Auto)]
152
+ pub provider: Provider,
153
+
154
+ #[arg(long, value_enum, default_value_t = HistorySession::Regular)]
155
+ pub session: HistorySession,
156
+
157
+ #[arg(long, value_enum, default_value_t = HistoryAdjustment::Auto)]
158
+ pub adjustment: HistoryAdjustment,
159
+
160
+ #[arg(long)]
161
+ pub repair: bool,
162
+
163
+ #[arg(long, default_value = "1d", help = HISTORY_INTERVAL_HELP)]
164
+ pub interval: String,
165
+
166
+ #[arg(long, default_value = "1y")]
167
+ pub range: String,
168
+
169
+ #[arg(long, default_value_t = 120)]
170
+ pub limit: usize,
171
+
172
+ /// Stooq bulk market scope for 5m/1h cache reads.
173
+ #[arg(long, value_enum, default_value_t = StooqMarket::Us)]
174
+ pub stooq_market: StooqMarket,
175
+
176
+ /// Stooq bulk asset scope for 5m/1h cache reads.
177
+ #[arg(long, value_enum, default_value_t = StooqAsset::Stocks)]
178
+ pub stooq_asset: StooqAsset,
179
+
180
+ #[arg(long)]
181
+ pub json: bool,
182
+ }
183
+
184
+ #[derive(Parser, Debug)]
185
+ pub struct FuturesArgs {
186
+ /// Binance USD-M futures / TradFi proxy symbol, for example SPCXUSDT.
187
+ pub symbol: String,
188
+
189
+ #[arg(long, default_value_t = 8)]
190
+ pub funding_limit: usize,
191
+
192
+ #[arg(long)]
193
+ pub json: bool,
194
+ }
195
+
196
+ #[derive(Parser, Debug)]
197
+ pub struct ResearchArgs {
198
+ pub symbol: String,
199
+
200
+ /// Print raw provider payload in human mode. JSON mode always includes payload.
201
+ #[arg(long)]
202
+ pub raw: bool,
203
+
204
+ /// Ignore cache and fetch live.
205
+ #[arg(long)]
206
+ pub refresh: bool,
207
+
208
+ /// Cache TTL for non-price data.
209
+ #[arg(long, default_value_t = 3600)]
210
+ pub cache_ttl_seconds: u64,
211
+
212
+ #[arg(long)]
213
+ pub json: bool,
214
+ }
215
+
216
+ #[derive(Parser, Debug)]
217
+ pub struct ProviderResearchArgs {
218
+ pub symbol: String,
219
+
220
+ /// Research-data provider. auto merges no-key sources when they add useful coverage.
221
+ #[arg(long, value_enum, default_value_t = ResearchProvider::Auto)]
222
+ pub provider: ResearchProvider,
223
+
224
+ /// Print raw provider payload in human mode. JSON mode always includes payload.
225
+ #[arg(long)]
226
+ pub raw: bool,
227
+
228
+ /// Ignore cache and fetch live.
229
+ #[arg(long)]
230
+ pub refresh: bool,
231
+
232
+ /// Cache TTL for non-price data.
233
+ #[arg(long, default_value_t = 3600)]
234
+ pub cache_ttl_seconds: u64,
235
+
236
+ #[arg(long)]
237
+ pub json: bool,
238
+ }
239
+
240
+ impl ProviderResearchArgs {
241
+ pub fn without_provider(self) -> ResearchArgs {
242
+ ResearchArgs {
243
+ symbol: self.symbol,
244
+ raw: self.raw,
245
+ refresh: self.refresh,
246
+ cache_ttl_seconds: self.cache_ttl_seconds,
247
+ json: self.json,
248
+ }
249
+ }
250
+ }
251
+
252
+ #[derive(Parser, Debug)]
253
+ pub struct OptionsArgs {
254
+ pub symbol: String,
255
+
256
+ /// Options-data provider.
257
+ #[arg(long, value_enum, default_value_t = OptionsProvider::Auto)]
258
+ pub provider: OptionsProvider,
259
+
260
+ /// Expiration unix timestamp. If omitted, Yahoo returns the nearest chain and all expiries.
261
+ #[arg(long)]
262
+ pub expiry: Option<i64>,
263
+
264
+ /// Robinhood expiration date in YYYY-MM-DD. Overrides --expiry for Robinhood.
265
+ #[arg(long)]
266
+ pub expiration_date: Option<String>,
267
+
268
+ /// Maximum Robinhood option instruments to fetch for the selected expiration.
269
+ #[arg(long, default_value_t = 80)]
270
+ pub count: usize,
271
+
272
+ #[arg(long)]
273
+ pub raw: bool,
274
+
275
+ #[arg(long)]
276
+ pub refresh: bool,
277
+
278
+ #[arg(long, default_value_t = 1800)]
279
+ pub cache_ttl_seconds: u64,
280
+
281
+ #[arg(long)]
282
+ pub json: bool,
283
+ }
284
+
285
+ #[derive(Parser, Debug)]
286
+ pub struct NewsArgs {
287
+ pub symbol: String,
288
+
289
+ #[arg(long, default_value_t = 10)]
290
+ pub count: usize,
291
+
292
+ #[arg(long)]
293
+ pub raw: bool,
294
+
295
+ #[arg(long)]
296
+ pub refresh: bool,
297
+
298
+ #[arg(long, default_value_t = 900)]
299
+ pub cache_ttl_seconds: u64,
300
+
301
+ #[arg(long)]
302
+ pub json: bool,
303
+ }
304
+
305
+ #[derive(Parser, Debug)]
306
+ pub struct ReadUrlArgs {
307
+ pub url: String,
308
+
309
+ /// URL reader provider. auto tries direct/Jina/Defuddle; SEC Archives prefer reader fallbacks.
310
+ #[arg(long, value_enum, default_value_t = ReadUrlProvider::Auto)]
311
+ pub provider: ReadUrlProvider,
312
+
313
+ /// Maximum content characters to print in human mode. 0 means no truncation.
314
+ #[arg(long, default_value_t = 20000)]
315
+ pub max_chars: usize,
316
+
317
+ #[arg(long)]
318
+ pub json: bool,
319
+ }
320
+
321
+ #[derive(Parser, Debug)]
322
+ pub struct SearchArgs {
323
+ pub query: String,
324
+
325
+ #[arg(long, default_value_t = 8)]
326
+ pub quotes_count: usize,
327
+
328
+ #[arg(long, default_value_t = 5)]
329
+ pub news_count: usize,
330
+
331
+ #[arg(long)]
332
+ pub raw: bool,
333
+
334
+ #[arg(long)]
335
+ pub refresh: bool,
336
+
337
+ #[arg(long, default_value_t = 1800)]
338
+ pub cache_ttl_seconds: u64,
339
+
340
+ #[arg(long)]
341
+ pub json: bool,
342
+ }
343
+
344
+ #[derive(Parser, Debug)]
345
+ pub struct ScreenArgs {
346
+ /// Yahoo predefined screener id, for example most_actives, day_gainers, day_losers.
347
+ #[arg(default_value = "most_actives")]
348
+ pub screener: String,
349
+
350
+ #[arg(long, default_value_t = 25)]
351
+ pub count: usize,
352
+
353
+ #[arg(long)]
354
+ pub raw: bool,
355
+
356
+ #[arg(long)]
357
+ pub refresh: bool,
358
+
359
+ #[arg(long, default_value_t = 1800)]
360
+ pub cache_ttl_seconds: u64,
361
+
362
+ #[arg(long)]
363
+ pub json: bool,
364
+ }
365
+
366
+ #[derive(Parser, Debug)]
367
+ pub struct StooqArgs {
368
+ #[command(subcommand)]
369
+ pub command: StooqCommand,
370
+ }
371
+
372
+ #[derive(Subcommand, Debug)]
373
+ pub enum StooqCommand {
374
+ /// Print known Stooq bulk packages and current local cache state.
375
+ Catalog(StooqCatalogArgs),
376
+ /// Import a Stooq bulk ZIP from a captcha-authorized URL or local file into cache.
377
+ Sync(StooqSyncArgs),
378
+ }
379
+
380
+ #[derive(Parser, Debug)]
381
+ pub struct StooqCatalogArgs {
382
+ #[arg(long)]
383
+ pub json: bool,
384
+ }
385
+
386
+ #[derive(Parser, Debug)]
387
+ pub struct StooqSyncArgs {
388
+ #[arg(long, value_enum)]
389
+ pub frequency: StooqFrequency,
390
+
391
+ #[arg(long, value_enum)]
392
+ pub market: StooqMarket,
393
+
394
+ #[arg(long, value_enum)]
395
+ pub asset: StooqAsset,
396
+
397
+ /// Captcha-authorized Stooq ZIP download URL.
398
+ #[arg(long)]
399
+ pub url: Option<String>,
400
+
401
+ /// Local Stooq ZIP file to import.
402
+ #[arg(long)]
403
+ pub zip_path: Option<PathBuf>,
404
+
405
+ /// Overwrite an existing cached ZIP.
406
+ #[arg(long)]
407
+ pub force: bool,
408
+
409
+ #[arg(long)]
410
+ pub json: bool,
411
+ }
412
+
413
+ #[derive(Parser, Debug)]
414
+ pub struct ProvidersArgs {
415
+ #[arg(long)]
416
+ pub json: bool,
417
+ }
418
+
419
+ #[derive(Parser, Debug)]
420
+ pub struct WatchArgs {
421
+ #[arg(required = true)]
422
+ pub symbols: Vec<String>,
423
+
424
+ #[arg(long, default_value_t = 15)]
425
+ pub interval_seconds: u64,
426
+
427
+ /// Number of polling iterations. 0 means run until interrupted.
428
+ #[arg(long, default_value_t = 1)]
429
+ pub iterations: usize,
430
+
431
+ #[arg(long)]
432
+ pub json: bool,
433
+ }
434
+
435
+ #[derive(Parser, Debug)]
436
+ pub struct StreamArgs {
437
+ #[arg(required = true)]
438
+ pub symbols: Vec<String>,
439
+
440
+ /// Number of price updates to print before exiting. 0 streams until interrupted; JSON mode then prints JSON Lines.
441
+ #[arg(long, default_value_t = 5)]
442
+ pub messages: usize,
443
+
444
+ /// Yahoo streamer URL.
445
+ #[arg(long, default_value = "wss://streamer.finance.yahoo.com/?version=2")]
446
+ pub url: String,
447
+
448
+ #[arg(long)]
449
+ pub json: bool,
450
+ }
451
+
452
+ #[derive(Parser, Debug)]
453
+ pub struct SkillsArgs {
454
+ #[command(subcommand)]
455
+ pub command: SkillsCommand,
456
+ }
457
+
458
+ #[derive(Subcommand, Debug)]
459
+ pub enum SkillsCommand {
460
+ /// List built-in AI-agent skill documents served by this CLI.
461
+ List,
462
+ /// Print a built-in skill document.
463
+ Get(SkillGetArgs),
464
+ }
465
+
466
+ #[derive(Parser, Debug)]
467
+ pub struct SkillGetArgs {
468
+ /// Skill name. Start with "core".
469
+ pub name: String,
470
+
471
+ /// Include fuller command reference and templates when available.
472
+ #[arg(long)]
473
+ pub full: bool,
474
+ }
475
+
476
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
477
+ pub enum SessionMode {
478
+ Smart,
479
+ Regular,
480
+ Extended,
481
+ Overnight,
482
+ All,
483
+ }
484
+
485
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
486
+ pub enum HistorySession {
487
+ Regular,
488
+ Extended,
489
+ }
490
+
491
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
492
+ pub enum StooqFrequency {
493
+ #[value(name = "daily")]
494
+ Daily,
495
+ #[value(name = "hourly")]
496
+ Hourly,
497
+ #[value(name = "5m", alias = "five-min")]
498
+ FiveMin,
499
+ }
500
+
501
+ impl StooqFrequency {
502
+ pub const fn label(self) -> &'static str {
503
+ match self {
504
+ StooqFrequency::Daily => "daily",
505
+ StooqFrequency::Hourly => "hourly",
506
+ StooqFrequency::FiveMin => "5m",
507
+ }
508
+ }
509
+ }
510
+
511
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
512
+ pub enum StooqMarket {
513
+ Us,
514
+ World,
515
+ Macro,
516
+ }
517
+
518
+ impl StooqMarket {
519
+ pub const fn label(self) -> &'static str {
520
+ match self {
521
+ StooqMarket::Us => "us",
522
+ StooqMarket::World => "world",
523
+ StooqMarket::Macro => "macro",
524
+ }
525
+ }
526
+ }
527
+
528
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
529
+ pub enum StooqAsset {
530
+ Stocks,
531
+ Etfs,
532
+ Currencies,
533
+ Crypto,
534
+ Macro,
535
+ }
536
+
537
+ impl StooqAsset {
538
+ pub const fn label(self) -> &'static str {
539
+ match self {
540
+ StooqAsset::Stocks => "stocks",
541
+ StooqAsset::Etfs => "etfs",
542
+ StooqAsset::Currencies => "currencies",
543
+ StooqAsset::Crypto => "crypto",
544
+ StooqAsset::Macro => "macro",
545
+ }
546
+ }
547
+ }
548
+
549
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
550
+ pub enum HistoryAdjustment {
551
+ /// Raw Yahoo close/OHLC with Adj Close preserved separately when available.
552
+ Raw,
553
+ /// Adjust OHLC and Close by Adj Close / Close, matching yfinance auto_adjust.
554
+ Auto,
555
+ /// Adjust OHLC by Adj Close / Close while keeping raw Close, matching yfinance back_adjust.
556
+ Back,
557
+ }
558
+
559
+ impl HistoryAdjustment {
560
+ pub fn label(self) -> &'static str {
561
+ match self {
562
+ HistoryAdjustment::Raw => "raw",
563
+ HistoryAdjustment::Auto => "auto",
564
+ HistoryAdjustment::Back => "back",
565
+ }
566
+ }
567
+ }
568
+
569
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
570
+ pub enum Provider {
571
+ Auto,
572
+ Yahoo,
573
+ YahooExtended,
574
+ YahooBoats,
575
+ Stooq,
576
+ CnbcExtended,
577
+ Robinhood,
578
+ BinanceFutures,
579
+ }
580
+
581
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
582
+ pub enum OptionsProvider {
583
+ Auto,
584
+ Yahoo,
585
+ Robinhood,
586
+ }
587
+
588
+ impl OptionsProvider {
589
+ pub const fn label(self) -> &'static str {
590
+ match self {
591
+ OptionsProvider::Auto => "auto",
592
+ OptionsProvider::Yahoo => "yahoo",
593
+ OptionsProvider::Robinhood => "robinhood",
594
+ }
595
+ }
596
+ }
597
+
598
+ impl Provider {
599
+ pub const fn label(self) -> &'static str {
600
+ match self {
601
+ Provider::Auto => "auto",
602
+ Provider::Yahoo => "yahoo",
603
+ Provider::YahooExtended => "yahoo-extended",
604
+ Provider::YahooBoats => "yahoo-boats",
605
+ Provider::Stooq => "stooq",
606
+ Provider::CnbcExtended => "cnbc-extended",
607
+ Provider::Robinhood => "robinhood",
608
+ Provider::BinanceFutures => "binance-futures",
609
+ }
610
+ }
611
+ }
612
+
613
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
614
+ pub enum ResearchProvider {
615
+ Auto,
616
+ Yahoo,
617
+ SecEdgar,
618
+ Robinhood,
619
+ Cnbc,
620
+ }
621
+
622
+ #[derive(Clone, Copy, Debug, Eq, PartialEq, ValueEnum)]
623
+ pub enum ReadUrlProvider {
624
+ Auto,
625
+ Direct,
626
+ Defuddle,
627
+ Jina,
628
+ }
629
+
630
+ impl ReadUrlProvider {
631
+ pub const fn label(self) -> &'static str {
632
+ match self {
633
+ ReadUrlProvider::Auto => "auto",
634
+ ReadUrlProvider::Direct => "direct",
635
+ ReadUrlProvider::Defuddle => "defuddle",
636
+ ReadUrlProvider::Jina => "jina",
637
+ }
638
+ }
639
+ }
640
+
641
+ impl ResearchProvider {
642
+ pub const fn label(self) -> &'static str {
643
+ match self {
644
+ ResearchProvider::Auto => "auto",
645
+ ResearchProvider::Yahoo => "yahoo",
646
+ ResearchProvider::SecEdgar => "sec-edgar",
647
+ ResearchProvider::Robinhood => "robinhood",
648
+ ResearchProvider::Cnbc => "cnbc",
649
+ }
650
+ }
651
+ }