How to get new tokens on Solana / Raydium

You can use Bitquery Streaming APIs, which allow you to subscribe to any Solana data, including instructions.

For example, check the following stream, where we are subscribing to data where Method name is initializeUserWithNonce from Program address 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 which is Raydium Liquidity Pool V4 address.

You can run this websocket using this Link

In this result the following stream.

Instructions -> Instruction -> Accounts[4] -> Address is pool address (Here account array starts from 0. Therefore Accounts[4] is 5th entry 

Instructions -> Instruction -> Accounts[8] -> Address is  addreess of 1st token
Instructions -> Instruction -> Accounts[9] -> Address is  addreess of 2nd token
subscription {
  Solana {
    Instructions(
      where: {Transaction: {Result: {Success: true}}, Instruction: {Program: {Method: {is: "initializeUserWithNonce"}, Address: {is: "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"}}}}
    ) {
      Block {
        Time
        Date
      }
      Transaction {
        Signature
      }
      Instruction {
        AncestorIndexes
        CallerIndex
        Depth
        Data
        ExternalSeqNumber
        InternalSeqNumber
        Index
        Accounts {
          Address
          IsWritable
          Token {
            Mint
            Owner
            ProgramId
          }
        }
        CallPath
        Logs
        Program {
          AccountNames
          Method
          Json
          Name
          Arguments {
            Type
            Name
            Value {
              __typename
              ... on Solana_ABI_Integer_Value_Arg {
                integer
              }
              ... on Solana_ABI_String_Value_Arg {
                string
              }
              ... on Solana_ABI_Address_Value_Arg {
                address
              }
              ... on Solana_ABI_BigInt_Value_Arg {
                bigInteger
              }
              ... on Solana_ABI_Bytes_Value_Arg {
                hex
              }
              ... on Solana_ABI_Boolean_Value_Arg {
                bool
              }
              ... on Solana_ABI_Float_Value_Arg {
                float
              }
              ... on Solana_ABI_Json_Value_Arg {
                json
              }
            }
          }
        }
      }
    }
  }
}

This post is hidden. It was flagged as spam or offensive content and deleted 5 days ago by CommunityBot.
Locked. This answer is not currently accepting new interactions. Learn more.
You can use Bitquery Streaming APIs, which allow you to subscribe to any Solana data, including instructions.

For example, check the following stream, where we are subscribing to data where Method name is initializeUserWithNonce from Program address 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 which is Raydium Liquidity Pool V4 address.

You can run this websocket using this Link

In this result the following stream.

Instructions -> Instruction -> Accounts[4] -> Address is pool address (Here account array starts from 0. Therefore Accounts[4] is 5th entry 

Instructions -> Instruction -> Accounts[8] -> Address is  addreess of 1st token
Instructions -> Instruction -> Accounts[9] -> Address is  addreess of 2nd token
subscription {
  Solana {
    Instructions(
      where: {Transaction: {Result: {Success: true}}, Instruction: {Program: {Method: {is: "initializeUserWithNonce"}, Address: {is: "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"}}}}
    ) {
      Block {
        Time
        Date
      }
      Transaction {
        Signature
      }
      Instruction {
        AncestorIndexes
        CallerIndex
        Depth
        Data
        ExternalSeqNumber
        InternalSeqNumber
        Index
        Accounts {
          Address
          IsWritable
          Token {
            Mint
            Owner
            ProgramId
          }
        }
        CallPath
        Logs
        Program {
          AccountNames
          Method
          Json
          Name
          Arguments {
            Type
            Name
            Value {
              __typename
              ... on Solana_ABI_Integer_Value_Arg {
                integer
              }
              ... on Solana_ABI_String_Value_Arg {
                string
              }
              ... on Solana_ABI_Address_Value_Arg {
                address
              }
              ... on Solana_ABI_BigInt_Value_Arg {
                bigInteger
              }
              ... on Solana_ABI_Bytes_Value_Arg {
                hex
              }
              ... on Solana_ABI_Boolean_Value_Arg {
                bool
              }
              ... on Solana_ABI_Float_Value_Arg {
                float
              }
              ... on Solana_ABI_Json_Value_Arg {
                json
              }
            }
          }
        }
      }
    }
  }
}

check examples https://docs.bitquery.io/docs/examples/Solana/Solana-Raydium-DEX-API/
1 Like