Quickstart
Endpoint
Endpoint: https://solpump.api/pumpfun/buy
This endpoint allows you to buy tokens by specifying the buyer’s wallet key, token mint, and the purchase amount in SOL.
Code Examples
JavaScript (using Axios)
const axios = require('axios');
const url = 'https://api.solpumps.fun/pumpfun/buy';
const params = {
buyerKey: '<your_buyer_key>',
mint: 'xxxx',
buyAmountSol: 0.05,
};
const headers = {
'x-api-key': '<your_api_key>',
};
axios.get(url, { params, headers })
.then(response => console.log('Purchase Successful:', response.data))
.catch(error => console.error('Error:', error));TypeScript (using Axios)
Python (using Requests)
Last updated