0.2.2 • Published 2 years ago

react-crypto-price v0.2.2

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

Licence npm version Downloads

React Crypto Price

React hook that fetch the price of crypto in USDT from Binance API.

Installation

npm i react-crypto-price

Live Demo

https://codesandbox.io/s/react-crypto-price-example-7unmvs

Example

import { useCryptoPriceController, ChainSymbols } from "react-crypto-price";

export default function App() {
  const { price } = useCryptoPriceController({ symbol: ChainSymbols.NEAR });
  return (
    <div className="App">
      <h1>react-crypto-price example</h1>
      <h3>current NEAR price in USDT</h3>
      <p>{price}$</p>
    </div>
  );
}

API

PropertyTypeDescription
symbolChainSymbolsCrypto to fetch the price.