Serviços de Consulta a API dos Dados Abertos do Banco Central do Brasil, utilizando Python.
https://dadosabertos.bcb.gov.br/.
- Dólar Comercial (Venda e Compra) - Cotações Diárias ( URL , Recursos , Swagger , Documentação )
currency_service = CurrencyService()
currencies = currency_service.get_all()
ptax_service = PTAXService()
ptax = ptax_service.get_ptax_rate(date(2024, 1, 2))
ptax_list = ptax_service.get_daily_ptax_rate_by_period(date(2024, 1, 2), date(2024, 1, 5))
currency_code = "CAD"
exchange_rate_service = ExchangeRateService()
exchange_rate = exchange_rate_service.get_exchange_rate(currency_code, date(2024, 1, 1))
exchange_rates = exchange_rate_service.get_daily_exchange_rate_by_period(currency_code, date(2024, 8, 1), date(2024, 8, 2))