2

I want to receive information about the liquidity pool such as: market cap, liquidity, price

I have seen the official Raydium SDK, but I am not so strong in js similar languages

Maybe there is something simpler and suitable for Python?

Thanks in advance

1 Answer 1

2

you can get that information from dexscreener fairly easily with https://api.dexscreener.com/latest/dex/tokens/H5n9BQfULHEEtvLVf2WErUHsXHhRaUkYqVhNzxUkWJGf

so something like:

url = "https://api.dexscreener.com/latest/dex/tokens/H5n9BQfULHEEtvLVf2WErUHsXHhRaUkYqVhNzxUkWJGf"

resp = httpx.get(url)
data = resp.json()["pairs"]

   for token in data:
        
     contract_id = token["baseToken"]["address"] 
     symbol = token["baseToken"]["symbol"]
     liq = token["liquidity"]["usd"]
     fdv = token["fdv"]
     price = token["priceUsd"]
2
  • Yes, but if pool was set with postponed trading, dexscreener doesn't show any info until trading starts Jan 3 at 6:05
  • The solution was to automatically calculate all the data based on what information I get about new pools Jan 11 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.