Big fan of Moralis - been using it for a few months now. Right now just using the Moralis API. One thing I can’t figure out - is there a way using the API to get the approximate current price of eth? I haven’t been able to figure out how to do that?
Hi @tethrr you can use the below code to get the eth price.
const options = {
address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
chain: "eth"
};
const price = await Moralis.Web3API.token.getTokenPrice(options);
Please check this below answered thread.
2 Likes
Hi @tethrr
The example shown above is using Moralis SDK which is faster and easier.
Using API you can make a call to {address}/balance
1 Like
Thanks so much John!
Thanks Taha, much appreciated!