
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
gatsby-source-exchange-rates-api
Advanced tools
A Gatsby source plugin for retrieving data from the exchangeratesapi.io API
A Gatsby source plugin for retrieving data from the exchangeratesapi.io API.
Install the package as a dependency
yarn add gatsby-source-exchange-rates-api
Add the plugin to your gatsby-config.js
file
// gatsby-config.js
{
plugins: [
{
resolve: 'gatsby-source-exchange-rates-api',
}
]
}
You can select the endpoint to fetch from by specifying endpoint
in the plugins options
object. The default is the endpoint latest
. You can also specify query parameters as a query
object (default is no query).
Exchange Rates API documentation: (Github) (Website)
// gatsby-config.js
{
resolve: 'gatsby-source-exchange-rates-api',
options: {
endpoint: 'history', // (optional) default is "latest"
query: { // (optional)
base: 'SEK',
symbols: 'EUR,USD',
start_at: '2019-02-01',
end_at: '2019-02-03',
},
}
}
If you use the default endpoint latest
you will get one node with the latest rates. If you use the endpoint history
there will be multiple rates returned as an array instead.
// Get the latest rates
useStaticQuery(graphql`
query {
exchangeRates {
id
date
USD
}
}
`)
// Get an array of history rates
useStaticQuery(graphql`
query {
allExchangeRates {
edges {
node {
id
date
USD
EUR
}
}
}
}
`)
Madis Väin, creator of the Exchange Rates API
FAQs
A Gatsby source plugin for retrieving data from the exchangeratesapi.io API
We found that gatsby-source-exchange-rates-api 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.