
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
apilayer-fixer
Advanced tools
A lightweight JavaScript SDK for interacting with the Fixer API. This SDK allows you to retrieve exchange rate data, convert currencies, and more, using the Fixer API.
Install the package using npm or yarn:
npm install apilayer-fixer
# or
yarn add apilayer-fixer
import Fixer from "apilayer-fixer";
const fixer = new Fixer("your_api_key");
Replace "your_api_key"
with your actual API key from Fixer API.
symbols()
Retrieve available currency symbols.
fixer.symbols().then((data) => console.log(data));
latest(params)
Get the latest exchange rates.
symbols
(comma-separated list of currencies) and base
(base currency).fixer.latest({ symbols: "USD,EUR", base: "GBP" }).then((data) => console.log(data));
convert(params)
Convert an amount from one currency to another.
from
: Source currency.to
: Target currency.amount
: Amount to convert.fixer.convert({ from: "USD", to: "EUR", amount: 100 }).then((data) => console.log(data));
timeseries(params)
Get historical exchange rates for a specific date range.
start_date
: Start date in YYYY-MM-DD
format.end_date
: End date in YYYY-MM-DD
format.base
(optional): Base currency.symbols
(optional): Comma-separated list of currencies.fixer.timeseries({ start_date: "2023-01-01", end_date: "2023-01-31", base: "USD" }).then((data) => console.log(data));
fluctuation(params)
Get information about fluctuations in exchange rates.
start_date
: Start date in YYYY-MM-DD
format.end_date
: End date in YYYY-MM-DD
format.base
(optional): Base currency.symbols
(optional): Comma-separated list of currencies.fixer.fluctuation({ start_date: "2023-01-01", end_date: "2023-01-31" }).then((data) => console.log(data));
The SDK will throw errors if the API key is invalid or if there are issues with the API request. Ensure you handle errors in your code:
fixer
.latest()
.then((data) => console.log(data))
.catch((error) => console.error("Error fetching data:", error));
For more information about available endpoints and parameters, refer to the Fixer API Documentation.
This package is licensed under the MIT License.
FAQs
Fixer API SDK
The npm package apilayer-fixer receives a total of 0 weekly downloads. As such, apilayer-fixer popularity was classified as not popular.
We found that apilayer-fixer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.