https://github.com/yyq1025/python-sniper-bot
Free lightweight (~300 lines of code) and easy to use liquidity sniper bot based on Blocknative SDK.
https://github.com/yyq1025/python-sniper-bot
Last synced: about 2 months ago
JSON representation
Free lightweight (~300 lines of code) and easy to use liquidity sniper bot based on Blocknative SDK.
- Host: GitHub
- URL: https://github.com/yyq1025/python-sniper-bot
- Owner: yyq1025
- License: mit
- Created: 2022-06-03T05:39:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-22T23:34:02.000Z (about 3 years ago)
- Last Synced: 2025-04-15T16:29:43.486Z (6 months ago)
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Sniper Bot
Free lightweight (~300 lines of code) and easy to use liquidity sniper bot based on Web3.py and Blocknative SDK.
Enable you to buy newly listed tokens on DEX in the first place.
## Current Status
Network | Router | Status |
------- | ------ | ------ |
BSC | [PancakeSwap](https://pancakeswap.finance/) | ✅ |
BSC | [Biswap](https://biswap.org/) | ✅ |
BSC | [ApeSwap](https://apeswap.finance/) | ✅ |
Ethereum | [Uniswap](https://app.uniswap.org/) | ⚠️ |
Ethereum | [SushiSwap](https://app.sushi.com/) | ⚠️ |
Polygon | [QuickSwap](https://quickswap.exchange/) | ⚠️ |
Fantom | [SpookySwap](https://spooky.fi/) | ⚠️ |## Get Started
1. Install [Python3](https://www.python.org/downloads/)
2. Register an account at [Blocknative](https://www.blocknative.com/)
3. Login and check your [Blocknative API key](https://explorer.blocknative.com/account)
4. Follow the corresponding instructions below to get your wallet private key
- [MetaMask](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-export-an-account-s-private-key)
5. Download and unzip this repository
6. Open [config.py](config.py) and change [line 30](config.py#L30) to
```
TO_TOKEN = "0x55d398326f99059fF775485246999027B3197955"
```
7. In terminal, enter following commands to create and enter virtual envrionment
```
python3 -m venv env
```
Linux or macOS
```
source env/bin/activate
```
Windows
```
env\Scripts\activate.bat
```
8. Install dependencies in virtual environment
```
pip install -r requirements.txt
```
9. Set environment varibale in virtual environment
Linux or macOS
```
export BLOCKNATIVE_KEY=
export PRIVATE_KEY=
```
Windows
```
set BLOCKNATIVE_KEY=
set PRIVATE_KEY=
```
10. In terminal, enter the following command
```
python3 main.py
```
11. Now, when someone add liquidity with USDT on BSC, you will spend 0.001 BNB to buy USDT with path \[BNB, USDT paired token, USDT\]