Compare commits

..

5 Commits

Author SHA1 Message Date
wancat
fec1cd7323 Update readme 2022-05-28 18:57:44 +08:00
wancat
c360f0fec8 Merge branch 'master' of github.com:lancatlin/ledger-quotes-updater 2022-05-28 18:48:25 +08:00
Adithya Chari
38e7dbc2bc Update README.md 2022-05-26 20:53:58 -05:00
Adithya Chari
3a1ca6d513 Archival Statement 2022-05-25 10:16:59 -05:00
Adithya Chari
c1e5321191 Link edit 2022-05-25 10:16:36 -05:00

View File

@@ -1,13 +1,18 @@
# LedgerStockUpdate
This application locates any stocks you have in your [ledger-cli](ledger-cli.org) file, then generates a price database of those stocks compatible with the application.
This application locates any stocks/crypto currencies you have in your [ledger-cli](https://ledger-cli.org) file, then generates a price database of those stocks compatible with the application, using quotes from Yahoo Finance.
Forked from [adchari/LedgerStockUpdate](https://github.com/adchari/LedgerStockUpdate), add some features:
* Add name mapping functionality: use BTC in your ledger and BTC-USD for online quotes
* Replace API from Alpha Vantage, without the needs of obtaining API token
* Recursively transform the quotes to single currency
### Usage
Build the go file, and run as follows:
```bash
./[name of executable] -f=[ledger file] -p=[price database file (to create or update)] -a=[Alpha Vantage API token] -b=[Name of ledger binary]
./[name of executable] -f=[ledger file] -p=[price database file (to create or update)] -b=[Name of ledger binary] -m=[name mapping file]
```
This should spit out a price database file, which can then be used to calculate the market value in ledger as follows:
@@ -15,3 +20,4 @@ This should spit out a price database file, which can then be used to calculate
```bash
ledger -f [ledger file] --price-db [price database file] -V bal
```