Skip to content

Instantly share code, notes, and snippets.

@chentz78
Last active December 6, 2019 12:01
Show Gist options
  • Save chentz78/6333c03186045ca6fa6bfa3005e3668b to your computer and use it in GitHub Desktop.
Save chentz78/6333c03186045ca6fa6bfa3005e3668b to your computer and use it in GitHub Desktop.
API Financial Information from Banco Central do Brasil
#!/bin/bash
# To explore and find an information go to https://www3.bcb.gov.br/sgspub/localizarseries/localizarSeries.do?method=prepararTelaLocalizarSeries
#Get Gold rate from BMF
curl -s -L --connect-timeout 3 'https://api.bcb.gov.br/dados/serie/bcdata.sgs.4/dados/ultimos/1?formato=json'
#Get USD rate from BCB
curl -s -L --connect-timeout 3 'https://api.bcb.gov.br/dados/serie/bcdata.sgs.10813/dados/ultimos/1?formato=json'
#Get EUR rate from BCB
curl -s -L --connect-timeout 3 'https://api.bcb.gov.br/dados/serie/bcdata.sgs.21619/dados/ultimos/1?formato=json'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment