Skip to content

Latest commit

 

History

History
111 lines (86 loc) · 4.02 KB

File metadata and controls

111 lines (86 loc) · 4.02 KB

Configuration

Local Config File

The project expects local credentials in:

private/config.toml

This file is gitignored and should never be committed.

EODHD Credentials

[eodhd]
api_key = "YOUR_EOD_TOKEN"
fundamentals_requests_per_minute = 950
fundamentals_daily_buffer_calls = 5000
market_data_requests_per_minute = 950
market_data_daily_buffer_calls = 5000

Use this for:

  • refresh-supported-exchanges --provider EODHD
  • refresh-supported-tickers --provider EODHD
  • ingest-fundamentals --provider EODHD
  • report-fundamentals-progress --provider EODHD
  • update-market-data --provider EODHD
  • report-market-data-progress --provider EODHD
  • EODHD exchange-scoped and all-supported workflows

Optional EODHD throttling and quota settings:

  • fundamentals_requests_per_minute: default 950, capped at the EODHD limit of 1000; used by ingest-fundamentals --provider EODHD when the scope spans many symbols
  • fundamentals_daily_buffer_calls: default 5000, reserved from the shared daily call budget so fundamentals ingestion stops early instead of consuming the full allowance
  • market_data_requests_per_minute: default 950, capped at the EODHD limit of 1000; used by update-market-data --provider EODHD across both exchange-bulk and per-symbol market-data requests
  • market_data_daily_buffer_calls: default 5000, reserved from the shared daily call budget so market-data refresh stops early instead of consuming the full allowance

FX Configuration

FX behavior is configured under an optional [fx] section:

[fx]
provider = "EODHD"
pivot_currencies = "USD, EUR, GBP"
stale_warning_days = 7

Settings:

  • provider: default EODHD (the only supported FX provider)
  • pivot_currencies: ordered, comma-separated triangulation pivots tried after the direct/inverse lookup path, default USD, EUR, GBP. Order encodes preference: when triangulated candidates tie on rate date, the earlier pivot wins. GBP is included by default because several frontier currencies (e.g. PGK) have deep GBP crosses but little or no USD/EUR history. An absent or empty option falls back to the default list.
  • stale_warning_days: warn when the selected on-or-before rate is older than this many days

FX semantics:

  • refresh-fx-rates is the only FX command that talks to a remote provider
  • stored rates are always 1 base_currency = rate quote_currency
  • configured subunit currencies are normalized before lookup: GBX/GBP0.01 -> GBP, ZAC -> ZAR, ILA -> ILS
  • lookups use latest available rate on or before the requested date
  • direct provider rows are persisted; inverse and triangulated cross-rates are computed at lookup time, not stored
  • euro legacy currencies (ATS, BEF, DEM, ESP, FIM, FRF, IEP, ITL, LUF, NLG, PTE, GRD, SIT, CYP, MTL, SKK, EEK, LVL, LTL, HRK) convert through their irrevocable statutory rates (Council Regulation (EC) No 2866/98 and successors), served from code (EURO_LEGACY_FIXED_RATES) for any date on or after each currency's euro adoption -- exact by law, never stored, and refused before the adoption date. Keep EUR among pivot_currencies: legacy-to-non-EUR crosses (e.g. IEP -> GBP, FRF -> DEM) compose the statutory leg with market legs through the EUR pivot
  • normalize-fundamentals uses only stored FX data and never performs runtime FX fetches

Database Path Behavior

Most commands accept:

--database <path>

If omitted, the default is:

data/pyvalue.db

Use a separate database path when you want to:

  • test workflows without touching your main dataset
  • compare providers or exchanges independently
  • keep one database per region or strategy

Configuration Rules

  • Keep secrets in private/config.toml or environment variables only.
  • Do not commit tokens or personal User-Agent strings.
  • Prefer EODHD for most workflows because market data always comes from EODHD anyway.

Related Docs