How to get latest eth price in solidity smart contract #20
Unanswered
imcrazysteven
asked this question in
Q&A
Replies: 2 comments
|
Hi @stevendev0822 To get latest eth price, you need to use Uniswap v2 router or chainlink oracle contract. Hope you finds it helpful. |
0 replies
|
Hi @stevendev0822 Recently I have found very useful api for getting native token price in usd, - gmgm.ai api.
For example if you wanna get eth price, you can call The response is as following: Here you can get "native_token_usd_price" This also would be good and fast enough. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi @Mates
Recently I am working on the development of ICO presale website and writing smart contract for that.
I need to implement "Buy token with ETH", then I need to calculate eth price in smart contract.
Please let me know if you have any experience with that.
Thanks
All reactions