Fetch the price of a token in USD.
the price in USD.
import { Address } from "@graphprotocol/graph-ts";import { oracles } from "@protofire/subgraph-devkit";const token = Address.fromString("0x6b175474e89094c44da98b954eedeac495271d0f");const price = oracles.chainlink.fetchPriceUSD(token);
the price.
the token address.
Generated using TypeDoc
Fetch the price of a token in USD.
Returns
the price in USD.
Example
Returns
the price.