import fetch from 'node-fetch' ; export async function getEthPriceUsd ( ) { try { const res = await fetch ( 'https://api.coinpaprika.com/v1/tickers/eth-ethereum' ) ; const data = await res . json ( ) ; return data . quotes . USD . price ; } catch { return 0 ; } }