feat(api): add MSN Finance as alternative data provider

Add MsnProvider implementing MarketDataProvider trait with quote,
fundamentals, and history support. Includes provider-aware config
(file/env/CLI), cache namespace isolation per provider, symbol ID
mapping via embedded TSV, OHLCV resampling, and comprehensive unit
+ integration tests with MSN fixture data.

Key changes:
- MsnProvider with quote, key-ratios, and chart endpoints
- ProviderKind enum (yahoo/msn) with config hierarchy support
- Provider-namespaced cache buckets to prevent cross-provider poisoning
- Provider-aware MockProvider loading correct fixtures per provider
- Integration tests for config round-trip and cache isolation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
0xrsydn 2026-03-06 10:19:10 +00:00
commit 2cdefeb7a6
11 changed files with 2099 additions and 36 deletions

View file

@ -24,7 +24,13 @@ fn main() {
fn run() -> Result<(), IdxError> {
let cli = Cli::parse();
let config = IdxConfig::load_with_cli(&cli)?;
let config = match IdxConfig::load_with_cli(&cli) {
Ok(config) => config,
Err(err) => {
eprintln!("Error: {err}");
return Err(err);
}
};
match &cli.command {
Commands::Version => {
@ -40,7 +46,7 @@ fn run() -> Result<(), IdxError> {
}
}
Commands::Stocks(stocks) => {
let provider = default_provider(cli.verbose > 0);
let provider = default_provider(config.provider, cli.verbose > 0);
if let Err(err) = cli::stocks::handle(
stocks,
&config,