Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@abskmj/exchangeratesapi
Advanced tools
Unofficial node.js client for exchangeratesapi.io
Exchange rates API is a free service for current and historical foreign exchange rates published by the European Central Bank
npm install --save @abskmj/exchangeratesapi
This module is also available at Github Package
let exchange = require('@abskmj/exchangeratesapi')
const getLatestRates = async () => {
const response = await exchange.rates()
console.log(response.data)
/*
{
rates: {
CAD: 1.5243,
HKD: 8.4286,
ISK: 158.3,
...
},
base: 'EUR',
date: '2020-05-13'
}
*/
}
let exchange = require('@abskmj/exchangeratesapi')
const getRatesByDate = async (date) => {
const response = await exchange.rates({ date })
console.log(response.data)
/*
{
rates: {
CAD: 1.4959,
HKD: 11.2301,
LVL: 0.7093,
...
},
base: 'EUR',
date: '2010-01-12'
}
*/
}
let exchange = require('@abskmj/exchangeratesapi')
const getLatestRatesForBaseCurrency = async(base) => {
const response = await exchange.rates({ base })
console.log(response.data)
/*
{
rates: {
CAD: 1.4016551724,
HKD: 7.7504367816,
ISK: 145.5632183908,
...
},
base: 'USD',
date: '2020-05-13'
}
*/
}
let exchange = require('@abskmj/exchangeratesapi')
const getLatestRatesForCurrencies = async (symbols) => {
const response = await exchange.rates({ symbols })
console.log(response.data)
/*
{
rates: { USD: 1.0875, GBP: 0.88245 },
base: 'EUR',
date: '2020-05-13'
}
*/
}
let exchange = require('@abskmj/exchangeratesapi')
const getHistoricalRates = async(start_at, end_at) => {
const response = await exchange.history({ start_at, end_at})
console.log(response.data)
}
// promise
exchange().then(response =>{
console.log(response.data);
});
// callback
exchange({}, (err, response) => {
if(err) return console.error(err)
console.log(response.data)
})
Documentation is available at API.md
Change log is available at CHANGELOG.md
FAQs
Node client for exchangeratesapi.io
The npm package @abskmj/exchangeratesapi receives a total of 5 weekly downloads. As such, @abskmj/exchangeratesapi popularity was classified as not popular.
We found that @abskmj/exchangeratesapi demonstrated a not healthy version release cadence and project activity because the last version was released 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.