2

So guys, I followed this question How do I get real-time information about newly created tokens on Solana?.

I configured a helius hook that monitors the token program at the address TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.

I chose TOKEN_MINT as the transaction type in the hook.

I successfully receive the data that the hook sends to me on my local node.js server.

Now I want to find among all this data, the information about create a new token.

The problem is that I don't understand what parameters I should rely on?

The data looks like this if I choose webhook type = raw

{
    blockTime: 1705136607,
    indexWithinBlock: 500,
    meta: {
      err: null,
      fee: 6500,
      innerInstructions: [Array],
      loadedAddresses: [Object],
      logMessages: [Array],
      postBalances: [Array],
      postTokenBalances: [Array],
      preBalances: [Array],
      preTokenBalances: [Array],
      rewards: []
    },
    slot: 241542220,
    transaction: { message: [Object], signatures: [Array] },
    version: 'legacy'
  }

If I choose webhook type = enhanced, I get data like this

[
  {
    accountData: [
      [Object], [Object], [Object], [Object],
      [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object].
    ],
    description: 'BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E minted 3 tokens.',
    events: {},
    fee: 17525,
    feePayer: 'BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E',
    instructions: [ [Object], [Object], [Object], [Object] ],
    nativeTransfers: [],
    signature: '4t3X2Ys5pPcarSZz7VCdXFHHYehNnpXnZmYocQ5oYQASv7KsjhooFXU8ToKTJMgy5sV8ctxWx2ymSxVQV5mDJ2zG',
    slot: 241509076,
    source: 'UNKNOWN',
    timestamp: 1705121744,
    tokenTransfers: [ [Object], [Object], [Object], [Object], [Object], [Object], [Object] ],
    transactionError: null,
    type: 'TOKEN_MINT'
  }
]

so I guess the ultimate question is. How to select among the received data a new token that should probably be checked on rugcheck, also it should not be nft

I may be wrong about the choice of the implemented method. But after a lot of searching. I came to the conclusion that it is better to follow the token program. Another option is to parse every transaction in the block.

Overall I think my chosen method isn't too bad. It remains to get the address of a new quality token out of there.

Please give feedback. thanks

the other question I'm interested in is how trading bots work.

If the token is created. It can be added to the liquidity pool of the exchange after some time. This means that it is necessary to store the address of the token and constantly check with the exchange to see if the token has been added to the pool? Am I understanding this correctly?

1 Answer 1

1

You can use Helius' Enhanced Transaction APIs to parse the transaction. Following is the data of the transaction 4t3X2Ys5pPcarSZz7VCdXFHHYehNnpXnZmYocQ5oYQASv7KsjhooFXU8ToKTJMgy5sV8ctxWx2ymSxVQV5mDJ2zG you provided in the question

[{
    "description": "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E minted 3 tokens.",
    "type": "TOKEN_MINT",
    "source": "UNKNOWN",
    "fee": 17525,
    "feePayer": "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E",
    "signature": "4t3X2Ys5pPcarSZz7VCdXFHHYehNnpXnZmYocQ5oYQASv7KsjhooFXU8ToKTJMgy5sV8ctxWx2ymSxVQV5mDJ2zG",
    "slot": 241509076,
    "timestamp": 1705121744,
    "tokenTransfers": [{
        "fromTokenAccount": "ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7",
        "toTokenAccount": "Bhi2nPWnHv2ZV6rFDJc2Xepj6ufkdFZsUs24DAozNzCP",
        "fromUserAccount": "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E",
        "toUserAccount": "6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g",
        "tokenAmount": 0.080697985,
        "mint": "So11111111111111111111111111111111111111112",
        "tokenStandard": "Fungible"
    }, {
        "fromTokenAccount": "Cqs1j5n7mJ8sCaa15FRAYrYmtDktKL3itBQzjangscB3",
        "toTokenAccount": "FbwFZg2m46BewxRFXhYgtmyaNKz3XwSACTYN2jhvLATT",
        "fromUserAccount": "6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g",
        "toUserAccount": "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E",
        "tokenAmount": 7.381048,
        "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "tokenStandard": "Fungible"
    }, {
        "fromTokenAccount": "FbwFZg2m46BewxRFXhYgtmyaNKz3XwSACTYN2jhvLATT",
        "toTokenAccount": "dwxR9YF7WwnJJu7bPC4UNcWFpcSsooH6fxbpoa3fTbJ",
        "fromUserAccount": "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E",
        "toUserAccount": "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d",
        "tokenAmount": 7.381048,
        "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "tokenStandard": "Fungible"
    }, {
        "fromTokenAccount": "D3CDPQLoa9jY1LXCkpUqd3JQDWz8DX1LDE1dhmJt9fq4",
        "toTokenAccount": "ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7",
        "fromUserAccount": "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d",
        "toUserAccount": "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E",
        "tokenAmount": 0.080728371,
        "mint": "So11111111111111111111111111111111111111112",
        "tokenStandard": "Fungible"
    }, {
        "fromTokenAccount": "",
        "toTokenAccount": "E8Bw6Zt6NxjaHmHyhkXsq4UiLbHzicLKmhUAfCz1bgdU",
        "fromUserAccount": "",
        "toUserAccount": "CbYf9QNrkVgNRCMTDiVdvzMqSzXh8AAgnrKAoTfEACdh",
        "tokenAmount": 0.000015651,
        "mint": "EJhqXKJEncSx1HJjS5ZpKdiKGGgLiRgNPvo8JZvw5Guj",
        "tokenStandard": "Fungible"
    }],
    "nativeTransfers": [],
    "accountData": [{
        "account": "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E",
        "nativeBalanceChange": -17525,
        "tokenBalanceChanges": []
    }, {
        "account": "dwxR9YF7WwnJJu7bPC4UNcWFpcSsooH6fxbpoa3fTbJ",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": [{
            "userAccount": "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d",
            "tokenAccount": "dwxR9YF7WwnJJu7bPC4UNcWFpcSsooH6fxbpoa3fTbJ",
            "rawTokenAmount": {
                "tokenAmount": "7381048",
                "decimals": 6
            },
            "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
        }]
    }, {
        "account": "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "8DLzuvpNDm9SZ3VsbJVkyQHz3ozkT6qH8WUW2RVwCp9w",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "AUuZf8BsfvickpE7N93VrpgaBZ5DhbkFjg7tLpaKXedp",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "D3CDPQLoa9jY1LXCkpUqd3JQDWz8DX1LDE1dhmJt9fq4",
        "nativeBalanceChange": -80728371,
        "tokenBalanceChanges": [{
            "userAccount": "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d",
            "tokenAccount": "D3CDPQLoa9jY1LXCkpUqd3JQDWz8DX1LDE1dhmJt9fq4",
            "rawTokenAmount": {
                "tokenAmount": "-80728371",
                "decimals": 9
            },
            "mint": "So11111111111111111111111111111111111111112"
        }]
    }, {
        "account": "ErMHGiG7334Fzfnb97pAPpt57wZzkTpGu9ZqGhnrJfQG",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "ComputeBudget111111111111111111111111111111",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "4ngnN8dA9sAf1sbz3m6qwquxbHkyzgXVpeTYcxKPtZuf",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "GwRSc3EPw2fCLJN7zWwcApXgHSrfmj9m4H5sfk1W2SUJ",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "7KX5bLSyGRUDjWnmKDpnCKNfsrM9Yc1ueMBwuHnJw3kU",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "Bhi2nPWnHv2ZV6rFDJc2Xepj6ufkdFZsUs24DAozNzCP",
        "nativeBalanceChange": 80697985,
        "tokenBalanceChanges": [{
            "userAccount": "6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g",
            "tokenAccount": "Bhi2nPWnHv2ZV6rFDJc2Xepj6ufkdFZsUs24DAozNzCP",
            "rawTokenAmount": {
                "tokenAmount": "80697985",
                "decimals": 9
            },
            "mint": "So11111111111111111111111111111111111111112"
        }]
    }, {
        "account": "Cqs1j5n7mJ8sCaa15FRAYrYmtDktKL3itBQzjangscB3",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": [{
            "userAccount": "6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g",
            "tokenAccount": "Cqs1j5n7mJ8sCaa15FRAYrYmtDktKL3itBQzjangscB3",
            "rawTokenAmount": {
                "tokenAmount": "-7381048",
                "decimals": 6
            },
            "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
        }]
    }, {
        "account": "Cx8eWxJAaCQAFVmv1mP7B2cVie2BnkR7opP8vUh23Wcr",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "E8Bw6Zt6NxjaHmHyhkXsq4UiLbHzicLKmhUAfCz1bgdU",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": [{
            "userAccount": "CbYf9QNrkVgNRCMTDiVdvzMqSzXh8AAgnrKAoTfEACdh",
            "tokenAccount": "E8Bw6Zt6NxjaHmHyhkXsq4UiLbHzicLKmhUAfCz1bgdU",
            "rawTokenAmount": {
                "tokenAmount": "15651",
                "decimals": 9
            },
            "mint": "EJhqXKJEncSx1HJjS5ZpKdiKGGgLiRgNPvo8JZvw5Guj"
        }]
    }, {
        "account": "EJhqXKJEncSx1HJjS5ZpKdiKGGgLiRgNPvo8JZvw5Guj",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7",
        "nativeBalanceChange": 30386,
        "tokenBalanceChanges": [{
            "userAccount": "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E",
            "tokenAccount": "ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7",
            "rawTokenAmount": {
                "tokenAmount": "30386",
                "decimals": 9
            },
            "mint": "So11111111111111111111111111111111111111112"
        }]
    }, {
        "account": "FbwFZg2m46BewxRFXhYgtmyaNKz3XwSACTYN2jhvLATT",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "FdfXTrKevBiz5yoGfpdSXcSbZj2bF1jUQWSixhyYdU2Q",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }, {
        "account": "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG",
        "nativeBalanceChange": 0,
        "tokenBalanceChanges": []
    }],
    "transactionError": null,
    "instructions": [{
        "accounts": [],
        "data": "3VmYmzG9t2Ws",
        "programId": "ComputeBudget111111111111111111111111111111",
        "innerInstructions": []
    }, {
        "accounts": [],
        "data": "JaWwmy",
        "programId": "ComputeBudget111111111111111111111111111111",
        "innerInstructions": []
    }, {
        "accounts": ["6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g", "Cx8eWxJAaCQAFVmv1mP7B2cVie2BnkR7opP8vUh23Wcr", "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E", "ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7", "FbwFZg2m46BewxRFXhYgtmyaNKz3XwSACTYN2jhvLATT", "Bhi2nPWnHv2ZV6rFDJc2Xepj6ufkdFZsUs24DAozNzCP", "Cqs1j5n7mJ8sCaa15FRAYrYmtDktKL3itBQzjangscB3", "EJhqXKJEncSx1HJjS5ZpKdiKGGgLiRgNPvo8JZvw5Guj", "E8Bw6Zt6NxjaHmHyhkXsq4UiLbHzicLKmhUAfCz1bgdU", "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "FdfXTrKevBiz5yoGfpdSXcSbZj2bF1jUQWSixhyYdU2Q", "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG", "7KX5bLSyGRUDjWnmKDpnCKNfsrM9Yc1ueMBwuHnJw3kU", "2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c", "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d", "D3CDPQLoa9jY1LXCkpUqd3JQDWz8DX1LDE1dhmJt9fq4", "dwxR9YF7WwnJJu7bPC4UNcWFpcSsooH6fxbpoa3fTbJ", "AUuZf8BsfvickpE7N93VrpgaBZ5DhbkFjg7tLpaKXedp", "8DLzuvpNDm9SZ3VsbJVkyQHz3ozkT6qH8WUW2RVwCp9w", "ErMHGiG7334Fzfnb97pAPpt57wZzkTpGu9ZqGhnrJfQG", "GwRSc3EPw2fCLJN7zWwcApXgHSrfmj9m4H5sfk1W2SUJ", "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"],
        "data": "111112B29gCum7caFMdujDsGGw8hhwGuhcue5uqhtV2KN72A443FsdnCojPJyirDt8ZrK9HCPkc3Gp6Rffm4w5nkTUx4guzJ2Nb",
        "programId": "4ngnN8dA9sAf1sbz3m6qwquxbHkyzgXVpeTYcxKPtZuf",
        "innerInstructions": [{
            "accounts": ["6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g", "Cx8eWxJAaCQAFVmv1mP7B2cVie2BnkR7opP8vUh23Wcr", "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E", "ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7", "FbwFZg2m46BewxRFXhYgtmyaNKz3XwSACTYN2jhvLATT", "Bhi2nPWnHv2ZV6rFDJc2Xepj6ufkdFZsUs24DAozNzCP", "Cqs1j5n7mJ8sCaa15FRAYrYmtDktKL3itBQzjangscB3", "EJhqXKJEncSx1HJjS5ZpKdiKGGgLiRgNPvo8JZvw5Guj", "E8Bw6Zt6NxjaHmHyhkXsq4UiLbHzicLKmhUAfCz1bgdU", "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "FdfXTrKevBiz5yoGfpdSXcSbZj2bF1jUQWSixhyYdU2Q", "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG", "7KX5bLSyGRUDjWnmKDpnCKNfsrM9Yc1ueMBwuHnJw3kU"],
            "data": "PgQWtn8ozix6m6vdFXzeftwMXzyzb7jJF",
            "programId": "2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c"
        }, {
            "accounts": ["ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7", "Bhi2nPWnHv2ZV6rFDJc2Xepj6ufkdFZsUs24DAozNzCP", "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E"],
            "data": "3b6TxpVpx3eF",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }, {
            "accounts": ["EJhqXKJEncSx1HJjS5ZpKdiKGGgLiRgNPvo8JZvw5Guj", "E8Bw6Zt6NxjaHmHyhkXsq4UiLbHzicLKmhUAfCz1bgdU", "6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g"],
            "data": "6GdW1jtJYq9h",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }, {
            "accounts": ["Cqs1j5n7mJ8sCaa15FRAYrYmtDktKL3itBQzjangscB3", "FbwFZg2m46BewxRFXhYgtmyaNKz3XwSACTYN2jhvLATT", "6YJWm3nhHXGPvgAHErWcNmqPQtSSHZhvtmE4U9Adwb3g"],
            "data": "3Nvuu8DxHm8B",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }, {
            "accounts": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E", "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d", "ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7", "D3CDPQLoa9jY1LXCkpUqd3JQDWz8DX1LDE1dhmJt9fq4", "FbwFZg2m46BewxRFXhYgtmyaNKz3XwSACTYN2jhvLATT", "dwxR9YF7WwnJJu7bPC4UNcWFpcSsooH6fxbpoa3fTbJ", "AUuZf8BsfvickpE7N93VrpgaBZ5DhbkFjg7tLpaKXedp", "8DLzuvpNDm9SZ3VsbJVkyQHz3ozkT6qH8WUW2RVwCp9w", "ErMHGiG7334Fzfnb97pAPpt57wZzkTpGu9ZqGhnrJfQG", "GwRSc3EPw2fCLJN7zWwcApXgHSrfmj9m4H5sfk1W2SUJ"],
            "data": "59p8WydnSZtT6HfC2J1mhdE97uAmT6H6h1ig9jQFd25ik2CPp2kSeJ8r5m",
            "programId": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
        }, {
            "accounts": ["FbwFZg2m46BewxRFXhYgtmyaNKz3XwSACTYN2jhvLATT", "dwxR9YF7WwnJJu7bPC4UNcWFpcSsooH6fxbpoa3fTbJ", "BEmUSjqs7mpgaSXw6QdrePfTsD8aQHbdtnqUxa63La6E"],
            "data": "3Nvuu8DxHm8B",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }, {
            "accounts": ["D3CDPQLoa9jY1LXCkpUqd3JQDWz8DX1LDE1dhmJt9fq4", "ERaxgJdZ6r7PMxzhJxjCJqrwQShUWj3CweveHxDa2oF7", "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d"],
            "data": "3N8H3v73ng2b",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }]
    }],
    "events": {}
}]

This data can be helpful to you for checking if the token is a rug or not.

In your webhook handler script, you can call the API to get the parsed transaction.

If the token is created. It can be added to the liquidity pool of the exchange after some time. This means that it is necessary to store the address of the token and constantly check with the exchange to see if the token has been added to the pool?

I'm not experienced with liquidity pools, however, this seems like it can work. You'd need to check with the LP services.

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.