This is a python module retrieving stock prices for GNU Cash books.
The script uses aiohttp
to fetch the prices of your securities from
the Yahoo Finance API and adds them to your price database. Additionally
it uses the Tradermade API to convert asset
currencies to your local GNU Cash book currency.
Note the terms of use of the Yahoo API for developers
- Requires Python >= 3.6 (due to
aiohttp
) - Requires
pip
for dependency management - A (free) API key for the Tradermade forex API
- Install dependencies
python -m venv .venv .\.venv\Scripts\activate pip install -r requirements.txt
- Copy the
.env.example
file to.env
and add your API key
python main.py --backend xml.gz --currency EUR .\database.gnucash
currency
represents the target currency of your GNU Cash book
- Without a valid ISIN configured for your asset the script will not be able to fetch prices
- The only backend that is currently supported is
xml.gz
files