Skip to content

sainthiago/react-crypto-price

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published