Solana Sniper Bot Raydium Sniper Bot Pumpfun Sniper Bot Bonkfun Sniper Bot Meteora Sniper Bot
Last updated Jul 7, 2026
50
Stars
1.3k
Forks
0
Issues
+1
Stars/day
Attention Score
98
Topics
Language breakdown
TypeScript 100.0%
▸ Files
click to expand
README
Solana Sniper Bot for Raydium
TypeScript bot that listens for new Raydium CPMM pool initialization events on Solana and can execute buy/sell logic with risk checks.
Features
- Subscribes to Raydium CPMM program logs in real time.
- Detects new pool initialization transactions.
- Applies checks before trading (liquidity threshold, token tax, authority checks).
- Supports take-profit, trailing logic, and hard stop-loss logic.
- Includes Jito bundle tip support.
Requirements
- Node.js 18+
- Yarn or npm
- Solana mainnet RPC endpoint + websocket endpoint
- Funded wallet private key (base58)
Install
yarn install
or
npm install
Environment Setup
Create a .env file in project root.
Example:
RPCENDPOINT=https://mainnet.helius-rpc.com/?api-key=YOURKEY
RPCWEBSOCKETENDPOINT=wss://mainnet.helius-rpc.com/?api-key=YOUR_KEY
PRIVATEKEY=YOURBASE58SECRETKEY
BUY_AMOUNT=0.00001 WSOL_AMOUNT=0.00001 DELAY=2000 MINLIQUIDITYSOL=100
MAXDEVWALLETSUPPLYPCT=20 MAXSELLTAX_PCT=10 REQUIREREVOKEDUPGRADE_AUTHORITY=true
TPLEVELSPCT1=25 TPLEVELSPCT2=50 TPLEVELSPCT3=100
TPSIZEPCT1=0.3 TPSIZEPCT2=0.4 TPSIZEPCT3=0.3
TRAILDISTANCEPCT=10 HARDSTOPLOSS_PCT=-25
JITO_FEE=0.0001
Env Variable Reference
RPC_ENDPOINT: HTTP Solana RPC URL.RPCWEBSOCKETENDPOINT: WS Solana RPC URL for log subscriptions.PRIVATE_KEY: Base58 private key used for transaction signing.BUY_AMOUNT: Buy sizing input used in trade logic.WSOL_AMOUNT: SOL amount wrapped to WSOL for swap transfer.DELAY: Milliseconds between sell-condition checks.MINLIQUIDITYSOL: Minimum detected liquidity required before trading.MAXDEVWALLETSUPPLYPCT: Max allowed creator wallet supply percent.MAXSELLTAX_PCT: Max allowed transfer fee/tax percent for Token-2022 checks.REQUIREREVOKEDUPGRADE_AUTHORITY: Enables authority revocation check logic.TPLEVELSPCT1..3: Profit percentage thresholds for multi-step TP.TPSIZEPCT1..3: Portion to sell at each TP threshold.TRAILDISTANCEPCT: Trailing distance logic threshold.HARDSTOPLOSS_PCT: Loss threshold where full exit is triggered.JITO_FEE: Tip amount used in Jito bundle transaction flow.
Run
Start sniper listener:
yarn start
Build:
yarn build
Run test helper:
yarn test
Project Structure
src/index.ts: Main runtime entrypoint (listener startup).src/utils/utils.ts: Transaction parsing, checks, strategy execution.src/utils/jito.ts: Jito bundle + tip submission flow.src/constants/constants.ts: Env loading and runtime constants.src/raydium-cpmm/: Raydium CPMM interaction helpers.
Notes
- Never commit your real
.envor wallet key. - Keep
node_modules/out of git. - Use a dedicated low-balance wallet for bot operation.
- Test with small size settings first.
Troubleshooting
- If startup exits immediately, verify all required env keys are set.
- If no events are detected, verify RPC websocket endpoint supports logs.
- If buys fail, check wallet SOL balance and token account creation fees.
- If sells do not trigger, review TP/SL numbers and ensure they are numeric.
🔗 More in this category