Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 2.19 KB

README.md

File metadata and controls

52 lines (34 loc) · 2.19 KB

bacenptax-gas

ctrl+s ✌️

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.

Features:

  • 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.

How to use:

To use BacenPtax in your Google Apps Script, follow these steps:

  1. Open the Google Apps Script script where you want to use the library.
  2. Go to Library > Add libraries.
  3. 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.



Static Badge Static Badge Static Badge Static Badge