1.0.0 • Published 2 years ago
@apinanyogaratnam/crypto-prices v1.0.0
Crypto Prices
Get started
- npm install @apinanyogaratnam/crypto-prices
Sample usage
import cryptoPrices from '@apinanyogaratnam/crypto-prices';
// returns all coins available to view price (id, symbol, and name)
const getAllCoins = async () => {
const prices = await getCoins();
console.log(prices);
};
// returns price of a coin
const getCoinPrice = async (coinId) => {
const prices = await getPrice(coinId);
console.log(prices[coin]);
};
getCoinPrice('bitcoin');
Development
- npm i
- node index.js
1.0.0
2 years ago