SSB solana sniper bot listens to new Raydium USDC or SOL pools and buys tokens for a fixed amount in USDC/SOL.
Bot snipe & trade new token before it show on web Raydium UI ready for swapping.
Note
This is provided as is, for learning and test purposes. Use at your own risk.
Automatic snipe new pair pool
Stoploss & Takeprofit
Filter by min & max liquidity
USDC & WSOL
Burn Check
Renounce Check
Speed Buy
First step:
- Create a new Solana wallet
- Transfer some SOL to this new wallet
- Convert some SOL to USDC or WSOL (you need USDC or WSOL depending on the configuration in .env file)
Tip
[1] git clone https://github.com/rennandagomez/solana-sniper-bot
[2] cd solana-sniper-bot-main
[3] npm install
[4] Configure .env.copy file and rename .env
[5] npm run ssb
- Configure the script by updating
.env.copy
file (remove the ".copy" extension). MY_PRIVATE_KEY
(your wallet private key)RPC_ENDPOINT
(https RPC endpoint) paid services are fasterRPC_WEBSOCKET
(websocket RPC endpoint) paid services are fasterTOKEN_SYMB
(which pools to snipe, USDC or WSOL)BUY_AMOUNT
(amount used to buy each new token)USE_SNIPEDLIST
(bot buy only tokens listed in snipedlist.txt)SNIPE_LIST_REFRESH_INTERVAL
(how often snipe list should be refreshed in milliseconds)MINT_IS_RENOUNCED
(bot buy only if mint is renounced)MIN_POOL_SIZE
(bot buy only if pool size is > of amount)MAX_POOL_SIZE
(bot buy only if pool size is < of amount)TAKE_PROFIT=200
(in %)STOP_LOSS=90
(in %)BIRDEYE_APIKEY=
get here: https://docs.birdeye.so/docs/authentication-api-keys
By default, auto sell is enabled. If you want to disable it, you need to:
- Change variable
AUTO_SELL
tofalse
- Update
MAX_SELL_RETRIES
to set the maximum number of retries for selling token - Update
AUTO_SELL_DELAY
to the number of milliseconds you want to wait before selling the token (this will sell the token after the specified delay. (+- RPC node speed)).
AUTO_SELL_DELAY to 0, token will be sold immediately after buy. There is no guarantee that the token will be sold at a profit or even sold at all. The developer is not responsible for any losses incurred by using this feature.
By default, script buys each token which has a new liquidity pool created and open for trading. There are scenarios when you want to buy one specific token as soon as possible during the launch event. To achieve this, you'll have to use snipe list.
- Change variable
USE_SNIPEDLIST
totrue
- Add token mint addresses you wish to buy in
snipedlist.txt
file (add each address as a new line).
This prevent from buying everything, and buy just listed tokens.
You can update the list while script is running. Script will check for new values in specified interval (SNIPE_LIST_REFRESH_INTERVAL
).
If you see following error in your log file:
Error: 410 Gone: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}
It means your RPC node doesn't support methods needed to execute script. FIX: Change your RPC node. You can use Shyft, Helius or Quicknode.If you see following error in your log file:
Error: No SOL token account found in wallet:
it means that your wallet not have USDC/WSOL token account. FIX: Go to Jup.ag and swap some SOL/USDC or SOL/WSOL.
Discord: @devvittal
Use this script at your own risk. No financial advice.