React hook that fetch the price of crypto in USDT from Binance API.
npm i react-crypto-price
https://codesandbox.io/s/react-crypto-price-example-7unmvs
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>
);
}
Property | Type | Description |
---|---|---|
symbol | ChainSymbols | Crypto to fetch the price. |