Skip to content

metavault-fi/solana-trading-bot

Repository files navigation

Warp Solana Trading Bot

Lightning-fast Solana sniper for Raydium new pools and Pump.fun launches. Real-time WebSocket listeners, smart filters, auto take-profit/stop-loss, and Jito bundle execution — built for traders who need speed without sacrificing safety checks.

Node.js Solana License: Ms-PL


Why Warp?

New token launches on Solana move in seconds. Manual trading loses to bots every time. Warp automates the full lifecycle:

  • Detect — WebSocket listeners for OpenBook, Raydium AMM, and Pump.fun program logs
  • Filter — renounced mint, burned LP, socials, pool size, snipe list, consecutive match requirements
  • Buy — configurable quote amount, slippage, and curve progress limits
  • Sell — auto TP/SL on wallet listener events
  • Execute fast — default RPC, Warp relay tips, or Jito bundles to five regions

One bot, two venues, three execution paths.


Features

Feature Detail
Raydium sniping New pool detection via program logs
Pump.fun support Native SOL buys on bonding curve
Filter pipeline Mint renounce, burn check, socials, pool bounds
Snipe list snipe-list.txt for trusted mints
Auto sell Take profit + stop loss on position
Jito bundles Multi-region submission with random tip accounts
Warp relay Priority fee tips for faster inclusion
WSOL / USDC quotes Raydium quote mint selection

Quick Start

Prerequisites

  • Node.js LTS
  • Solana wallet with SOL for trades and fees
  • Fast RPC endpoint (HTTPS + WSS) — public RPCs will lose races

Install

git clone https://github.com/metavault-fi/solana-trading-bot.git
cd solana-trading-bot
npm install
cp .env.copy .env

Minimal .env

PRIVATE_KEY=your_base58_or_json_array_or_mnemonic
RPC_ENDPOINT=https://your-rpc.com
RPC_WEBSOCKET_ENDPOINT=wss://your-rpc.com
COMMITMENT_LEVEL=confirmed

# Buy settings
QUOTE_MINT=WSOL
QUOTE_AMOUNT=0.1
BUY_SLIPPAGE=15
SELL_SLIPPAGE=15

# Auto sell
AUTO_SELL=true
TAKE_PROFIT=50
STOP_LOSS=30

# Venues
ENABLE_RAYDIUM=true
ENABLE_PUMP_FUN=true
PUMP_FUN_BUY_AMOUNT_SOL=0.05
PUMP_FUN_MAX_CURVE_PROGRESS=80

Run

npm run dev     # ts-node development
npm start       # production

Architecture

flowchart TB
    WS[WebSocket Listeners] --> Bot[bot.ts]
    Bot --> Filters[Filter Pipeline]
    Filters -->|match| TX[Transaction Executor]
    TX --> Default[Default RPC]
    TX --> Warp[Warp Relay]
    TX --> Jito[Jito Bundle]
    Cache[Market Cache] --> Bot
    Snipe[snipe-list.txt] --> Filters
Loading
index.ts              # Wire Connection, Listeners, Bot
bot.ts                # Buy/sell orchestration
listeners/
  listeners.ts        # OpenBook, Raydium, pump.fun, wallet
filters/              # Mint, pool, social checks
cache/                # Markets, pools, pumpfun state
transactions/
  default.ts          # Standard priority fees
  warp.ts             # Warp relay tips
  jito.ts             # Jito bundle (5 regions)
helpers/
  pumpfun.ts          # Curve math + instructions
  wallet.ts           # Key parsing

Configuration Reference

Wallet & connection

Env Notes
PRIVATE_KEY base58, JSON array, or mnemonic
RPC_ENDPOINT HTTPS RPC
RPC_WEBSOCKET_ENDPOINT WSS for listeners
COMMITMENT_LEVEL processed | confirmed | finalized

Buy / sell

Env Notes
QUOTE_MINT WSOL or USDC (Raydium only)
QUOTE_AMOUNT Size per buy
BUY_SLIPPAGE / SELL_SLIPPAGE Percent
AUTO_SELL Enable wallet listener TP/SL
TAKE_PROFIT / STOP_LOSS Percent targets
PUMP_FUN_BUY_AMOUNT_SOL SOL amount on curve
PUMP_FUN_MAX_CURVE_PROGRESS Skip if curve % filled

Raydium filters

Env Purpose
CHECK_IF_BURNED Require burned LP
CHECK_IF_MINT_IS_RENOUNCED Require renounced mint authority
CHECK_IF_SOCIALS Require metadata socials
MIN_POOL_SIZE / MAX_POOL_SIZE Liquidity bounds
CONSECUTIVE_FILTER_MATCHES Require N consecutive matches
USE_SNIPE_LIST Restrict to snipe-list.txt

Pump.fun bypasses most filters except curve progress and snipe list.

Executors

Mode Config
default COMPUTE_UNIT_LIMIT, COMPUTE_UNIT_PRICE
warp CUSTOM_FEE tip to Warp relay
jito Bundle to 5 regions, random tip account

Dependencies

  • @solana/web3.js — core Solana SDK
  • @raydium-io/raydium-sdk — AMM interactions
  • @metaplex-foundation/mpl-token-metadata — token metadata
  • Custom Pump.fun helpers in helpers/pumpfun.ts

Tips for Competitive Sniping

  1. Use a paid RPC — free endpoints add 200–500ms latency
  2. Start with filters ON — unfiltered sniping is mostly buying rugs
  3. Test with tiny QUOTE_AMOUNT — fees add up fast on failed txs
  4. Jito for contested launches — default RPC loses bundle races
  5. Maintain a snipe list — whitelist creators you trust

Safety & Disclaimer

  • Solana memecoins are extremely high risk. Most tokens go to zero.
  • Filters reduce but do not eliminate rug risk.
  • Never commit .env or share private keys.
  • Authors not liable for losses. Ms-PL license — see LICENSE.md.

Contributing

Issues and PRs welcome — filter improvements, new venue support, and executor optimizations.

About

solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors