home / skills / openclaw / skills / pump-fun

pump-fun skill

/skills/playdadev/pump-fun

This skill enables buy, sell, and launch operations on Pump.fun via the PumpPortal API, simplifying token trading for developers.

npx playbooks add skill openclaw/skills --skill pump-fun

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.7 KB
---
name: pump-fun
description: Buy, sell, and launch tokens on Pump.fun using the PumpPortal API
homepage: https://pump.fun
user-invocable: true
metadata: {"moltbot":{"requires":{"env":["SOLANA_PRIVATE_KEY"]},"primaryEnv":"SOLANA_PRIVATE_KEY"}}
---

# Pump.fun Trading Skill

This skill enables trading and launching tokens on Pump.fun through the PumpPortal API.

## Commands

### Buy Tokens
Buy tokens on Pump.fun by specifying the token mint address and amount.

**Usage:** `/pump-buy <mint_address> <amount_sol> [slippage]`

**Examples:**
- `/pump-buy 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU 0.1` - Buy 0.1 SOL worth of tokens
- `/pump-buy 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU 0.5 15` - Buy with 15% slippage

### Sell Tokens
Sell tokens on Pump.fun by specifying the token mint address and amount.

**Usage:** `/pump-sell <mint_address> <amount|percentage> [slippage]`

**Examples:**
- `/pump-sell 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU 1000000` - Sell 1,000,000 tokens
- `/pump-sell 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU 100%` - Sell all tokens
- `/pump-sell 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU 50% 10` - Sell 50% with 10% slippage

### Launch Token
Create and launch a new token on Pump.fun.

**Usage:** `/pump-launch <name> <symbol> <description> [dev_buy_sol]`

**Examples:**
- `/pump-launch "My Token" MTK "A revolutionary token" 1` - Launch with 1 SOL dev buy
- `/pump-launch "Cool Coin" COOL "The coolest coin ever"` - Launch with default dev buy

## Configuration

### Required Environment Variables
- `SOLANA_PRIVATE_KEY` - Your Solana wallet private key (base58 encoded)

### Optional Environment Variables
- `SOLANA_RPC_URL` - Custom RPC endpoint (defaults to public mainnet)
- `PUMP_PRIORITY_FEE` - Priority fee in SOL (default: 0.0005)
- `PUMP_DEFAULT_SLIPPAGE` - Default slippage percentage (default: 10)

## Setup

1. Install dependencies:
   ```bash
   cd {baseDir}
   npm install
   ```

2. Set your environment variables:
   ```bash
   export SOLANA_PRIVATE_KEY="your-base58-private-key"
   ```

3. (Optional) Configure custom RPC:
   ```bash
   export SOLANA_RPC_URL="https://your-rpc-endpoint.com"
   ```

## Security Notes

- Never share your private key
- Use a dedicated trading wallet with limited funds
- Start with small amounts to test
- The skill uses the Local Transaction API for maximum security (transactions are signed locally)

## Fees

- PumpPortal charges a 0.5% fee per trade
- Standard Solana network fees apply
- Priority fees are configurable

## Supported Pools

The skill automatically selects the best pool, but supports:
- `pump` - Pump.fun bonding curve
- `raydium` - Raydium AMM (for graduated tokens)
- `pump-amm` - Pump.fun AMM
- `auto` - Automatic pool selection (default)

Overview

This skill provides tools to buy, sell, and launch tokens on Pump.fun via the PumpPortal API. It handles local transaction signing, pool selection, and configurable slippage and fees to streamline trading and token launches. Use it to automate small trades, participate in launches, or bootstrap new tokens with an optional dev buy.

How this skill works

The skill sends signed Solana transactions locally using your SOLANA_PRIVATE_KEY and the PumpPortal API. It chooses the best liquidity pool (auto, pump, pump-amm, raydium) by default, applies configured slippage and priority fee settings, and supports buy, sell, and launch commands with optional parameters. Environment variables let you customize RPC endpoint, default slippage, and priority fee.

When to use it

  • Make a quick market buy of a newly listed token by mint address.
  • Sell part or all of a token position with optional slippage control.
  • Launch a new token and optionally perform a developer buy to seed liquidity.
  • Automate repeated trades or batch token launches using scripts.
  • Test trades on mainnet while signing transactions locally for security.

Best practices

  • Use a dedicated trading wallet with limited funds and never expose your private key.
  • Start with small amounts to verify behavior and pool selection before larger trades.
  • Set sensible default slippage (e.g., 5–15%) to avoid failed or front-run trades.
  • Configure a reliable SOLANA_RPC_URL to reduce failed transactions and timeouts.
  • Keep PUMP_PRIORITY_FEE reasonable to balance speed and cost on congested slots.

Example use cases

  • Buy 0.1 SOL worth of a token by mint address for initial exposure.
  • Sell 50% of a token holding with 10% slippage to take partial profit.
  • Launch a new token with a 1 SOL dev buy to seed initial liquidity.
  • Integrate into a bot to monitor new mints and perform automated buys.
  • Archive and reproduce trade actions for auditing or backup purposes.

FAQ

What environment variables must I set?

Set SOLANA_PRIVATE_KEY (base58). Optionally set SOLANA_RPC_URL, PUMP_PRIORITY_FEE, and PUMP_DEFAULT_SLIPPAGE.

How is transaction signing handled?

Transactions are signed locally with your private key and then submitted to the PumpPortal API to minimize key exposure.

What fees apply to trades?

PumpPortal charges 0.5% per trade, standard Solana network fees apply, and an optional priority fee can be configured.