https://github.com/kellpossible/beancount-price-fetcher
Fetches beancount price listings for commodities
https://github.com/kellpossible/beancount-price-fetcher
Last synced: 5 months ago
JSON representation
Fetches beancount price listings for commodities
- Host: GitHub
- URL: https://github.com/kellpossible/beancount-price-fetcher
- Owner: kellpossible
- License: other
- Created: 2020-06-17T19:21:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-30T07:38:27.000Z (over 2 years ago)
- Last Synced: 2025-04-06T03:12:47.103Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# beancount-price-fetcher
Fetches [price listings](https://beancount.github.io/docs/06_beancount_language_syntax.html#prices) for commodities to use in the [beancount](http://furius.ca/beancount/) plain text double entry accounting system. Makes use of the [OpenExchangeRates api](https://openexchangerates.org/), and can make asynchronous requests in parallel.
Install using `cargo install --git https://github.com/kellpossible/beancount-price-fetcher.git`.
## Usage
### `series` command
```text
Fetches a series of beancount price listings for commodities
USAGE:
beancount-price-fetcher series [FLAGS] [OPTIONS] --app-id --start --end --commodities ... --base
FLAGS:
-h, --help Prints help information
-q, --no-quota-check Don't check the quota limits before performing the requests (makes the command faster by
avoiding the extra request, but you may exceed your quota)
-d, --desc Order the listings in descending order (by date)
-V, --version Prints version information
OPTIONS:
-i, --app-id OpenExchangeRates App ID ( see https://openexchangerates.org/account/app-ids )
-b, --base Commodity to use as the reference/base in the beancount price listing
-c, --commodities ... Commodities to request exchange rates for (e.g AUD USD)
-e, --end End date in format YYYY-mm-dd, e.g. 2020-05-25
-p, --parallel-requests Number of parallel network requests to use (when possible) [default: 2]
-r, --rounding Number of decimal places to round to
-s, --start Start date in format YYYY-mm-dd, e.g. 2020-05-25
```
Example:
```bash
$ beancount-price-fetcher series --app-id {YOUR_APP_ID} --start 2020-01-01 --end 2020-01-05 --commodities NZD --base AUD -r 4 -d`
2020-01-05 price NZD 0.9583 AUD
2020-01-04 price NZD 0.9589 AUD
2020-01-03 price NZD 0.9589 AUD
2020-01-02 price NZD 0.9592 AUD
2020-01-01 price NZD 0.9595 AUD
```
### `usage` command
```text
Prints your api usage stats
USAGE:
beancount-price-fetcher usage --app-id
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-i, --app-id OpenExchangeRates App ID ( see https://openexchangerates.org/account/app-ids )
```