hoodchain - v0.1.0
    Preparing search index...

    Function getQuote

    • Read the Chainlink price for a Stock Token.

      The answer is the price of one token — Chainlink applies the ERC-8056 multiplier upstream, so do NOT multiply by uiMultiplier again.

      Parameters

      Returns Promise<StockQuote>

      FeedNotFoundError when the token has no feed in the registry.

      StaleFeedError when the answer is older than maxAgeSeconds.

      InvalidFeedAnswerError on a non-positive or incomplete answer.

      const quote = await getQuote(hood, 'AAPL')
      console.log(`AAPL token: $${quote.priceUsd}`)