react-crypto-price
v0.2.2
Published
React hook that fetch the price of crypto in USDT from Binance API.
Downloads
1
Maintainers
Readme
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. |