Be first. Filter smart. Exit on your terms.
A production-ready Solana sniper built for Pump.fun launches — detect new tokens the moment they hit chain, buy through the bonding curve with priority fees, and let automation handle take-profit, stop-loss, and staged exits while you focus on strategy.
Manual sniping on Pump.fun is a race you usually lose: refresh lag, slow clicks, no filters, and emotional exits. This bot is built to do the opposite — speed at the source, rules before FOMO, and disciplined exits after the buy.
| You get | What it means for you |
|---|---|
| Sub-second detection | WebSocket log subscription on the Pump program — no polling Dexscreener |
| Curve-native execution | Direct bonding-curve buy/sell (not a generic swap UI) |
| Priority fee txs | Compute budget instructions so your buy competes in congested blocks |
| Smart filters | Liquidity floor, dev wallet %, keyword blacklist, holder concentration |
| Pre-buy honeypot check | Simulated sell before you commit SOL |
| Hands-off exits | 2× / 5× targets, tranches, stop-loss, optional trailing stop |
| Post-migration sells | Jupiter V6 fallback when the curve completes |
| Risk guardrails | Position caps, daily loss pause, max % of wallet per trade |
TypeScript. Strict mode. One .env file. Run locally — your keys, your machine, your edge.
NEW LAUNCH (Pump create / create_v2)
│
▼
┌──────────────┐
│ MONITOR │ WebSocket → parse mint, creator, name/symbol
└──────┬───────┘
│ passes filters
▼
┌──────────────┐
│ SNIPER │ honeypot sim → bonding-curve buy → track position
└──────┬───────┘
│
▼
┌──────────────┐
│ SELLER │ TP / SL / tranches / Jupiter if migrated
└──────────────┘
You configure the personality of the bot in env.example — aggressive sniper, conservative filter stack, or scaled tranche de-risking. Same engine, your rules.
Prerequisites: Node.js 18+, a Solana wallet with SOL, and an RPC with WebSocket (Helius, QuickNode, Triton, etc.). Free public RPCs are fine for testing; serious sniping needs a paid endpoint.
git clone <your-repo-url>
cd pumpfun-sniper
npm install
cp env.example .envOpen .env and set at minimum:
RPC_URL/RPC_WS_URL— your provider’s HTTP + WSS URLsPRIVATE_KEY— base58 secret key (never commit or share this)
Run in development:
npm run devRun in production:
npm run build
npm startWhen the bot sees a launch that passes your filters, you’ll get structured logs with mint, symbol, and tx signature. On shutdown (Ctrl+C), it prints a session PnL summary — wins, losses, and realized SOL.
Copy patterns from env.example or mix your own.
Aggressive entry, tight risk
BUY_AMOUNT_SOL=0.15
PRIORITY_FEE_MICROLAMPORTS=800000
MIN_INITIAL_LIQUIDITY_SOL=0.3
MAX_OPEN_POSITIONS=5Conservative — quality over quantity
BUY_AMOUNT_SOL=0.05
MIN_INITIAL_LIQUIDITY_SOL=1
MAX_DEV_WALLET_PCT=10
BLACKLISTED_KEYWORDS=scam,rug,test,elon,copy
MAX_TOP_HOLDERS_PCT=70Bank profits in stages (50% at 2×, rest at 5× or stop)
SELL_TRANCHES=2:50,5:100
ENABLE_TRAILING_STOP=true
TRAILING_STOP_PCT=20
STOP_LOSS_PCT=25Verbose debugging
LOG_LEVEL=debug npm run dev| Variable | What it controls | Default |
|---|---|---|
RPC_URL |
HTTP RPC | public mainnet |
RPC_WS_URL |
WebSocket RPC | derived from RPC_URL |
PRIVATE_KEY |
Wallet (base58) | required |
BUY_AMOUNT_SOL |
SOL per snipe | 0.1 |
MAX_SLIPPAGE_BPS |
Slippage (1000 = 10%) | 1000 |
PRIORITY_FEE_MICROLAMPORTS |
Priority fee per CU | 500000 |
COMPUTE_UNIT_LIMIT |
Max compute units | 200000 |
TAKE_PROFIT_MULTIPLIER |
Full exit at N× | 2 |
STOP_LOSS_PCT |
Cut loss at −N% | 30 |
TRAILING_STOP_PCT |
Trail from peak | 15 |
ENABLE_TRAILING_STOP |
On/off | false |
SELL_TRANCHES |
e.g. 2:50,5:100 |
2:50,5:100 |
SELL_POLL_INTERVAL_MS |
Position check interval | 3000 |
MAX_OPEN_POSITIONS |
Max concurrent bags | 3 |
BALANCE_SPEND_PCT_MAX |
Max wallet % per trade | 10 |
DAILY_LOSS_LIMIT_SOL |
Auto-pause after −N SOL | 1 |
BLACKLISTED_KEYWORDS |
Name/symbol blocklist | scam,rug,test |
MIN_INITIAL_LIQUIDITY_SOL |
Min curve liquidity | 0.5 |
MAX_DEV_WALLET_PCT |
Max creator hold % | 20 |
MAX_TOP_HOLDERS_PCT |
Reject concentrated supply | 80 |
HONEYPOT_CHECK_ENABLED |
Sim sell before buy | true |
USE_JUPITER_FALLBACK |
Sell after migration | true |
JUPITER_API_URL |
Jupiter V6 API | quote-api.jup.ag/v6 |
LOG_LEVEL |
debug / info / warn |
info |
Full template: see env.example.
- TypeScript strict — fewer runtime surprises in live trading
- Structured logging (pino) — timestamps, levels, JSON-friendly
- Retry + backoff on RPC calls — transient failures don’t kill a snipe
- Graceful shutdown — closes listeners, logs PnL on
SIGINT/SIGTERM - No magic numbers in code — every threshold lives in config
| Command | Use |
|---|---|
npm run dev |
Local run with ts-node |
npm run build |
Compile to dist/ |
npm start |
Run compiled bot |
npm run lint |
ESLint on src/ |
| File | Role |
|---|---|
src/monitor.ts |
Launch detection & filters |
src/sniper.ts |
Buy execution |
src/seller.ts |
Exit automation |
src/safety.ts |
Honeypot, rug heuristics, loss limits |
src/wallet.ts |
Keypair & balance guards |
src/config.ts |
Centralized settings |
- @solana/web3.js — RPC, txs, WebSocket logs
- @solana/spl-token — ATAs & balances
- Pump.fun program — bonding curve buy/sell
- Jupiter V6 — post-migration exits
- pino · p-retry · dotenv
Memecoin sniping is high risk. Many launches rug, honeypot, or never move. Faster bots and better RPCs still lose. This project is a tool, not a money printer — no guaranteed returns, not financial advice.
- Start with small
BUY_AMOUNT_SOL - Use a dedicated wallet with only what you can lose
- Never commit
.envor sharePRIVATE_KEY - Test behavior before sizing up
If you accept the risk and want a serious, configurable Pump.fun automation stack — clone it, configure it, run it.
PumpFun Sniper — detect · buy · manage · repeat