0.1.4 • Published 3 years ago

coingecko-prices-provider v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

About coingecko crypto prices

coingecko crypto prices provides a simple context provider and hooks react app for using live plug and play prices. 🔴WIP LIBRARY🔴

Getting Started

Install React Crypto Icons from npm

npm install coingecko-prices-provider

Or with yarn

yarn add coingecko-prices-provider

Usage

import {
  CoingeckoPricesProvider,
  useCoingeckoPrices,
} from "coingecko-prices-provider";

const Example = () => {
  const { price: balPrice } = useCoingeckoPrices(
    "0xba100000625a3754423978a60c9317c58a424e3D"
  );
  return <div>Bal: {balPrice}</div>;
};

const App = () => {
  return (
    <div className="App">
      <CoingeckoPricesProvider>
        <Example />
      </CoingeckoPricesProvider>
    </div>
  );
};

export default App;