Skip to content

A CLI utility to obtain given stock prices and currency exchange rates from the Alpha Vantage API, and print them out in hledger’s price format.

Notifications You must be signed in to change notification settings

bnjmnt4n/hledger-prices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hledger-prices

A CLI utility to obtain given stock prices and currency exchange rates from the Alpha Vantage API, and print them out in hledger’s price format.

Installation

With Go:

$ go install github.com/bnjmnt4n/hledger-prices@latest

For Nix users:

$ nix run github:bnjmnt4n/hledger-prices

Usage

$ hledger-prices -alphavantage-key $ALPHA_VANTAGE_KEY -base-currency SGD -currencies USD,ETH -stocks VT,VWRA.LON -rate-limit 5
; Generated by https://github.com/bnjmnt4n/hledger-prices on 2023/01/06 22:20:24

; Stocks

P 2023/01/05 VT USD 86.400000
P 2023/01/05 VWRA USD 96.930000

; Currencies

P 2023/01/06 ETH SGD 1682.684934
P 2023/01/06 USD SGD 1.344500

This command will get the most recent exchange rates between SGD/USD and SGD/ETH and stock prices of VT and VWRA (in the London exchange), with a rate limit of 5 requests per minute.

Note:

About

A CLI utility to obtain given stock prices and currency exchange rates from the Alpha Vantage API, and print them out in hledger’s price format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published