- Notifications
You must be signed in to change notification settings - Fork0
Generate hledger price directives for Argentine “Blue Dollar” exchange rate.
License
felipetappata/hledger-blue-rates
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A Python script that generateshledger compatible price directives for the Argentine “Blue Dollar” (black market exchange rate) based on the average between “buy” and “sell” prices listed by theBluelytics API.The script was created to automate my own personal workflow, and so is rather rudimentary and lacks extensibility, but suggestions and improvements are welcome.
- Clone this repository:
git clone https://github.com/felipetappata/hledger-blue-rates.git
- Navigate to the project directory:
cd hledger-blue-rates
- Install the required dependencies:
pip install -r requirements.txt
Call from the terminal with the following command:
python get-blue-rates.py YYYY-MM-DD
WhereYYYY-MM-DD
is the date from which you want to start generating price directives.The script will generate a file calledblue-rates.journal
containing price directives from the specified date to the current date.The generated file can be included in your hledger journal file using theinclude
directive:
!include blue-rates.journal
It assumes that amounts denominated in dollars are in theUSD
currency and amounts denominated in Argentine Pesos are in theARS
currency.
- Python 3.6 or later
requests
library
; Blue Dollar rates retrieved by hledger-blue-rates; Retrieved on: 2024-12-07 07:55:21; Source: https://api.bluelytics.com.ar/v2/evolution.json; Date range: 2007-01-01 to 2024-12-07; Total rates: 4173; Missing dates: 2378; Rate statistics (ARS/USD): Min: 4.00, Max: 1500.00, Mean: 156.24, Median: 18.00, SD: 307.13P 2011-01-03 ARS 0.2500000000 USD ; USD 4.00 ARSP 2011-01-04 ARS 0.2500000000 USD ; USD 4.00 ARSP 2011-01-05 ARS 0.2500000000 USD ; USD 4.00 ARSP 2011-01-06 ARS 0.2500000000 USD ; USD 4.00 ARS
This tool relies on theBluelytics API created by Pablo Seibelt. The API provides Argentine Blue Dollar exchange rate data and is available under the GNU Affero General Public License v3.0 (AGPL-3.0).
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) to maintain compatibility with the Bluelytics API license. See the LICENSE file for details.
About
Generate hledger price directives for Argentine “Blue Dollar” exchange rate.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.