A SOAP client for Brazilian Central Bank's Time Series Management System

Overview

sgs-bacen-rs

A SOAP client for Brazilian Central Bank's Time Series Management System https://www3.bcb.gov.br/sgspub.

Installation

Clone this repo and run cargo install passing the path to the sgscli subfolder.

git clone https://github.com/felipenoris/sgs-bacen-rs
cargo install --path ./sgs-bacen-rs/sgscli

After installation, the binary sgs will be ready to use.

Usage

The following command will print the last value for the time series identified by code 1.

$ sgs last-value 1
<?xml version='1.0' encoding='ISO-8859-1'?>
<resposta status='2' descricao='Processado com sucesso'>
<SERIE>
        <NOME>Taxa de câmbio - Livre - Dólar americano (venda) - diário</NOME>
        <CODIGO>1</CODIGO>
        <PERIODICIDADE>D</PERIODICIDADE>
        <UNIDADE>u.m.c./US$</UNIDADE>
        <DATA>
                <DIA>22</DIA>
                <MES>4</MES>
                <ANO>2022</ANO>
        </DATA>
        <VALOR>4,7326</VALOR>
</SERIE>
</resposta>

The following example will print the historical values for time series identified by codes 1 (PTAX USD) and 4389 (CDI a.a.) from date 2020-01-01 to 2020-01-05.

Dates can be informed using yyyy-mm-dd or dd/mm/yyyy format.

$ sgs series 1 4389 --from 2020-01-01 --to 2020-01-05
<?xml version='1.0' encoding='ISO-8859-1'?>
<SERIES>
<SERIE ID='1'>
                <ITEM>
                        <DATA>2/1/2020</DATA>
                        <VALOR>4.0213</VALOR>
                        <BLOQUEADO>false</BLOQUEADO>
                </ITEM>
                <ITEM>
                        <DATA>3/1/2020</DATA>
                        <VALOR>4.0522</VALOR>
                        <BLOQUEADO>false</BLOQUEADO>
                </ITEM>
        </SERIE>
        <SERIE ID='4389'>
                <ITEM>
                        <DATA>2/1/2020</DATA>
                        <VALOR>4.40</VALOR>
                        <BLOQUEADO>false</BLOQUEADO>
                </ITEM>
                <ITEM>
                        <DATA>3/1/2020</DATA>
                        <VALOR>4.40</VALOR>
                        <BLOQUEADO>false</BLOQUEADO>
                </ITEM>
        </SERIE>
</SERIES>

Resources

You might also like...
Implementation of algorithms for Domain Name System (DNS) Cookies construction

DNS Cookie RFC7873 left the construction of Server Cookies to the discretion of the DNS Server (implementer) which has resulted in a gallimaufry of di

Prototype for Koru, a parametrized p2p monetary system.Checkout

Koru About This is a prototype for Koru, a parametrized p2p monetary system consisting of: Mutual credit Voting and decision making platform (for econ

A tcp port forwarding system like ngrok.

Pruxy A tcp port forwarding system like ngrok. Todo http request handler agent - server connection agent How to use Generate cert files mkdir ssl_ce

Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries
Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries

Autometrics 📈 ✨ Autometrics is a macro that makes it trivial to add useful metrics to any function in your codebase. Easily understand and debug your

Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries
Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries

A Rust macro that makes it easy to understand the error rate, response time, and production usage of any function in your code. Jump from your IDE to

Minimal DNS server built in Rust with rule system and logging.

MinDNS MinDNS is a minimal DNS server written in Rust. It is intended to be used as a firewall, black-hole or proxy DNS server. ⚡ Features Fully async

FTP client for Rust

rust-ftp FTP client for Rust Documentation rust-ftp Installation Usage License Contribution Development environment Installation FTPS support is achie

NNTP client for Rust

rust-nntp NNTP Client for Rust Usage extern crate nntp; use nntp::{Article, NNTPStream}; fn main() { let mut nntp_stream = match NNTPStream::connec

POP3 client for Rust

rust-pop3 POP3 Client for Rust This client has SSL support. SSL is configured using an SSLContext that is passed into the connect method of a POP3Stre

Owner
Felipe Noronha
Felipe Noronha
Authentication workaround for N-Central Report Manager.

Authentication workaround for N-Central Report Manager. Takes the link that N-Central creates for Report Manager and outputs a working link.

501 Commons 1 Jan 31, 2022
Rust client for NATS, the cloud native messaging system.

A Rust client for the NATS messaging system. Status Motivation Rust may be the most interesting new language the NATS ecosystem has seen. We believe t

NATS - The Cloud Native Messaging System 651 Jan 3, 2023
A simple cross-platform remote file management tool to upload and download files over HTTP/S

A simple cross-platform remote file management tool to upload and download files over HTTP/S

sexnine 13 Dec 30, 2022
Shurly, this is a URL shortener with API management

Shurly Shurly, this is a URL shortener with API management Features Management of destinations through a REST'ish API Permanent/temporary redirects; p

WorkplaceBuddy 3 Nov 30, 2022
Acts as an IRC server and a nostr client. Connect with your IRC client using your nostr private key as the password.

nostr-irc Acts as an IRC server and a nostr client. Connect with your IRC client using your nostr private key as the password. Experimental code, use

null 11 Dec 26, 2022
Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP requests. Additionally, this crate measures the times of DNS lookup, TCP connect and TLS handshake.

TTFB: CLI + Lib to Measure the TTFB of HTTP/1.1 Requests Similar to the network tab in Google Chrome or Mozilla Firefox, this crate helps you find the

Philipp Schuster 24 Dec 1, 2022
A performant but not-so-accurate time and capacity based cache for Rust.

fastcache A performant but not-so-accurate time and capacity based cache for Rust. This crate provides an implementation of a time-to-live (TTL) and c

Pure White 3 Aug 17, 2023
It's like "docker stats" but with beautiful, real-time charts into your terminal. 📊

?? ds - Real-time Stats with Terminal Charts Visualize container stats with beautiful, real-time charts directly in your terminal. Why ds? Missing Cha

Rafael R. Camargo 5 Oct 3, 2023
A private network system that uses WireGuard under the hood.

innernet A private network system that uses WireGuard under the hood. See the announcement blog post for a longer-winded explanation. innernet is simi

Tonari, Inc 4.1k Dec 29, 2022
A cross-platform, user-space WireGuard port-forwarder that requires no system network configurations.

Cross-platform, user-space WireGuard port-forwarder that requires no system network configurations.

Aram Peres 629 Jan 4, 2023