react-crypto-price
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

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

Property Type Description
symbol ChainSymbols Crypto to fetch the price.

Package Sidebar

Install

npm i react-crypto-price

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

81.1 kB

Total Files

18

Last publish

Collaborators

  • sainthiago