Important: Pump.fun memecoins are high-risk, high-volatility assets. Most tokens go to zero within minutes of launch. Start in paper trading mode, size small, and only risk what you can afford to lose entirely.
Overview
The pump-fun-sniper skill connects a real-time PumpPortal WebSocket feed to the MoonPay CLI, giving Claude everything it needs to watch for new Solana token launches, evaluate early trading signals, and execute swaps automatically. Hundreds of tokens launch on Pump.fun every day — most are noise, but a few show enough signal in the first 30 seconds to be worth a small bet. This tool is designed to catch those windows before they close.
Key benefits
Real-time signal detection from every Pump.fun launch, with no API key required
Automated evaluation against a strict multi-metric filter so you only act on strong signals
Paper trading mode lets you validate your strategy before committing real funds
Non-custodial execution — trades go through your own wallet via the MoonPay CLI
How it works
The architecture has three components working in sequence:
PumpPortal WebSocket → Node.js listener (stdout) → Claude evaluates → mp token swap
PumpPortal is a free, public WebSocket API that streams every Pump.fun token creation and trade event in real time. The listener is a Node.js script Claude generates and runs — it subscribes to new token events, accumulates early trading data over a 10-second window per token, and emits structured signals to stdout. Claude reads those signals, evaluates them, and uses mp token swap for all execution.
The listener
The listener connects to wss://pumpportal.fun/api/data and does two things simultaneously:
Subscribes to all new token launches with
{"method": "subscribeNewToken"}For each new token, subscribes to its live trades with
{"method": "subscribeTokenTrade", "keys": [""]}
After the evaluation window, it emits a signal for each token:
</> JSON
{
"type": "signal",
"mint": "...",
"name": "PEPE2",
"symbol": "PEPE2",
"uniqueWallets": 14,
"totalTrades": 22,
"buyRatio": 0.72,
"netSolFlow": 1.4,
"ssr": 0.08,
"marketCapSol": 87,
"creatorInitialBuy": 1.2
}
For tokens Claude has already bought, the listener keeps streaming live trade events — one JSON line per trade — so the agent can track P&L and trigger exits in real time.
Signal evaluation
Not every launch is worth buying. The evaluation filter is intentionally aggressive — most tokens will fail multiple criteria, and that's the correct outcome.
Metric | What it measures | Pass threshold |
Unique wallets | Multiple distinct buyers, not one wallet cycling | ≥ 8 |
Buy ratio | Demand outpacing early sellers | ≥ 0.6 |
Net SOL flow | More SOL entering than leaving | > 0.3 SOL |
SSR (sell/buy SOL ratio) | Early sellers dumping? | < 0.2 |
Total trades | Genuine activity, not thin volume | ≥ 12 |
Market cap | Still early enough to have upside | 30–250 SOL |
Creator initial buy | Creator didn't pre-load heavily | < 3 SOL |
A strong signal passes all thresholds. Before executing, Claude can also run a quick safety check:
</> Bash
mp -f compact token check --token --chain solana
Buying
When a signal passes, Claude executes the swap:
</> Bash
mp token swap \
--wallet \
--chain solana \
--from-token So11111111111111111111111111111111111111111 \
--from-amount 0.01 \
--to-token
Note: 0.01 SOL is a reasonable starting size. Validate signal quality in paper mode before sizing up.
Monitoring and exits
After buying, the listener continues streaming trades for the held token. Claude tracks four things:
Unrealized P&L — current market cap vs. entry market cap
Peak market cap — highest seen since entry, used for trailing stop calculation
Flow direction — are the most recent trades predominantly buys or sells?
Stall detection — has market cap stopped making new highs?
Exit rules
Rule | Condition | Action |
Stop loss | Market cap drops 35% from entry | Sell |
Trailing stop | Market cap drops 30% from peak | Sell |
Stall exit | Up 15%+ but no new high for 30 seconds | Sell (take profit) |
Time limit | Held 5 min with < 10% gain | Sell |
Tip: The stall exit is the most important rule. Tokens that pump and flatline rarely re-pump. If you're up 15% and market cap has stopped climbing, taking profit into the stall is almost always the right move.
Selling
# Get current token balance
BALANCE=$(mp -f compact token balance list --wallet <name> --chain solana \
| jq -r --arg mint "<mint>" '.items[] | select(.address == $mint) | .balance.amount')
# Sell full position back to SOL
mp token swap \
--wallet <name> --chain solana \
--from-token <mint-address> \
--from-amount "$BALANCE" \
--to-token So11111111111111111111111111111111111111111
Paper trading first
Skip the mp token swap calls and just log what would have happened. Compare entry market cap to market cap at simulated exit to track paper P&L.
All trades — real and paper — are logged to ~/.config/pump-fun-sniper/trades.jsonl with full context: action, mint, name, SOL amount, market cap at entry and exit, P&L percentage, hold time, and exit reason.
Tip: Review your paper results before deploying real funds. Once you have a few sessions logged, ask Claude questions like: "What percentage of my paper trades were profitable? Which exit rule fired most often? Were there patterns in the tokens that worked vs. didn't?"
Get started
Step 1: Install the MoonPay CLI
</> Bash
npm install -g @moonpay/cli
Step 2: Launch the skill
Open Claude and run:
/pump-fun-sniper
Related skills
/moonpay-discover-tokens— Token research and safety checks before buying/moonpay-check-wallet— Monitor your Solana wallet balance/moonpay-budget-agent— Set a daily spend limit so the sniper never exceeds your risk tolerance/moonpay-trading-automation— Scheduled strategies: DCA, limit orders, stop losses
FAQs
Do I need an API key for PumpPortal?
Do I need an API key for PumpPortal?
No. PumpPortal is a free, public WebSocket API — no registration or API key required.
Is my wallet controlled by the tool?
Is my wallet controlled by the tool?
No. All trades execute through your own non-custodial wallet via the MoonPay CLI. The tool never takes custody of your funds.
Can I adjust the evaluation thresholds?
Can I adjust the evaluation thresholds?
Yes. Ask Claude to modify any of the signal criteria — for example, raising the unique wallets threshold or tightening the market cap range — before starting a session.
Where are my trade logs stored?
Where are my trade logs stored?
All trades are saved to ~/.config/pump-fun-sniper/trades.jsonl on your local machine.
