FX History

Inspect the local FX rate cache that powers historical currency conversion. Run firma sync (or firma sync fx) to populate it from FRED. Stored as "foreign per 1 USD" for KRW, JPY, EUR, CNY, and GBP.

Without arguments, shows per-currency coverage of the cache: how many rows are stored for each currency, and the date range covered. Useful for verifying that the backfill completed and that the cache spans your earliest entry date.
$firma show fx
CURRENCYROWSFIRSTLAST
CNY19052018-08-282026-04-17
EUR19052018-08-282026-04-17
GBP19052018-08-282026-04-17
JPY19052018-08-282026-04-17
KRW19052018-08-282026-04-17
USD has no rows. It's the base currency, always 1.0 in code. The FIRST date is your earliest transaction/balance/flow date (or close to it), since that's the backfill anchor.
With a currency code, shows the most recent N rates (default 30):
$firma show fx KRW --limit 5
DATEKRW per USD
2026-04-171461.6600
2026-04-161478.1900
2026-04-151474.4100
2026-04-141471.5100
2026-04-131486.9400
Newest first. Direction is uniform across all currencies: foreign per 1 USD, so multiply your USD value by the rate to get the home-currency equivalent.
Use --from and --to for an explicit window (the default limit is ignored when a range is set):
$firma show fx KRW --from 2020-03-01 --to 2020-04-01
DATE            KRW per USD
──────────────────────────────
2020-03-31      1217.4200
2020-03-30      1224.5500
2020-03-27      1218.0800
2020-03-26      1232.0100
2020-03-25      1241.4900
2020-03-24      1247.9800
2020-03-23      1267.2500   ← COVID crash peak
...
--json works on both forms. Coverage summary or per-currency series:
$firma show fx KRW --json --limit 2
{
"currency": "KRW",
"count": 2,
"observations": [
  { "date": "2026-04-17", "currency": "KRW", "rate_to_usd": 1461.66 },
  { "date": "2026-04-16", "currency": "KRW", "rate_to_usd": 1478.19 }
]
}
When you display past data in a non-USD currency, firma converts each entry using the FX rate from its own date. Looked up here.
📊
show balance / show flow
Each entry uses its date's rate. The output footer shows FX @ 2026-03-31: 1 USD = 1523.5 KRW so the conversion is auditable.
📈
report (time series)
Each period aggregates with that period's rate. The Net Worth trend reflects what you actually had in your home currency, not "today's USD value × today's rate".
💼
show portfolio Net Worth
Historical FX for the latest balance period. Portfolio MV (your live holdings) stays on the live FX rate. They're distinct concepts.
If a date isn't in the cache (weekend, holiday, or a brand-new entry whose date comes after your last sync), firma falls back to the most recent prior rate within a 7-day lookback window. If even that misses, the live FX rate from open.er-api.com is used as a last resort. firma sync fx after adding old data ensures the cache covers your full history.
MIT License