SolanaPortal
  • ✨Welcome to SolanaPortal
  • Getting Started
    • ⭐Why SolanaPortal?
    • πŸ“–Guide
    • πŸ—ΊοΈBest Practices
    • ❓FAQ
  • API Documentation
    • Swapping
      • Swapping with Node.js
      • Swapping with Python
      • Swapping with Rust
    • Token Creation
      • Pump.fun Token
      • Standard Token
  • Market Creation
  • ‼️Troubleshooting
  • Support
Powered by GitBook
On this page
  • Introduction
  • Metadata Parameters for IPFS Upload
  • Metadata Explanations
  • Example Metadata Upload Request
  • API Endpoint - Pump.fun Token Creation
  • Core Parameters for Pump.fun Token Creation
  • Parameter Explanations
  • Single Buy Token Creation
  • Bundle Buy Token Creation
  1. API Documentation
  2. Token Creation

Pump.fun Token

Introduction

Pump.fun is a decentralized platform for launching and trading tokens on the Solana blockchain. With SolanaPortal, users can create and deploy tokens directly on Pump.fun using two methods:

  1. Single Buy Token Creation: The creator mints a new token and immediately purchases an initial amount to activate and list it.

  2. Bundle Buy Token Creation: Purchase the token simultaneously using Jito bundle transactions, ensuring a fair and efficient launch either through single or mulitple wallets.

Each transaction in a bundle buy must have a different SOL amount.

A single failed transaction in a Jito bundle swap will cause the entire bundle to fail. Ensure all parameters and wallets are correctly configured to avoid issues.

Both methods are built on SolanaPortal’s robust API endpoints, ensuring reliability and speed regardless of blockchain congestion.


Metadata Parameters for IPFS Upload

Before creating a token, metadata must be uploaded to IPFS of Pump.fun given below.

https://pump.fun/api/ipfs

The following parameters are required to store token details.

Parameter

Type

Required

Description

image

Image

βœ…

The token image file to be uploaded.

name

String

βœ…

The name of the token.

symbol

String

βœ…

The ticker symbol of the token.

description

String

βœ…

A brief description of the token.

twitter

String

βœ…

URL to the project's Twitter/X profile.

telegram

String

βœ…

URL to the project's Telegram channel.

website

String

βœ…

URL to the project's official website.

showName

Boolean

βœ…

Whether the token name should be displayed on Pump.fun.


Metadata Explanations

Each parameter in the Standard Token Creation API plays a vital role in defining how your token functions on the Solana blockchain. Below is a detailed breakdown of all required parameters, along with practical examples and best practices.

1. image

The image file representing the token.

Example:

const image = await fs.openAsBlob("./token.png");
const formData = new FormData();
    formData.append("file", image); // Image file

Ensure the image is in a supported format (PNG, JPG, etc.).

2. name

The name of the token in metadata.

Example:

formData.append("name", "Test");

This should match the token name used in token creation.

3. symbol

The symbol or ticker of the token.

Example:

formData.append("symbol", "TST");

⚠️ Max length: 10 characters.

4. description

A brief description of the token.

Example:

 formData.append(
      "description",
      "This is an example token created via SolanaPortal.io"
    );

This will be visible on Pump.fun.

5. twitter

The Twitter/X profile link of the project.

Example:

formData.append("twitter", "https://x.com/test");

6. telegram

The Telegram community link.

Example:

formData.append("telegram", "https://x.com/test");

7. website

The official website of the project.

Example:

formData.append("website", "https://solanaportal.io");

Ensure the website is accessible and valid.

8. showName

Defines whether the token name should be displayed on Pump.fun.

Supported values:

  • true – Display token name

  • false – Hide token name

Example:

formData.append("showName", "true");

Set to true to show the token name.

Example Metadata Upload Request

// Upload metadata to IPFS
const image = await fs.openAsBlob("./token.png");
const formData = new FormData();
formData.append("file", image); // Image file
formData.append("name", "Test");
formData.append("symbol", "TST");
formData.append("description", "This is an example token created via SolanaPortal.io");
formData.append("twitter", "https://x.com/test");
formData.append("telegram", "https://x.com/test");
formData.append("website", "https://solanaportal.");
formData.append("showName", "true");

const metadataResponse = await fetch("https://pump.fun/api/ipfs", {
  method: "POST",
  body: formData,
});
if (metadataResponse.status !== 200) {
  throw new Error("Failed to create IPFS metadata storage");
}
const metadataResponseJSON = await metadataResponse.json();

API Endpoint - Pump.fun Token Creation

https://api.solanaportal.io/api/create/token/pumpfun

For both single buy and bundle buy token creation.

Core Parameters for Pump.fun Token Creation

Parameter

Type

Required

Description

wallet_address

String

βœ…

The public key of the wallet creating the token.

name

String

βœ…

The token's name retrieved from metadata IPFS.

symbol

String

βœ…

The token symbol retrieved from metadata IPFS.

metadataUri

String

βœ…

IPFS metadata URL containing the token details.

amount

Float

βœ…

The SOL amount for the first buy transaction.

slippage

Integer

❌

Maximum slippage tolerance.

tip

Float

❌

Priority fee for faster transaction processing.

type

String

❌

Transaction type (jito).


Parameter Explanations

1. wallet_address

The public address of the wallet initiating the transaction, required for signing and executing the swap. It can also be derived from the private key as explained in the implementation.

Example:

wallet_address: "4XsW7fg4rRVKbKHZjqXVZL..."

2. name

The name of the token to be created. Retrieved from the IPFS Metadata.

Example:

name: metadataResponseJSON.metadata.name

3. symbol

The symbol or ticker for the token. Retrieved from the IPFS Metadata.

symbol: metadataResponseJSON.metadata.symbol

4. metadataUri

The IPFS metadata URI containing the token details. Retrieved from the IPFS Metadata.

  • Supported values: raydium, jupiter, pumpfun, moonshot.

Example:

metadataUri: metadataResponseJSON.metadataUri,

5. amount

The quantity of tokens involved in the trade.

  • For buy: The value should be specified in SOL (e.g., 0.01) since you're purchasing tokens using SOL.

  • For sell: The value should be the number of tokens you want to sell (e.g., 1550 or 5090.25).

Example:

amount: 0.01

Ensure you have enough tokens in your wallet to avoid insufficient balance errors.

6. slippage

The maximum price variation you are willing to tolerate during the swap, expressed as a percentage.

Example:

slippage: 90

Higher slippage tolerances prevent failed transactions in volatile markets

7. tip

A priority fee to ensure faster processing of your transaction, especially during network congestion.

Example:

tip: 0.001

Use a competitive tip value during high network activity to prioritize your transaction.

8. type

Specifies the transaction type.

  • Supported values: jito (default), bloxroute.

Example:

type: "jito"

Use jito for priority execution.


Single Buy Token Creation

Single Buy Token Creation is the process of deploying a token on Pump.fun while executing the first mandatory purchase. This ensures the token is activated and listed immediately.

Example Parameters for Single Buy Token Creation

const param = {
  name: metadataResponseJSON.metadata.name, // Retrieved from metadata
  symbol: metadataResponseJSON.metadata.symbol, // Retrieved from metadata
  metadataUri: metadataResponseJSON.metadataUri, // Retrieved from metadata
  wallet_address: wallet.publicKey.toBase58(), // The public key of the creator's wallet
  amount: 0.00001, // The amount of SOL required for the first buy transaction
  // Optional parameters
  // slippage: 100, // Maximum slippage tolerance
  // tip: 0.00005, // Priority fee for faster processing
  // type: "jito" // Transaction execution type ("jito" or "bloxroute")
};

Bundle Buy Token Creation

Bundle Buy Token Creation allows multiple wallets to execute the first buy transaction together using Jito bundle swaps. This method ensures fair launches by preventing a single user from gaining an advantage.

⚠ Each buy amount must be different, as Jito does not allow identical transactions in a bundle.

Example Parameters for Bundle Buy Token Creation

const param = [
  {
    name: metadataResponseJSON.metadata.name, // Retrieved from metadata
    symbol: metadataResponseJSON.metadata.symbol, // Retrieved from metadata
    metadataUri: metadataResponseJSON.metadataUri, // Retrieved from metadata
    wallet_address: wallets[0].publicKey.toBase58(), // The creator's wallet public key
    amount: 0.00001, // SOL amount for the first buy
    slippage: 100, // Maximum slippage tolerance
    tip: 0.0001, // Priority fee
    type: "jito" // Transaction execution type ("jito" or "bloxroute")
  },
  {
    "wallet_address": "6YsQ1fg5yH...",
    "action": "buy",
    "amount": 0.000001
  },
  {
    "wallet_address": "7WsF2hg5bT...",
    "action": "buy",
    "amount": 0.000002
  },
  {
    "wallet_address": "8KsQ3yg6cV...",
    "action": "buy",
    "amount": 0.000003
  },
  {
    "wallet_address": "9LsR4zh7dW...",
    "action": "buy",
    "amount": 0.000004
  }
]

Important Notes

  • Metadata parameters (name, symbol, metadataUri) should be retrieved from IPFS during token creation.

  • In Bundle Buy transactions, all transactions in the bundle must succeed, or the entire bundle fails.

  • Ensure that different buy amounts are set for each wallet in the bundle.

  • If metadata is missing, the token creation will fail.

Next Steps

To learn how to implement pump.fun token creation programmatically, visit the language-specific guides:

PreviousToken CreationNextStandard Token

Last updated 16 days ago

Swapping with Node.js
Swapping with Python
Swapping with Rust