@alphafi/alphalend-sdk - v4.1.0
    Preparing search index...

    Function resolveCoinPrice

    • Resolve a coin's USD price: pythPrice when usable, else coingeckoPrice, else null. Non-positive and non-finite values are unusable. Pegged coins ([PEGGED_COIN_TYPES]) take pythPrice only, zero included, and never use CoinGecko. A truthiness check on pythPrice must never gate this: the runtime value is a number, so a pegged 0 is falsy and would silently fall through to the market quote.

      The peg check reads coinMetadata.coinType, not the map key the caller looked the entry up by. The two differ for the long-form SUI alias, which is not pegged.

      Parameters

      Returns Decimal | null