Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuhcc/beancount-exchangerates
Price source for Beancount that loads data from https://exchangerate.host/
https://github.com/xuhcc/beancount-exchangerates
beancount beancount-prices exchangeratesapi
Last synced: 12 days ago
JSON representation
Price source for Beancount that loads data from https://exchangerate.host/
- Host: GitHub
- URL: https://github.com/xuhcc/beancount-exchangerates
- Owner: xuhcc
- License: gpl-3.0
- Created: 2019-08-15T10:47:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-30T08:14:02.000Z (about 1 year ago)
- Last Synced: 2024-08-02T06:15:13.271Z (3 months ago)
- Topics: beancount, beancount-prices, exchangeratesapi
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-beancount - exchangeratesapi.io
README
# Beancount Exchange Rates
Price source for [Beancount](http://furius.ca/beancount/) that can load data from https://exchangerate.host/ or similar providers.
### exchangerate.host
List of supported forex currencies: https://api.exchangerate.host/symbols
No API key required.
## Installation
Install latest version with `pip`:
```
pip install https://github.com/xuhcc/beancount-exchangerates/archive/master.zip
```## Usage
Source string format is `:beancount_exchangerates/:`.
Default API base url is https://api.frankfurter.app. It can be changed using `EXCHANGERATE_API_URL` environment variable to any service that implements Fixer API.
Data source can be changed using `EXCHANGERATE_SOURCE` environment variable.
Check https://api.exchangerate.host/sources for the complete list of sources.
### Examples
Evaluate source string with `bean-price`:
```
PYTHONPATH=.:$PYTHONPATH bean-price --no-cache -e 'RUB:beancount_exchangerates/USD:RUB'
```Set price source for commodity in beancount file:
```
1970-01-01 commodity USD
price: "RUB:beancount_exchangerates/USD:RUB"
```