rckprtr/pumpdotfun-sdk

Bonding curve account not found

Closed this issue · 4 comments

When I try to buy new token, it show Bonding curve account not found

Can you share some code?

I found the problem. The new Coin just launched and I couldn't get the bondingCurve account through the public key. I had to wait for more than ten seconds or even more than 20 seconds to get the bondingCurve Account.

async function buy(pumpkey) {
    const mint = new PublicKey(pumpkey)
    const buyResult = await sdk.buy(
        keypair, 
        mint,
        BigInt(config.amount*LAMPORTS_PER_SOL),
        config.SLIPPAGE_BASIS_POINTS,
        {
            unitLimit: 250000,
            unitPrice: 250000,
        }
    )
    return buyResult
}
Error: Bonding curve account not found: 8Lsjq2YC1jCQmpoMRXXZvZw3kw1PD9i9cZGPq7BRLx6S
    at PumpFunSDK.getBuyInstructionsBySolAmount (/Users/changcuiwan/Desktop/pumpsniper/node_modules/pumpdotfun-sdk/dist/cjs/pumpfun.js:75:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async PumpFunSDK.buy (/Users/changcuiwan/Desktop/pumpsniper/node_modules/pumpdotfun-sdk/dist/cjs/pumpfun.js:42:21)
    at async buy (/Users/changcuiwan/Desktop/pumpsniper/pump.js:22:23)
    at async task (/Users/changcuiwan/Desktop/pumpsniper/app.js:35:35)

Ok, that is a bit weird actually, if it continues to happen report it again. My thinking is the commitment levels may be different.

I dont undestand what did you do to get the bunding curve account, I have the same problem as you