Get ALL UNISWAP tokens!
Ever wonder how to get all tokens from UNISWAP? I did and noticed that there is A LOT of them. There is an even bunch of “unfair” or “scam” tokens in the list as well. So please don’t just download list and then randomly buy and sell them via Uniswap.
The code uses GraphqlClient for Python. In case that you wish to download the list with Python as I did, you would need to install that package. Or use your preferable language instead.
The important part is that, the list is downloaded from: https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2 and is LOOOONg list. That why do not download all at once, but make limitation to something like 1000 tokens per loop and make some pause between loops to avoid LAG and Ban from the hosting address.
The code:
You are free to clap and follow me for more! Cheers!!