Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
e-04-kencrypto
Advanced tools
Get the current quote and conversions of your favorite cryptos, based on the [coinmarketcap](https://coinmarketcap.com/api/) api.
Get the current quote and conversions of your favorite cryptos, based on the coinmarketcap api.
First of all, you need to go to their website, sign in and get your personal key. Visit the Official Site.
$ npm i e-04-kencrypto
$ yarn add e-04-kencrypto
import { KenCrypto } from "e-04-kencryto";
const my_crypto = new KenCrypto(API_KEY)
-> Use your personal key that you got before.
quotes
Inside an array you can use an string with the crypto sign.
my_crypto.quotes(['BTC']);
The return is a promise where you can get the response with then()
example:
my_crypto.quotes(['BTC', 'eth']).then((response) => {
console.log(response)
});
log:
{
data: {
BTC: {
id: 1,
name: 'Bitcoin',
symbol: 'BTC',
slug: 'bitcoin',
date_added: '2013-04-28T00:00:00.000Z',
last_updated: '2022-01-27T20:23:00.000Z',
quote: {
USD: {
price: 36102.923873715255,
last_updated: '2022-01-27T20:23:00.000Z'
}
}
}
}
}
conversion
With the conversion method you can, obviously, convert currencies. For that you'll need three arguments: the amount to be converted, the origin currency, the target currency
my_crypto.conversion(1, 'BTC', ['BRL']);
--> The convertTo array can have multiple currencies, but it depends on your plan on Coin Market Cap.
Also the response is a promise where you can get the response with then()
example:
my_crypto.conversion(1, 'BTC', ['BRL']).then((response) => {
console.log(response);
});
log:
{
data: {
id: 1,
symbol: 'BTC',
name: 'Bitcoin',
amount: 1,
last_updated: '2022-01-27T22:02:00.000Z',
quote: {
BRL: {
price: 195481.12567089536,
last_updated: '2022-01-27T22:02:02.000Z'
}
}
}
}
FAQs
Get the current quote and conversions of your favorite cryptos, based on the [coinmarketcap](https://coinmarketcap.com/api/) api.
We found that e-04-kencrypto 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.