New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

currzy

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currzy

Free, open-source library for fetching, managing, and converting up-to-date currency rates from multiple reliable sources with the ability to easily choose the source.

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

💸 Currzy — currency library 💸

💱 Free, open-source library for fetching, managing, and converting up-to-date currency rates from multiple reliable sources, with the ability to easily choose your provider.

📚 For more detailed documentation and advanced usage, visit Currzy Docs.

Features

  • Get current exchange rates for supported currencies.
  • Convert amounts between different currencies.
  • Cache rates locally to reduce API calls (cache expires after 1 hour).
  • Clear the cache manually when needed.
  • Easily switch between providers (e.g., CBRF).

Installation

npm i currzy

Usage

import { Currzy } from "currzy";

async function main() {
  // Initialize with a provider
  const currzy = new Currzy("cbrf");

  // Get the rate of EUR to USD
  const rate = await currzy.getRate("EUR", "USD");
  console.log(`1 USD = ${rate.toFixed(4)} EUR`);

  // Convert 100 USD to EUR
  const converted = await currzy.convert(100, "USD", "EUR");
  console.log(`100 USD = ${converted.toFixed(2)} EUR`);

  // Get all rates relative to USD
  const allRates = await currzy.getAllRatesTo("USD");
  console.log(allRates);

  // Get last update date
  console.log("Last update:", currzy.getLastUpdate());

  // Clear cache manually
  await currzy.clearCache();
  console.log("Cache cleared.");
}

main();

Notes

  • Each provider may have its own methods
  • Rates are cached locally for 1 hour to minimize API requests.
  • Cache can be cleared manually via currzy.clearCache()

Supported Currencies (CbrfProvider)

AUDAZNDZDGBPAMDBHDBYNBGNBOBBRL
HUFVNDHKDGELDKKAEDUSDEUREGPINR
IDRIRRKZTCADQARKGSCNYCUPMDLMNT
NGNNZDNOKOMRPLNSARRONXDRSGDTJS
THBBDTTRYTMTUZSUAHCZKSEKCHFETB
RSDZARKRWJPYMMKRUB

Keywords

currency

FAQs

Package last updated on 01 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts