Pump.fun
Pump.fun is the most popular memecoin launchpad on Solana. It uses a bonding curve mechanism where tokens are initially traded along a price curve, then graduate to Raydium once the curve is filled. dex-skills integrates with Pump.fun via the PumpPortal API, handling IPFS metadata uploads and transaction construction automatically.
Chain
Solana Mainnet
Key Details
| Property | Value |
|---|---|
| API | PumpPortal API |
| Pool Identifier | "pump" |
| Token Standard | SPL Token |
| Metadata Storage | IPFS (uploaded via PumpPortal) |
| Private Key Format | Base58 |
| Graduation Target | Raydium AMM |
Setup
import { createSkills, getSkill } from "dex-skills";
const skills = createSkills({
wallets: {
solana: {
privateKey: "your-base58-private-key",
rpcUrl: "https://api.mainnet-beta.solana.com",
},
},
});
const pumpfun = getSkill(skills, "pumpfun"); Launch a Token
Launching a token on Pump.fun creates a new bonding curve token. The metadata (name, symbol, description, image) is uploaded to IPFS automatically. The token is immediately tradeable on the bonding curve after creation.
const result = await pumpfun.launch({
name: "My Token",
symbol: "MYTKN",
description: "A sample token launched via dex-skills.",
imageUrl: "https://example.com/logo.png",
initialBuyAmount: "0.1",
links: {
twitter: "https://x.com/mytoken",
telegram: "https://t.me/mytoken",
website: "https://mytoken.xyz",
},
});
console.log("Token address:", result.tokenAddress);
console.log("Transaction:", result.txHash); Launch Parameters
| Parameter | Type | Description |
|---|---|---|
| name * | string | Display name of the token. |
| symbol * | string | Token ticker symbol. |
| description | string | Description of the token. |
| imageUrl | string | Token image URL. Uploaded to IPFS. |
| initialBuyAmount | string | Initial buy amount in SOL. |
| links.twitter | string | Twitter/X profile URL. |
| links.telegram | string | Telegram group URL. |
| links.website | string | Project website URL. |
Query Token Info
const token = await pumpfun.getTokenInfo("TokenMintAddress...");
console.log("Name:", token.name);
console.log("Symbol:", token.symbol);
console.log("Market Cap:", token.marketCap);
console.log("Bonding Curve Progress:", token.bondingCurveProgress); List Tokens
const tokens = await pumpfun.listTokens({
limit: 20,
sortBy: "createdAt",
});
for (const token of tokens) {
console.log(token.symbol, token.tokenAddress);
} Buy Tokens
Purchase tokens on Pump.fun by specifying the token address, SOL amount, and optional slippage.
const result = await pumpfun.buy({
tokenAddress: "TokenMintAddress...",
amount: "0.1",
slippage: 10,
});
console.log("Tx Hash:", result.txHash);
console.log("Tokens received:", result.tokenAmount); Sell Tokens
Sell tokens on Pump.fun by specifying the token address and amount of tokens to sell.
const result = await pumpfun.sell({
tokenAddress: "TokenMintAddress...",
amount: "1000000",
slippage: 10,
});
console.log("Tx Hash:", result.txHash);
console.log("SOL received:", result.nativeAmount); Get Trending
const trending = await pumpfun.getTrending({
category: "gainers",
limit: 20,
});
for (const token of trending) {
console.log(token.symbol, token.marketCap);
} Trade History
const trades = await pumpfun.getTradeHistory("TokenMintAddress...", { limit: 50 });
for (const trade of trades) {
console.log(trade.action, trade.tokenAmount, trade.priceUsd);
} Supported Methods
| Method | Supported |
|---|---|
| launch() | Yes |
| getTokenInfo() | Yes |
| listTokens() | Yes |
| buy() | Yes |
| sell() | Yes |
| getTrending() | Yes |
| getTradeHistory() | Yes |
| getHolders() | No |
| estimatePrice() | No |
Platform Notes
Supported Social Links
| Field | Description |
|---|---|
| Twitter/X profile URL | |
| telegram | Telegram group or channel URL |
| website | Project website URL |