SolSniper guide

How to set up, run and control your Solana token bot from Telegram: from creating the Telegram bot, to paper trading, to trading real SOL.

Read this first

Most new memecoins go to zero. The safety checks catch common scams (tokens you can't sell, liquidity the developer can pull, printable or freezable tokens, hidden taxes, insider-held supply), but they cannot stop a developer or insiders simply selling their own tokens. Paper trade for a while, look at /pnl, and only put money in the bot wallet that you can afford to lose completely.

What it does

SolSniper runs on your server around the clock. It watches for brand-new Solana tokens, checks each one for safety and liquidity, and sends the ones that pass to your Telegram for approval. After you tap Buy, it manages the exit automatically.

New token appears→wait 90 s→safety checks→Telegram alert→you tap Buy→price checked every 10 s→auto take-profit / stop-loss
Where tokens come frompump.fun tokens that "graduate" to a real trading pool (about one a minute), plus Solana tokens that just got a DexScreener profile.
Paper mode (default)Uses real live prices but no real money. Every trade is simulated and recorded so you can judge results.
Manual approval (default)Nothing is bought unless you tap a button in Telegram. Alerts expire after 3 minutes.
Automatic exitsTakes profit in steps, gets your initial SOL back at 2x, stop loss, trailing stop, time limit. You can also sell anytime with a button.

Setup checklist

The bot is already installed at ~/projects/solsniper with everything it needs. You only have to do this:

All commands below are run in a terminal on the server. Start every session with:

cd ~/projects/solsniper

Step 1 · Set up the Telegram bot

Telegram is how the bot asks permission to buy and tells you what it's doing. You create your own private bot (free, takes a couple of minutes). It will only ever listen to your chat; messages from anyone else are ignored.

1

Create the bot with BotFather

  1. In Telegram, search for @BotFather (blue check mark) and open it.
  2. Send /newbot.
  3. Give it a display name, e.g. My SolSniper.
  4. Give it a username ending in bot, e.g. mattbox_solsniper_bot (must be unique).
  5. BotFather replies with a token that looks like 7412345678:AAH3k...xyz. Copy it. Treat it like a password.
2

Create your .env file and paste the token

cd ~/projects/solsniper
cp .env.example .env
chmod 600 .env
nano .env

Fill in the line TELEGRAM_BOT_TOKEN= with your token (no spaces, no quotes):

TELEGRAM_BOT_TOKEN=7412345678:AAH3k...xyz

Save with Ctrl+O, Enter, then exit with Ctrl+X.

3

Get your chat ID

  1. In Telegram, open your new bot (tap the link BotFather gave you) and press Start or send any message, like hi.
  2. On the server run:
.venv/bin/python -m solsniper tg-chatid

It prints something like chat id 123456789 (@yourname) -> TELEGRAM_CHAT_ID=123456789. Open .env again and fill it in:

TELEGRAM_CHAT_ID=123456789
Do this before starting the service

Once the bot is running it reads all incoming messages itself, so tg-chatid won't see them anymore. If you need it again later, stop the service first (sudo systemctl stop solsniper).

4

Optional: add a command menu in Telegram

In BotFather send /setcommands, pick your bot, then paste this so commands show up when you type /:

status - Mode, balance, PnL, open positions
positions - Open positions with live multiples
pending - Tokens waiting for approval
recent - Last 10 evaluated tokens
pnl - Profit and loss summary
pause - Stop new buys
resume - Resume new buys
sell - Sell a position: /sell ID PCT
check - Safety-check a token: /check MINT
get - Show a setting: /get KEY
set - Change a setting: /set KEY VALUE
unset - Remove an override: /unset KEY
help - All commands

Step 2 · Optional API keys (recommended)

The bot works without these, but both are free and make it faster and more reliable. Add them to the same .env file.

SettingWhere to get itWhy
SOLANA_RPC_URLSign up free at helius.dev (or QuickNode / Alchemy), create a Solana mainnet endpoint and copy its URL.The public Solana endpoint is slow and rate-limited. Strongly recommended before going live.
JUPITER_API_KEYFree key at portal.jup.ag.Jupiter provides all prices and swaps. Without a key you get about 1 request/second, which can slow checks when it's busy.
SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR-KEY
JUPITER_API_KEY=your-jupiter-key

Changes to .env only take effect after a restart: sudo systemctl restart solsniper.

Step 3 · Test it

Run the safety checks on any Solana token to confirm everything is connected. Copy a token address from dexscreener.com/solana and run:

.venv/bin/python -m solsniper check PASTE_TOKEN_ADDRESS_HERE

You'll get a full report: liquidity, market cap, holders, LP lock, RugCheck score, buy/sell activity, and a verdict (PASS, SOFT FAIL, FAIL or NOT READY) with the reasons.

To see the Telegram side working, start the bot in the foreground for a minute:

.venv/bin/python -m solsniper run

Within a few seconds you should get "🚀 solsniper started — mode PAPER, approval manual" in Telegram. Send /status to it. Press Ctrl+C in the terminal to stop.

Step 4 · Run it 24/7

Install it as a system service. It then starts on boot and restarts itself within 10 seconds if it ever crashes.

sudo cp deploy/solsniper.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now solsniper

Everyday service commands

WhatCommand
Is it running?systemctl status solsniper
Watch the live logjournalctl -u solsniper -f (Ctrl+C to exit)
Last 200 log linesjournalctl -u solsniper -n 200
Restart (after editing .env)sudo systemctl restart solsniper
Stop completelysudo systemctl stop solsniper
Don't start on bootsudo systemctl disable solsniper
Stopping the service stops exits too

If you just want to stop buying, send /pause in Telegram instead. The bot keeps watching and selling your open positions. Only stop the service when you have no open positions you care about.

Using it day to day

1 · You get a candidate alert

When a token passes every check, you get a message like this:

🟢 CANDIDATE #42 [PAPER] GTA6 GTA 6 Coin
Fjpwy5gu2PLLS7gX85qLgsYSjbq39axox6Zn9VFVpump
💧 Liq $24,301 · MC $112,534 · age 6.2m · pumpswap
👥 1878 holders · top1 8.6% · top10 9.1% · creator 0% · insiders 0%
🔒 LP locked 100% · rugcheck 31/100 · token-2022
📈 5m: vol $3,494 · 1929 buys / 1733 sells · 12.2%
🔁 buy impact 2.44% · round-trip loss 2.5%
DexScreener · RugCheck · Solscan
⏳ expires in 180s
✅ Buy 0.1 SOLBuy 0.2Buy 0.05
❌ Skip
LineWhat it meansWhat to look for
💧 Liq / MC / agePool liquidity in USD, market cap, minutes since the pool was created.More liquidity = easier to exit. Very young + tiny MC = highest risk.
👥 holdersNumber of holders and how much the biggest wallets own (pools excluded).Low top-10 % and 0% creator/insiders is good.
🔒 LP locked% of the pool's liquidity tokens burned or locked.100% means the developer can't pull the liquidity.
rugcheckRugCheck.xyz risk score, 0–100. Lower is safer.Under ~40 is typical for clean launches.
📈 5mLast 5 minutes: volume, number of buys vs sells, price change.More buys than sells and not crashing.
🔁 impact / round-tripHow much your buy moves the price, and how much you'd lose buying then instantly selling.Round-trip under ~5% is healthy. High = hidden tax or thin pool.
⚠️ warningsNon-fatal RugCheck notes (e.g. "Mutable metadata").Use your judgment.

Tap the DexScreener link to see the chart before deciding. Then:

  • ✅ Buy 0.1 SOL buys your normal size. Buy 0.2 buys double and Buy 0.05 buys half.
  • ❌ Skip ignores it. Doing nothing does the same: it expires after 3 minutes.
  • Want a custom size? Type /approve 42 0.3 to buy 0.3 SOL of candidate #42.
Built-in protection when you approve

The bot re-checks the price the moment you tap Buy. If the price has already pumped more than 25% since the alert, it cancels the buy instead of chasing it. It also refuses if you'd exceed your position limits, total exposure, daily loss limit or minimum SOL reserve.

2 · You get a buy confirmation

🛒 [PAPER] Bought GTA6 — position #7
0.1003 SOL → 412,880 tokens
Sell 25%Sell 50%Sell 100%

Note the position number (#7). Those Sell buttons work at any time. From now on the bot checks the price every 10 seconds and sells by your exit rules.

3 · You get sell notices

💰 [PAPER] Sold 50% of #7 GTA6 — take profit 2.0x: recover initial
received 0.1001 SOL · realized so far 0.1001 / cost 0.1003
🏁 [PAPER] Sold 100% of #7 GTA6 — trailing stop: 3.10x, peak 4.60x
received 0.1550 SOL · realized so far 0.3551 / cost 0.1003
FINAL PnL +0.2548 SOL (+254%)

💰 = partial sell (position still open). 🏁 = position closed with final profit/loss.

Other messages you may see

MessageMeaning
✅ passed checks but not bought: …A token passed, but a limit blocked it (max positions, exposure, low balance, paused).
🚨 NO SELL ROUTEThe bot can't get a sell price for a position. The liquidity may have been pulled. Check the chart immediately.
🛑 Daily loss limit hitToday's realized losses reached your limit. Buying is paused until you send /resume.
❌ Buy/Sell failedA trade didn't go through (no route, slippage, network). The reason is included.
📊 daily summarySent every day at 00:00 UTC (5 PM MST, your server's time zone; change with /set telegram.daily_summary_utc_hour 15 for 8 AM MST): balance, positions, PnL.
🔄 config reloadedYou (or /set) changed a setting and it's now active.

Telegram commands

CommandWhat it doesExample
/statusMode, approval setting, paused or running, balance, PnL today and all-time, open positions./status
/positionsOpen positions with current multiple, peak, value, cost, realized SOL, age./positions
/pendingCandidates waiting for approval and seconds left./pending
/approve ID [SOL]Buy a pending candidate, optionally with a custom size./approve 42 0.25
/skip IDReject a pending candidate./skip 42
/sell POS [PCT]Sell a percentage of a position (default 100%)./sell 7 50
/pauseStop new buys and alerts. Exits keep running./pause
/resumeStart looking for buys again./resume
/recentLast 10 tokens evaluated and why each was rejected. Useful to tune filters./recent
/check MINTRun the full safety check on any token address./check Fjpw…pump
/pnlClosed positions: count, win rate, net SOL, best and worst trade./pnl
/get KEYShow a setting's current value./get budget.buy_amount_sol
/set KEY VALUEChange any setting instantly. See Changing settings./set exits.stop_loss_pct -25
/unset KEYRemove your Telegram change and go back to the value in config.yaml./unset exits.stop_loss_pct
/helpList of commands./help

IDs can be typed with or without #: /sell #7 and /sell 7 are the same.

Changing settings

You can change any setting two ways. Neither needs a restart.

From Telegram, quick changes/set KEY VALUE. Saved in data/overrides.yaml and kept across restarts. Invalid values are rejected with an explanation.
Edit the file, bigger changesnano ~/projects/solsniper/config.yaml. The bot picks it up within 5 seconds. Every option is explained in config.example.yaml.
Which one wins?

Telegram /set values override config.yaml. If an edit to the file seems ignored, you probably set the same key in Telegram earlier. Run /unset KEY to clear it.

Budget & risk

KeyDefaultMeaning
budget.buy_amount_sol0.1SOL spent per normal buy.
budget.max_open_positions5Maximum positions open at once.
budget.max_total_exposure_sol0.5Maximum SOL tied up in open positions in total.
budget.min_sol_reserve0.05Always keep at least this much SOL for fees.
budget.daily_loss_limit_sol0.3Auto-pause buying after this much realized loss in a UTC day.
approvalmanualmanual = you approve each buy. auto = bot buys everything that passes.
approval_timeout_sec180How long an alert stays valid.
max_price_move_since_alert_pct25Cancel an approved buy if the price rose more than this since the alert.
execution.slippage_bps1500Max buy slippage (1500 = 15%). Too low and buys fail on fast tokens.
execution.sell_slippage_bps2000Max sell slippage (20%).
paper.starting_balance_sol5.0Fake balance for paper mode.

Exits

KeyDefaultMeaning
exits.take_profit2x initial, 4x 50%, 8x 50%The take-profit ladder. See How selling works.
exits.stop_loss_pct-35Sell everything at -35% from entry. null disables.
exits.stop_loss_after_initial_recoverednullOnce your initial is back, move the stop to this multiple (e.g. 1.0 = break-even).
exits.trailing_stopactivate 1.8x, drop 30%Once the peak reaches 1.8x, sell everything if the price falls 30% from the peak.
exits.max_hold_minutes360Sell whatever is left after 6 hours. null = hold forever.
exits.autotruefalse = only notify with Sell buttons; you sell manually.
exits.monitor_interval_sec10How often prices are checked.

Example /set commands

/set budget.buy_amount_sol 0.05
/set budget.max_open_positions 3
/set budget.daily_loss_limit_sol 0.2
/set exits.stop_loss_pct -25
/set exits.stop_loss_after_initial_recovered 1.0
/set exits.trailing_stop {activate_at: 2, drawdown_pct: 25}
/set exits.max_hold_minutes 120
/set exits.take_profit [{at: 1.5, sell_pct: 30}, {at: 2, sell: initial}, {at: 5, sell_pct: 100}]
/set filters.min_liquidity_usd 30000
/set filters.max_pair_age_min null
/set sources.dexscreener_boosts true
/set approval_timeout_sec 300

Lists and groups use the format shown above: square brackets for a list, curly braces for a group. null turns a check or rule off.

How selling works

Every 10 seconds the bot asks Jupiter, "if I sold my whole remaining position right now, how much SOL would I get?" It compares that to what those tokens cost you. That ratio is the multiple: 1.0x = break-even, 2.0x = doubled, 0.65x = down 35%. Price impact is included, so the multiple is what you'd really get.

The rules, in priority order

  1. Stop loss: multiple at or below 0.65x (−35%), sell 100%.
  2. Trailing stop: once the peak has reached 1.8x, if the price drops 30% from that peak, sell 100%.
  3. Max hold: after 6 hours, sell 100%.
  4. Take-profit ladder: each step fires once, lowest first.

The take-profit ladder

Each step is either:

  • {at: 4, sell_pct: 50}: at 4x, sell 50% of what you still hold.
  • {at: 2, sell: initial}: at 2x, sell exactly enough to get your original SOL back. The rest is a "free ride".

Worked example with the defaults (0.1 SOL buy)

PriceWhat happensSOL back so farStill riding
BuySpend 0.1 SOL0100% (worth 0.1)
2x"Recover initial": sells ~50%0.10, investment back50% (worth 0.1)
4xSells 50% of the remainder0.2025% (worth 0.1)
8xSells 50% of the remainder0.3012.5% (worth 0.1)
Falls 30% from its peakTrailing stop sells the rest~0.37closed

If instead it dumps straight after you buy, the stop loss sells everything around −35% (≈0.065 SOL back). In a fast crash the actual fill can be worse.

Popular alternative setups

Conservative: /set exits.take_profit [{at: 1.5, sell: initial}, {at: 3, sell_pct: 100}] plus /set exits.stop_loss_pct -20

Moonbag: /set exits.take_profit [{at: 2, sell: initial}] plus /set exits.trailing_stop {activate_at: 3, drawdown_pct: 40}

Protect after recovery: /set exits.stop_loss_after_initial_recovered 1.0. Once your initial is back, the rest is sold if it falls back to break-even.

Safety checks

A token must pass every enabled check before you see it. Hard failures reject a token permanently. Soft failures (things that can improve, like volume) are re-checked every 2 minutes, up to 3 times. Type /recent to see why tokens are being rejected.

CheckSettingDefaultProtects against
Mint authority revokedfilters.require_mint_authority_revokedonDeveloper printing unlimited tokens
Freeze authority revokedfilters.require_freeze_authority_revokedonDeveloper freezing your tokens so you can't sell
No dangerous token featuresfilters.reject_token2022_dangerous_extensionsonTrap tokens (can take your tokens back, block or pause transfers)
Transfer feefilters.max_transfer_fee_pct0Hidden tax on every trade
RugCheck danger flags / scorefilters.max_rugcheck_score_normalised60Known scam patterns, creators who rugged before
LP locked / burnedfilters.min_lp_locked_pct90%Developer pulling the liquidity
Top holderfilters.max_top1_holder_pct10%One whale dumping
Top 10 holdersfilters.max_top10_holder_pct35%Concentrated supply
Creator holdingsfilters.max_creator_holding_pct5%Developer dumping
Insider holdingsfilters.max_insider_holding_pct15%Linked insider wallets
Liquidityfilters.min_liquidity_usd / max_…$15k – $2MCan't exit; or too late/too big
Market capfilters.min_market_cap_usd / max_…$20k – $3MDefines "early"
Pair agefilters.min_pair_age_min / max_…1 – 120 minDefines "early"
Holdersfilters.min_holders150No real community
5-min volume / buysfilters.min_volume_m5_usd, min_buys_m5$3k, 20Dead tokens
Buy/sell ratiofilters.min_buy_sell_ratio_m50.8Everyone selling
5-min price dropfilters.max_price_drop_m5_pct35%Already dumping
Socialsfilters.require_socialsoffNo website/Twitter/Telegram
Buy price impactfilters.max_buy_price_impact_pct5%Pool too small for your size
Round-trip testfilters.max_roundtrip_loss_pct12%Can't sell (honeypot), hidden taxes

Getting too few alerts? Loosen the market filters first (e.g. /set filters.min_holders 80, /set filters.min_liquidity_usd 10000). Getting junk? Tighten them. Leave the contract checks (authorities, extensions, LP lock, round-trip) on.

Going live (real money)

Before you go live

Paper trade long enough to have 30+ closed trades in /pnl. Paper results are optimistic: real trades compete with professional bots and fill worse, even though paper mode already deducts an extra 3% per trade. If paper isn't profitable, live won't be.

1

Create a dedicated bot wallet

Never use your main MetaMask/Phantom wallet or seed phrase. Create a fresh wallet just for the bot:

cd ~/projects/solsniper
.venv/bin/python -m solsniper keygen

It creates secrets/bot-wallet.json (readable only by you) and prints the wallet's public address. The private key is never shown and never leaves the server.

Back up that file

Copy secrets/bot-wallet.json somewhere safe and offline (e.g. an encrypted USB drive). If the server dies without a backup, any funds in it are gone. Anyone who gets that file controls the funds.

2

Point the bot at the wallet

Add this line to .env, then restart:

SOLSNIPER_KEYPAIR=/home/mattbox/projects/solsniper/secrets/bot-wallet.json
sudo systemctl restart solsniper

/status in Telegram now shows the wallet address. It's still in paper mode.

3

Fund it with a small amount

From an exchange or your main wallet, send SOL to the bot's address. Start small, e.g. 0.5–1 SOL with buy_amount_sol at 0.05–0.1. Keep the reserve (0.05 SOL) for fees.

4

Switch to live

/set mode live confirm

The bot replies with the mode change. Alerts and buys now say [LIVE] and include Solscan transaction links. Paper positions keep being managed separately until they close.

Go back to paper anytime: /set mode paper.

5

Later: fully automatic buying

Once you trust the filters in live mode:

/set approval auto

The bot then buys every token that passes all checks, within your limits, and sends you a 🤖 AUTO-BUY notice each time. Your position limits, exposure cap and daily loss limit still apply. Switch back with /set approval manual.

Withdrawing profits

The bot wallet is a normal Solana wallet. To move SOL out, import secrets/bot-wallet.json into a wallet app (Phantom and Solflare can import a private key), or ask your assistant for a one-off withdraw command. Send /pause first and wait until no sells are in progress.

Shell commands

Everything you can do in Telegram also works from the server terminal, which is handy if Telegram is down. Run them from ~/projects/solsniper:

.venv/bin/python -m solsniper status
.venv/bin/python -m solsniper positions
.venv/bin/python -m solsniper pending
.venv/bin/python -m solsniper approve 42 0.1
.venv/bin/python -m solsniper skip 42
.venv/bin/python -m solsniper sell 7 50
.venv/bin/python -m solsniper pause
.venv/bin/python -m solsniper resume
.venv/bin/python -m solsniper recent
.venv/bin/python -m solsniper pnl
.venv/bin/python -m solsniper check TOKEN_ADDRESS
.venv/bin/python -m solsniper get exits.take_profit
.venv/bin/python -m solsniper set budget.buy_amount_sol 0.05
.venv/bin/python -m solsniper unset budget.buy_amount_sol

approve, skip, sell, pause and resume are passed to the running bot, so the service must be running.

Tip: make a short alias

Add this to ~/.bashrc, then open a new terminal, and you can just type sniper status:

alias sniper='cd ~/projects/solsniper && .venv/bin/python -m solsniper'

Troubleshooting

I don't get any Telegram messages
  • Check the service is running: systemctl status solsniper.
  • Check the log for Telegram errors: journalctl -u solsniper -n 100 | grep -i telegram.
  • Make sure TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in .env have no spaces or quotes, then sudo systemctl restart solsniper.
  • Make sure you pressed Start in your bot's chat at least once.
The bot runs but never sends candidates

That's normal for stretches of time: most new tokens fail the checks. Send /recent to see the reasons. If one rule rejects nearly everything (e.g. "only 90 holders (< 150)"), loosen that rule with /set.

Buttons say "expired"

Alerts are valid for 3 minutes. Make that longer with /set approval_timeout_sec 300. Remember the bot also cancels if the price pumped more than 25% since the alert.

"jupiter rate limited" in the log

You're on Jupiter's free tier without a key. Add a free JUPITER_API_KEY (Step 2) and restart. The bot retries automatically meanwhile.

Live buy failed / "confirmation timeout"

Fast tokens move; the swap may have exceeded slippage, or the network was congested. Check the Solscan link in the message. If tokens arrived anyway, the bot normally detects them. If a buy confirmed very late, compare /status with the wallet on Solscan. A paid RPC (SOLANA_RPC_URL) makes this much rarer.

The service keeps restarting after I set live mode

The bot refuses to start in live mode without a wallet key. Check that SOLSNIPER_KEYPAIR in .env points to the right file and that the file is readable only by you (chmod 600 secrets/bot-wallet.json). Or switch back: .venv/bin/python -m solsniper set mode paper.

I edited config.yaml but nothing changed

A Telegram /set for the same key overrides the file. Run /unset that.key. Also check the log for "invalid config": a typo in the file makes the bot keep the previous settings.

Start over with fresh paper results
sudo systemctl stop solsniper
mv data/solsniper.db data/solsniper-old.db
sudo systemctl start solsniper

This resets the paper balance and history. Your settings and wallet aren't touched.

Files & backups

FileWhat it isBack up?
.envTelegram token, chat ID, API keys, wallet path.Yes (private)
secrets/bot-wallet.jsonThe bot wallet's private key.Yes, offline and encrypted
config.yamlYour settings.Yes
config.example.yamlEvery setting with explanations (defaults).No
data/overrides.yamlChanges made with /set.Optional
data/solsniper.dbEvery token evaluated (with full report), position and trade.Optional
README.mdShort technical reference.No
Security habits

Never paste your wallet key or seed phrase into a chat, website or AI. Never share the Telegram bot token. Keep only what you can afford to lose in the bot wallet, and withdraw profits regularly.