Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 829 Bytes

README.md

File metadata and controls

48 lines (36 loc) · 829 Bytes

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;