๐ Asset Providers (Developer)
This section provides the technical deep-dive for each asset pricing provider in LibreFolio. For the end-user perspective, see the User Manual โ Providers.
๐ฆ Providers at a Glance
| Provider | Code | Features | get_asset_url |
params_schema |
Identifier Types | Test Level |
|---|---|---|---|---|---|---|
| Yahoo Finance | yfinance |
History, Search, Metadata | โ | โ | TICKER, ISIN | Beta |
| JustETF | justetf |
History, Search, Metadata | โ | โ | ISIN | Beta |
| Borsa Italiana | borsa_italiana |
History, Search, Metadata | โ | โ | ISIN | Beta |
| CSS Scraper | cssscraper |
Current Value | โ | โ | URL | Beta |
| Scheduled Investment | scheduled_investment |
History (Calc), Events | โ | โ | AUTO_GENERATED | Beta |
| Mock Provider | mockprov |
History, Search | โ | โ | TICKER, ISIN | Alpha |
๐ Feature Key
- ๐ History: Can fetch historical OHLC data.
- ๐ Search: Supports searching for assets by name/ticker. Detected via
test_search_query is not None. - ๐ Metadata: Can fetch asset details (sector, description, identifiers) via
fetch_asset_metadata(). - ๐ฐ Current Value: Can fetch the latest real-time price.
- ๐ Events: Can produce asset events (dividends, interest, settlements) via
supports_events = True. - ๐
get_asset_url: Generates a link to the provider's page for this asset (e.g., Yahoo Finance quote page). - ๐งฉ
params_schema: Exposes a form schema for the frontend to render dynamic configuration fields. - ๐งช Probe: All providers support
POST /assets/provider/probefor dry-run testing (current_price,history,metadataoperations).
๐ Notes
- CSS Scraper
get_asset_urlreturns the identifier itself (which is the URL to scrape). - Scheduled Investment uses
AUTO_GENERATEDidentifier type โ no external identifier needed. - Mock Provider (
mockprov) is only registered whenLIBREFOLIO_TEST_MODEis enabled.
๐ Yahoo Finance (yfinance)
The primary market data provider โ fetches stock, ETF, crypto, and index prices using the yfinance library.
- Features: History, Search, Metadata, Current Value
- Identifier types:
TICKER,ISIN - Key details:
ticker.infofor current price (nohistory()orfast_info), search caching (10 min TTL), currency caching (24h), sector/geographic metadata - ๐ Technical Details โ
- ๐ User Guide โ
๐ JustETF (justetf)
Specialized ETF provider โ fetches data from justetf.com including sector and geographic distributions.
- Features: History, Search, Metadata, Current Value (Gettex)
- Identifier types:
ISIN - Key details: Cached ETF list for instant search, Gettex WebSocket for real-time quotes, geographic/sector distributions, pre-warm at startup
- ๐ Technical Details โ
- ๐ User Guide โ
๐ฎ๐น Borsa Italiana (borsa_italiana)
Italian market data provider โ fetches stocks, bonds (BTP), and ETFs listed on Borsa Italiana using the borsa-italiana-scraping library.
- Features: History, Search, Metadata, Current Value
- Identifier types:
ISIN - Provider params: Optional
language("en"/"it") โ controls names, metadata, and search results language - Key details: Full OHLCV history, dual-language search with flag emojis, instrument page scraping for metadata, geographic/sector inference, shared HTTP session with WAF/JWT handling
- ๐ Technical Details โ
๐ CSS Scraper (cssscraper)
A versatile provider that can extract a current price from any public webpage using a CSS selector. Useful for tracking assets from niche sources without an API.
- Features: Current Value only (no historical data)
- Identifier type:
URL - Key config:
current_css_selector,currency,decimal_format - ๐ Technical Details โ
- ๐ User Guide โ
๐
Scheduled Investment (scheduled_investment)
A synthetic, deterministic provider that calculates asset value based on a predefined interest schedule. No external calls, no DB access โ pure math.
- Features: Calculated History, Auto-generated Events (๐ต INTEREST, ๐ MATURITY_SETTLEMENT)
- Identifier type:
AUTO_GENERATED - Key config:
initial_value,schedule[],day_count,interest_type,late_interest - ๐ Technical Details โ
- ๐ User Guide โ
๐ Related Documentation
- ๐ Asset Events โ Event types, dedup strategy, MATURITY_SETTLEMENT
- ๐ Day Count Conventions โ ACT/365, ACT/360, 30/360, ACT/ACT
- ๐ Asset Types โ CROWDFUND_LOAN, BOND, etc.
- ๐ฐ Asset Architecture โ Sync pipeline and event persistence
- ๐ Asset Plugin Guide โ How to create a new provider