mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
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:
parent
3383fdd983
commit
2cdefeb7a6
11 changed files with 2099 additions and 36 deletions
36
tests/fixtures/msn_keyratios_bbca.json
vendored
Normal file
36
tests/fixtures/msn_keyratios_bbca.json
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
[
|
||||
{
|
||||
"stockId": "bn91jc",
|
||||
"symbol": "BBCA",
|
||||
"displayName": "Bank Central Asia Tbk",
|
||||
"shortName": "Bank Central Asia",
|
||||
"industryMetrics": [
|
||||
{
|
||||
"year": "2025",
|
||||
"fiscalPeriodType": "FY",
|
||||
"revenueGrowthRate": 0.081,
|
||||
"earningsGrowthRate": 0.121,
|
||||
"netMargin": 0.324,
|
||||
"roe": 0.198,
|
||||
"returnOnAssetCurrent": 0.031,
|
||||
"debtToEquityRatio": 0.42,
|
||||
"currentRatio": 1.18,
|
||||
"priceToEarningsRatio": 25.4,
|
||||
"priceToBookRatio": 4.6
|
||||
},
|
||||
{
|
||||
"year": "2024",
|
||||
"fiscalPeriodType": "FY",
|
||||
"revenueGrowthRate": 0.073,
|
||||
"earningsGrowthRate": 0.102,
|
||||
"netMargin": 0.311,
|
||||
"roe": 0.187,
|
||||
"returnOnAssetCurrent": 0.029,
|
||||
"debtToEquityRatio": 0.45,
|
||||
"currentRatio": 1.14,
|
||||
"priceToEarningsRatio": 24.1,
|
||||
"priceToBookRatio": 4.2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue