React SDK

usePrices

Hook to provide live ETH prices (from Coinbase)

import { usePrices } from "@mintdrop/sdk"

Usage

import { usePrices } from "@mintdrop/sdk"

const Example = () => {
  const { prices } = usePrices()

  return <div>Current ETH price is {prices.ETH}</div>
}

Returns

{
  loading: boolean,
  currency: "USD" // in the future we will support changing this
  prices: {
    "ETH": number,
    "MATIC": number
  }
}