# Solana PumpFun Bot with Web Interface
**Solana PumpFun Bot** that listens to new Pump.Fun && Raydium pools and buys tokens for a fixed amount in WSOL.
Depending on the speed of the RPC node, the purchase usually happens before the token is available on UI for swapping. This program took me two months to complete, and I hope it will be helpful to everyone looking to snipe tokens on Solana!
## New in Version 5.2.0: Web Interface!
This version introduces a powerful web interface that makes managing your sniping operations easier than ever:
- **User-friendly Dashboard**: Monitor your bot's activity in real-time
- **Easy Configuration**: Change settings without editing files
- **Transaction History**: View all your buys and sells in one place
- **Token Management**: Track your portfolio performance
- **Mobile Responsive**: Control your bot from any device
The web interface runs locally on your machine, ensuring your data remains private and secure.

Note: Even for testing, besides using WSOL as the exchange token, it's important to keep more SOL for transaction fees. The configuration example is: "1 SOL / 0.1 WSOL / QUOTE_AMOUNT=0.01" You can adjust it according to your own situation.
- `WSOL Snipe`
- `Auto-Sell`
- `TP/SL`
- `Min Liq`
- `Burn/Lock Check`
- `Renounce Check`
- `Fast Buy`
- `Web Interface`
> [!NOTE]
> This is provided as is, for learning purposes.
## SETUP
To run the script you need to:
1. Download and extract the repository files: Use the command "git clone https://github.com/MrPRoa/solana-sniper-web" or click the green "Code" button and select "Download ZIP".
2. Install the Node.js environment on your computer : https://nodejs.org/en
3. The runtime environment should be a terminal or VSCode. Detailed steps are provided below, please read carefully.
4. Convert some SOL into WSOL for trading. Note: Even if you only want to run the test for one hour, you still need to retain enough SOL, as gas fees are paid in SOL. For example (10 SOL) : (1 WSOL) : (QUOTE_AMOUNT=0.1) +-
`Jupiter Wrap` : https://jup.ag/
Click "MANUAL" to set "Use wSOL", and finally click "Manage" to convert part of SOL to WSOL.

## CONFIG
1. Configure the script by updating `.env.example` file (**remove the .example from the file name when done**).
2. `PRIVATE_KEY` (your wallet private key)
3. `RPC_ENDPOINT` (https RPC endpoint)
4. `RPC_WEBSOCKET_ENDPOINT` (websocket RPC endpoint)
5. `QUOTE_MINT` (Use WSOL by default)
6. `QUOTE_AMOUNT` (amount used to buy each new token)
7. `COMMITMENT_LEVEL` (No modification required)
8. `CHECK_IF_IS_BURNED` (liquidity burn check)
9. `CHECK_IF_IS_LOCKED` (liquidity lock check)
10. `USE_SNIPE_LIST` (buy only tokens listed in snipe-list.txt)
11. `SNIPE_LIST_REFRESH_INTERVAL` (how often snipe list should be refreshed in milliseconds)
12. `CHECK_IF_MINT_IS_RENOUNCED` (script will buy only if mint is renounced)
13. `MIN_POOL_SIZE` (script will buy only if pool size is greater than specified amount)
14. `TAKE_PROFIT=50` (in %)
15. `STOP_LOSS=30` (in %)
16. `BIRDEYE_API_KEY=` (TP/SL, Burn/Lock) You can use the default link in the .env file, it works fine and does not need to be changed. Go here if you want to generate it yourself : https://docs.birdeye.so/docs/authentication-api-keys
**Don't forget to check Birdeye API, if API key is not working, some bot functions such as TP/SL, Min/Max Liquidity etc may not work correctly or not work at all. If you follow the instructions there should be no errors.


## INSTALL (NEED NODE JS!!!!)
1. Install dependencies by typing: `npm install`
2. Run the script by typing: `node web\server.js` in terminal
3. Access the web interface by opening `http://localhost:3000` in your browser
## DISCLAIMER
> [!IMPORTANT]
> Use this script at your own risk.