BacenPtax is a JavaScript library for Google Apps Script to obtain currency quotes from the Central Bank of Brazil (Bacen) via the PTAX system. This library makes it easy to integrate your projects with the most up-to-date exchange rate data, allowing you to build customized solutions for your needs.
- Quotation retrieval: Retrieves the quotations of various currencies on a specific date.
- Date formatting: Formats dates to meet the requirements of the Bacen API.
- Endpoint construction: Automatically generates endpoints for HTTP requests.
- Ease of use: Simple and intuitive interface for interacting with the Bacen API.
To use BacenPtax in your Google Apps Script, follow these steps:
- Open the Google Apps Script script where you want to use the library.
- Go to Library > Add libraries.
- Paste the project ID:
1mu3XX24jnB9iIr5Zwfse4BGwPYxn0YQR_ChnrvuXu6BaHdqW_RnUych6
Exemple:
function getDollarQuote() {
var code = 'usd';
var quote = BacenPtax.getPriceQuote(code, '10/22/2024');
Logger.log(quote);
}
Thank you for considering the BacenPtax for your needs. If you have any questions or need further assistance, please don't hesitate to reach out.