mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
Fix Yahoo schema handling, integer IDR prices, and resilience
This commit is contained in:
parent
dc1de5b344
commit
f3cefaaaf4
7 changed files with 237 additions and 54 deletions
|
|
@ -25,11 +25,11 @@ pub fn resolve_symbol(symbol: &str, exchange: &str) -> String {
|
|||
format!("{trimmed}.{}", exchange.trim().to_uppercase())
|
||||
}
|
||||
|
||||
pub fn default_provider() -> Box<dyn MarketDataProvider> {
|
||||
pub fn default_provider(verbose: bool) -> Box<dyn MarketDataProvider> {
|
||||
if std::env::var("IDX_USE_MOCK_PROVIDER").is_ok() {
|
||||
Box::new(MockProvider::from_fixtures())
|
||||
} else {
|
||||
Box::new(yahoo::YahooProvider::new())
|
||||
Box::new(yahoo::YahooProvider::new(verbose))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue