Anyone knows an API to get the Avax price of certain ETH balance?

50 Views Asked by At

In nextjs app, I need to convert entered ETH value to AVAX in real time Is there an API for that? Like the coingecko API. (https://www.coingecko.com/api/documentation)

In coingecko API, I can convert AVAX balance to ETH but I need to convert ETH to AVAX in real time.

2

There are 2 best solutions below

0
Markonick On

it seems to me that this is a use-case for websockets, have you considered that? In that case, Binance has some decent functionality as well.

0
David Li On

I found an api in Coinbase. https://api.coinbase.com/v2/prices/ETH-AVAX/spot It returns AVAX price of ETH