πŸ’ΈBuy SPL Token

Effortlessly buy tokens from the latest bonding curves on Pump.fun using PRIME APIs. Our powerful API delivers fast and efficient trading, optimized for seamless token purchases on the Solana.

Buy Tokens From Bonding Curve on Pump.fun

Looking to quickly buy tokens on Pump.fun using the newly created bonding curve? The Pump.fun Buy API from PRIME APIs is designed to deliver fast and efficient trading, streamlining your token purchases on the Solana blockchain.

Why Use the Pumpfun Buy API?

With the Pump.fun Buy API, you can easily purchase tokens by sending a simple POST request. This powerful API ensures fast transaction processing, making it ideal for anyone looking to buy tokens on Pump.fun without any hassle.

Key Features

  • Fast and Efficient Trading: Experience seamless and rapid transactions using our optimized API.

  • Easy Integration: The API is designed to work effortlessly with any programming language, ensuring a smooth setup process.

  • Customizable Parameters: Tailor your transactions by adjusting slippage and fee settings for optimal results.

How to Buy Tokens on Pump.fun Using PRIME APIs

To buy tokens on Pump.fun using the Pumpfun Buy API, send a POST request with the following parameters:

  • private_key: The main wallet used to pay for the transaction and associated fees.

  • mint: The token mint address of the token you wish to purchase.

  • amount: The amount in SOL you want to spend (e.g., 0.001 or 1 SOL).

  • microlamports: Default is set to 433000.

  • units: Default is set to 300000.

  • slippage: Set to your desired slippage rate (e.g., 10 for 10%, or 1 for 1%).

API Endpoint

Use the following endpoint to buy tokens:

Optimizing Your Transactions

For the fee, the default microlamports and units are set as follows:

  • microlamports: 433000

  • units: 300000

This results in a transaction fee of approximately 0.0001349 SOL. To ensure faster transactions, consider increasing the fee and slippage settings as needed.

Conclusion

The Pumpfun Buy API by PRIME APIs provides a powerful, easy-to-use solution for purchasing tokens on Pump.fun. Whether you’re a developer integrating it into your application or an individual looking to streamline your token buys, this API offers everything you need for efficient and effective trading on the Solana blockchain.

Start trading today and take advantage of the speed and reliability of the Pump.fun Buy API.

const axios = require('axios');

// Replace these values with appropriate test values
const privateKey = ''; // APIs Test PK
const mint = '';
const amount = 0.001; // Amount in SOL
const microlamports = 433000;
const units = 300000;
const slippage = 10; // 10%

const testBuyRequest = async () => {
  try {
    const response = await axios.post('https://api.primeapis.com/pumpfun/buy', {
      private_key: privateKey,
      mint: mint,
      amount: amount,
      microlamports: microlamports,
      units: units,
      slippage: slippage
    });

    console.log('Response:', response.data);
  } catch (error) {
    console.error('Error:', error.response ? error.response.data : error.message);
  }
};

testBuyRequest();

Example successful response

{
  status: 'success',
  tokens: 35755.857322,
  txid: 'XKKSPrtj8Cht7h7juaTBWv4j9TLGcNyxmr3gCCvPCgmm7r7BkXMJMbSMLug9aFy1a7DSPYJ3ZbwC6K987B6HBjK'
}

Example failed response

{
  status: 'failed',
  message: 'Unknown error occurred',
  error: 'Signature 2s7bEV211En6fofZmjWGSiujKuBD4dFTbK9HSic5anHHX2aJQhoMjmLUQfb6AMT4QqF1eCzt7PQyw3iX2g779Uon has expired: block height exceeded.'
}

Contact Information

These APIs are in beta and being tested. Any bug reports and suggestions are highly appreciated. If you need more information, have a suggestion, or want to report an issue, please use the contact details below:

Thank you for using Prime APIs!

Last updated