0

hello i have been trying to fetch all tokens created by walletAddress or user. i am trying helius as someone already suggested me to use helius with the getAssetsByCreator function.

i need only token which are created by user not the NFTs

const fetchAssets = async (creatorAddress) => {
    try {
      const response = await axios.post(
        `https://mainnet.helius-rpc.com/?api-key=...`,
        {
          jsonrpc: "2.0",
          id: "my-id",
          method: "getAssetsByCreator",
          params: {
            creatorAddress:'6i2aHtxfqkC2biTo98FSkP59FVHPKFRLZWDbdghN6WKK',
          },
        },
        {
          headers: {
            "Content-Type": "application/json",
          },
        }
      );
      
    } catch (error) {
      console.error(error); // Handle error
    }
  };

but there are 20+ tokens showing created by user on pumpfun And the response array doesn't give me any single token, either this is only used for NFTs I am not sure. if yes then how to find the tokens which are created by user, doesn't matter the user has the token now or not.

you can check all tokens created by this address here. https://pump.fun/profile/6i2aHtxfqkC2biTo98FSkP59FVHPKFRLZWDbdghN6WKK

the helius docs link https://docs.helius.dev/compression-and-das-api/digital-asset-standard-das-api/get-assets-by-creator

1 Answer 1

1

The reason this doesn't work is because getAssetsByCreator only works for NFTs. Helius does support fungible tokens for some methods, but not this one. From their docs: "Fungible token support is available through the getAssetsByOwner and searchAssets methods."

4
  • but if i do getAssetsByOwner will it shows me all tokens? suppose the developer sold all his tokens will it shows me in getAssetsByOwner list?? because in docs it is written which I being owned, and if developer sold all then he is not owning that token. can you help me with this. Commented Nov 29 at 10:56
  • No, getAssetsByOwner will only show you assets currently owned by the address. If they created a token and then sold it all then you won't see it there.
    – Callum M
    Commented Nov 29 at 10:57
  • then how will i fetch all tokens which is being created by user doesn't matter whether he has some holding in it or not Commented Nov 29 at 10:57
  • I'm not aware of a way to do that
    – Callum M
    Commented Nov 29 at 10:59

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.