Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generate hledger price directives for Argentine “Blue Dollar” exchange rate.

License

NotificationsYou must be signed in to change notification settings

felipetappata/hledger-blue-rates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

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.

Installation

  1. Clone this repository:
git clone https://github.com/felipetappata/hledger-blue-rates.git
  1. Navigate to the project directory:
cd hledger-blue-rates
  1. Install the required dependencies:
pip install -r requirements.txt

Usage

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.

Requirements

  • Python 3.6 or later
  • requests library

Example Output

; 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

Credits

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).

License

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp