This code is written as proof of concept to demonstrate how we can buy new tokens immediately after the liquidity pool is open for trading.
Script listens to new Raydium USDC or SOL pools and buys tokens for a fixed amount in USDC/SOL. Depending on the speed of the RPC node, the purchase usually happens before the token is available on Raydium UI for swapping.
This is provided as is, for learning purposes.
💾 Clone this repository
git clone https://github.com/solana-dev-bot/SolanaPythonBot
cd SolanaPythonBot/💻 Install dependences
pip3 install -r requirements.txtprivate_key private key
is_buy Whether to buy automatically (buy automatically (1) or not (0))
is_sell Whether to sell automatically (sell automatically (1) or not (0))
pool_size Buy when the capital pool is larger than
sol_amount Buying amount (in solana)
wait_seconds How long to sell after (in ms)
main_url RPC URL / I used helius for development
wss_url RPC wss URL / I used helius for development
python main.pyYour private keys are stored in config.ini.
There are no additional fees when performing swaps via the CLI; the costs should be the same as using the Jupiter UI.
If you close the CLI, the sniper bot will stop running.
You can only swap tokens that are listed on Jupiter based on their criterias.
- Add Alt RPC (backup)
- Add JUPITER, ORCA, METEORA, FLUXBEAN liquidity pool
- Add rug check, burn and lock check
- Add profit/stop loss function
- Add ONE_TOKEN_AT_A_TIME
