Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.28 KB

README.md

File metadata and controls

59 lines (43 loc) · 1.28 KB

Go BRL rate get

This is a small project to fetch data from BCB (Brazilian Central Bank) to get all exchanges rates between a currency and BRL

To Install

go install github.com/uelei/brl-rate-get@latest

# OR

go install github.com/uelei/[email protected]

Help

brl-rate-get -help
Usage of brl-rate-get:
  -get
        To get yesterday closing currency
  -range
        To get a range of closing currency rates

How to use the -get command

To get last rate of a currency

brl-rate-get -get usd
2023/11/05 09:17:38 Found 5 records of price..

____________________________________
|#######====================#######|
|#  BRL          EUR              #|
|#         ====                   #|
|#               Buy:   5.2474    #|
|#  1,00         Sell:  5.2500    #|
|#                                #|
|##==============================##|
|    Rate Date   2023-11-03        |
 ----------------------------------

How to use the -range command

To get a range of data from April first until April 10 use

brl-rate-get -range usd 2022-04-01 2022-04-10

2023/11/04 21:28:58 Found 30 records of price..
2023/11/04 21:28:58 Found 6 records of fechamento price..
2023/11/04 21:28:58 Writing a file.
File saved  usd_brl_2022-04-01-2022-04-10.csv