aneonex / BitcoinChecker

Bitcoin Checker data module (v2)
MIT License
68 stars 19 forks source link

Uniswap #30

Closed terrorist96 closed 3 years ago

terrorist96 commented 3 years ago

Not sure if you can add Uniswap, but worth asking.

aneonex commented 3 years ago

Uniswap is decentralized exchange (DEX) that requires a different technology than centralized exchanges to get pairs/price. The implementation of DEX to Bitcoin Checker seems very complicated. I think the most simple way to add Uniswap info is to use third party service - CoinGeko (https://www.coingecko.com/en/exchanges/uniswap/). But CoinGeko allows to get price for pairs with ETH only. Would such an implementation be useful?

terrorist96 commented 3 years ago

I think anything would be better than nothing. Thanks 😀

aneonex commented 3 years ago

Uniswap will be added in the next app release.

terrorist96 commented 3 years ago

Some coins aren't visible like: https://www.coingecko.com/en/coins/meme Also the second coin (ETH) is shown twice in the list.

terrorist96 commented 3 years ago

Also, such links can't be utilized? https://info.uniswap.org/pair/0x5DFbe95925FFeb68f7d17920Be7b313289a1a583

aneonex commented 3 years ago

Some coins aren't visible like: https://www.coingecko.com/en/coins/meme

This is strange. I don't understand why CoinGecko UI is showing information, but the API is not returning these coins. It takes time to research...

Also the second coin (ETH) is shown twice in the list.

Can you describe in more detail? Is this with all the pairs? I can't reproduce this.

aneonex commented 3 years ago

Also, such links can't be utilized? https://info.uniswap.org/pair/0x5DFbe95925FFeb68f7d17920Be7b313289a1a583

This is targeted info, but the API has a different technology that requires a lot of refactoring in the data module. This can be implemented in the future.

terrorist96 commented 3 years ago

Screenshot_20201127-195609_Bitcoin Checker

terrorist96 commented 3 years ago

I think Uniswap has different lists of coins and there are two CoinGecko lists, but some coins aren't in any list and require you to input the contract address in Uniswap to make it appear. This could be why some coins aren't visible.

aneonex commented 3 years ago

I will exclude Uniswap from app release to take time to fixes and research. Thank you for operational feedback.

terrorist96 commented 3 years ago

I think you could keep it for now while you improve it. It's not 100% but like 90% and that's better than 0%. 😃

aneonex commented 3 years ago

Unstable behavior will raise questions and negative user reviews.

aneonex commented 3 years ago

Now Uniswap pairs are loaded just like info.uniswap.org from thegraph.com. All previous issues will be resolved. All changes will be included in the latest app v2.18.

P.S. Google is slow to publish the latest app updates :(

terrorist96 commented 3 years ago

It says only the top 500 most liquid pairs will be shown, so the example coin I sent above still won't work?

aneonex commented 3 years ago

MEME coin included to the top and will be listed in the app.

You can check the top 500 Uniswap pairs yourself: 1) Open in browser url: https://thegraph.com/explorer/subgraph/uniswap/uniswap-v2/ 2) Copy next query to the left window: {pairs(first: 500, orderBy:reserveUSD, orderDirection:desc) {reserveUSD token0{symbol} token1{symbol}}} 3) Push execute button

The app using same API.

terrorist96 commented 3 years ago

Great, thanks! There is also a telegram uniswap price bot; I wonder if they use thegraph.com. See https://t.me/UniSwapPriceBot. There's also dedicated bots that show trading data for specific listing pairs. See: https://unibot.network/ This is all just FYI.