• Fetch the price of a token in USD.

    Returns

    the price in USD.

    Example

    import { Address } from "@graphprotocol/graph-ts";
    import { oracles } from "@protofire/subgraph-devkit";

    const token = Address.fromString("0x6b175474e89094c44da98b954eedeac495271d0f");
    const price = oracles.chainlink.fetchPriceUSD(token);

    Returns

    the price.

    Parameters

    • token: Address

      the token address.

    Returns BigDecimal

Generated using TypeDoc