Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

apinanyogaratnam/crypto-prices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Prices

Get started

  1. npm install @apinanyogaratnam/crypto-prices

Sample usage

import { getCoins, getPrice } 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

  1. npm i
  2. node index.js