# 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.

{% hint style="info" %}
Each transaction in a bundle buy must have a different SOL amount.
{% endhint %}

{% hint style="danger" %}
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.<br>
{% endhint %}

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.

<table data-header-hidden><thead><tr><th width="169"></th><th width="94"></th><th width="122" align="center"></th><th width="344"></th></tr></thead><tbody><tr><td>Parameter</td><td>Type</td><td align="center">Required</td><td>Description</td></tr><tr><td><code>image</code></td><td>Image</td><td align="center">✅</td><td>The token image file to be uploaded.</td></tr><tr><td><code>name</code></td><td>String</td><td align="center">✅</td><td>The name of the token.</td></tr><tr><td><code>symbol</code></td><td>String</td><td align="center">✅</td><td>The ticker symbol of the token.</td></tr><tr><td><code>description</code></td><td>String</td><td align="center">✅</td><td>A brief description of the token.</td></tr><tr><td><code>twitter</code></td><td>String</td><td align="center">✅</td><td>URL to the project's Twitter/X profile.</td></tr><tr><td><code>telegram</code></td><td>String</td><td align="center">✅</td><td>URL to the project's Telegram channel.</td></tr><tr><td><code>website</code></td><td>String</td><td align="center">✅</td><td>URL to the project's official website.</td></tr><tr><td><code>showName</code></td><td>Boolean</td><td align="center">✅</td><td>Whether the token name should be displayed on Pump.fun.</td></tr></tbody></table>

***

### 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:**

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

{% hint style="danger" %}
&#x20;**Ensure the image is in a supported format (PNG, JPG, etc.).**
{% endhint %}

#### 2. name

The name of the token in metadata.

**Example:**

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

{% hint style="info" %}
&#x20;**This should match the token name used in token creation.**
{% endhint %}

#### 3. symbol

The symbol or ticker of the token.

**Example:**

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

⚠️ **Max length: 10 characters.**

#### 4. description

A brief description of the token.

**Example:**

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

{% hint style="warning" %}
**This will be visible on Pump.fun.**
{% endhint %}

#### 5. twitter

The Twitter/X profile link of the project.

**Example:**

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

#### 6. telegram

The Telegram community link.

**Example:**

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

#### 7. website

The official website of the project.

**Example:**

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

{% hint style="info" %}
**Ensure the website is accessible and valid.**
{% endhint %}

#### 8. showName

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

**Supported values:**

* `true` – Display token name
* `false` – Hide token name

**Example:**

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

{% hint style="info" %}
**Set to `true` to show the token name.**
{% endhint %}

### Example Metadata Upload Request

```json
// 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

<table data-header-hidden><thead><tr><th width="195"></th><th width="100"></th><th width="94" align="center"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Type</td><td align="center">Required</td><td>Description</td></tr><tr><td><code>wallet_address</code></td><td>String</td><td align="center">✅</td><td>The public key of the wallet creating the token.</td></tr><tr><td><code>name</code></td><td>String</td><td align="center">✅</td><td>The token's name retrieved from metadata IPFS.</td></tr><tr><td><code>symbol</code></td><td>String</td><td align="center">✅</td><td>The token symbol retrieved from metadata IPFS.</td></tr><tr><td><code>metadataUri</code></td><td>String</td><td align="center">✅</td><td>IPFS metadata URL containing the token details.</td></tr><tr><td><code>amount</code></td><td>Float</td><td align="center">✅</td><td>The SOL amount for the first buy transaction.</td></tr><tr><td><code>slippage</code></td><td>Integer</td><td align="center">❌</td><td>Maximum slippage tolerance.</td></tr><tr><td><code>tip</code></td><td>Float</td><td align="center">❌</td><td>Priority fee for faster transaction processing.</td></tr><tr><td><code>type</code></td><td>String</td><td align="center">❌</td><td>Transaction type (<code>jito</code>).</td></tr></tbody></table>

***

### 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**:

```typescript
wallet_address: "4XsW7fg4rRVKbKHZjqXVZL..."
```

#### 2. name

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

**Example**:

```typescript
name: metadataResponseJSON.metadata.name
```

#### 3. symbol

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

```typescript
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**:

```typescript
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
```

{% hint style="danger" %}
Ensure you have enough tokens in your wallet to avoid insufficient balance errors.
{% endhint %}

#### 6. slippage

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

**Example**:

```
slippage: 90
```

{% hint style="warning" %}
Higher slippage tolerances prevent failed transactions in volatile markets
{% endhint %}

#### 7. tip

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

**Example**:

```
tip: 0.001
```

{% hint style="info" %}
Use a competitive tip value during high network activity to prioritize your transaction.
{% endhint %}

#### 8. type

Specifies the transaction type.

* Supported values: `jito` (default), `bloxroute`.

**Example**:

```
type: "jito"
```

{% hint style="info" %}
Use jito for priority execution.
{% endhint %}

***

### 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**

```json
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**

```json
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:

{% content-ref url="/pages/qJih6lGQhbEMPpvdqGDb" %}
[Swapping with Node.js](/api-documentation/swapping/swapping-with-node.js.md)
{% endcontent-ref %}

{% content-ref url="/pages/gcuTee6hEfRuJkrrc9vR" %}
[Swapping with Python](/api-documentation/swapping/swapping-with-python.md)
{% endcontent-ref %}

{% content-ref url="/pages/dh9M8QBq33l6SJQDL2K5" %}
[Swapping with Rust](/api-documentation/swapping/swapping-with-rust.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.solanaportal.io/api-documentation/token-creation/tokencreation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
