# argy-usd A simple and efficient library for fetching Argentine dollar exchange rates and performing currency conversions. ## Installation ```bash npm install argy-usd ``` ## Usage ```ts import { getDollarRates, convertUsdToArs, convertArsToUsd, pollDollarRates } from 'argy-usd'; // Get dollar rates const rates = await getDollarRates({ source: "dolarapi", cache: true, dollarType: "cripto" }); // Convert USD to ARS const arsAmount = await convertUsdToArs(100, 'cripto', 'sell', "dolarapi"); // Convert ARS to USD const usdAmount = await convertArsToUsd(10000, 'oficial', 'buy', "bluelytics"); // Poll dollar rates const stopPolling = pollDollarRates({ interval: 1000, onUpdate: (rates) => console.log(rates), onError: (error) => console.error(error) }); // Stop polling stopPolling(); ``` ## Sources - [Bluelytics](https://bluelytics.com.ar/) - [DolarAPI](https://dolarapi.com/) ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. ## Author alestivanello99@hotmail.com