1

I am using Node.js with Typescript.

Websites like RugCheck.xyz do this. We paste a token that tells us how much liquidity is locked for that particular token. I was told that it depends on how much of the LP was burned by the creator. How do I find that out? How do I find out how much LP was there in the first place and how much has been burned? If 100% is burned, does that mean the LP is 100% locked? I read somewhere that I should search for burn transactions and decode them. But how do I search for burn tons? Going through all items outputted from getSignaturesForAddress would be a very resource-intensive and time-consuming process. And if not, how would I exactly do that?

I'd also programmatically like to get the current price of a token. How would I do that? I don't want to use an existing API but rather do it with an SDK. I already have the following three SDKs installed in my project: @solana/web3.js, @solana/spl-token, @metaplex-foundation. I also installed the @raydium-io/raydium-sdk but haven't exactly been able to figure out much from it. I know that I can get information using the pool something class and .decode method in it after I pass in .data from getAccountInfo. But I'm not sure if that gives me what I need. Also, it's giving me values in BigInt, I guess. I'm using Number() to convert them to a number but I don't know if that's the best approach, that's the one that worked with TS though.

Furthermore, if I were to create a system that identified all new pools created on, let's say, Raydium, how would I do that? I'm unsure what I should do after setting up a WebSocket subscription for onProgramChange for Raydium. And I'm not sure if that's the correct way to do it in the first place.

3 Answers 3

2

https://api.rugcheck.xyz/v1/tokens/{token_address}/report

use this API to get all information about spl token including liquidity but it only process 5 request per minute

1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – McBain
    Commented Mar 15 at 12:36
2

Late, but (for spl-2022 tokens) if you receive a mint notification from the RPC, it will look similar to the following image. Notably, it contains "mintAuthority" and "freezeAuthority" along with an owner.

So what do these exactly mean?

mintAuthority: defaults to null if none, otherwise it's an account pubkey.

  • it defines an address that has authority to mint (make) new tokens. You generally don't want anybody to be able to do that.

freezeAuthority: null if none, otherwise pubkey as well.

  • Defines an address with permission to freeze (lock) the tokens to a wallet. If it's enabled and the owner decides to freeze your tokens, you'll likely be keeping those tokens forever. Also generally don't want this enabled

owner: usually TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb for most tokens, but otherwise stay away!

  • defines the owner of the token account.
  • TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb is the program account address for the token-2022 program.
  • the person who owns the token generally has free reign and can take the LP, stay away!

websites like dexscreener or birdeye which have apis make this really easy if you don't feel like connecting to an RPC.

image of props

3
  • Thanks++++++++++ Commented May 9 at 20:01
  • Also owner data can be TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA and this is valid and acceptable Commented May 9 at 20:18
  • what method you used for this?
    – AdityaDees
    Commented May 14 at 11:59
1

https://api.rugcheck.xyz/v1/tokens/{token_address}/report This api doesnt work in my code , do you have a link to the docs

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.