Just wondering how I can access accurate price data for a given crypto token on decentralized exchanges (e.g. Uniswap, SushiSwap, Bancor, Balancer etc). I want to implement a solidity contract that can take an exchange and a currency pair and return the exchange rate.
Asked
Active
Viewed 264 times
0
-
Easiest way would be to hit an API if they supply one. – Marc Pfister Sep 07 '21 at 16:11
-
I have tried using the 0x API which provides data for many exchanges, but it sometimes returns incorrect prices, which wouldnt work for my use case – J. Whitehead Sep 07 '21 at 16:12