Price Fetching
Basic Usage
Command-Line Interface
# Fetch latest prices for all assets
bean-price ledger.beancount
# Fetch historical prices
bean-price --date=2024-01-15 ledger.beancount
# Fetch specific symbols
bean-price -e "USD:google/NASDAQ:AAPL" "USD:yahoo/VTSAX"
Price Source Configuration
Commodity Declarations
; Stock with single price source
2024-01-01 commodity AAPL
price: "USD:google/NASDAQ:AAPL"
; Currency with multiple sources
2024-01-01 commodity EUR
price: "USD:google/CURRENCY:EURUSD,yahoo/EURUSD"
; Asset with multiple quote currencies
2024-01-01 commodity GBP
price: "USD:yahoo/GBPUSD CAD:yahoo/GBPCAD"
Source String Format
<quote-currency>:<module>/[^]<symbol>
Components:
- quote-currency: Currency for price (USD, EUR, etc.)
- module: Price fetcher implementation
- symbol: Exchange-specific identifier