Bot auto-serbu flash sale Shopee — multi-account, always-on monitor, keyword filter, SQLite DB, Docker support!
v4 New Features:
- 📂 Multi-Account — scan
accounts/directory, run all accounts in parallel - 📋 YAML Config —
config.yamlexternalizes all settings - 🔍 Keyword Filter — include/exclude keywords for item names
- 🗄️ SQLite Database — purchase history tracking with
shopee_sniper.db - 👁️ Monitor Mode (
--monitor) — always-on price checking, auto-buy on price drop - 📝 File-based Logging — rotating logs in
logs/sniper.log - 🐳 Docker Support — Dockerfile + docker-compose.yml
- 🔄 Proxy rotation, Telegram notifications, stats tracking (from v3)
git clone https://github.com/setan21/shopee-flash-sale-bot.git
cd shopee-flash-sale-bot
pip install -r requirements.txtCreate subdirectories in accounts/ — one per Shopee account:
accounts/
├── alice/
│ └── cookies.json
├── bob/
│ ├── cookies.json
│ └── config.yaml # (optional) per-account overrides
└── charlie/
└── cookies.json
Each cookies.json is exported via Cookie-Editor Chrome extension (Export → JSON).
Edit config.yaml to your liking. Key settings:
cookie_dir: "accounts"
default_max_price: 1000
scan_pages: 5
concurrent_requests: 5
# Keyword filter (empty = include all)
include_keywords: ["iphone", "airpods"]
exclude_keywords: ["case", "charger"]
# Monitor mode
monitor_interval: 60
monitor_price_drop_threshold: 0.9
# Telegram notifications
telegram_bot_token: ""
telegram_chat_id: ""Auto-scan + snipe with all accounts:
python3 flash_sale_v4.pyRun a single account:
python3 flash_sale_v4.py --account aliceMonitor mode (always-on price checking):
python3 flash_sale_v4.py --monitorManual mode (single product):
python3 flash_sale_v4.py "https://shopee.co.id/..." 1735683600 --cookie cookies.jsondocker-compose up -d| Setting | Default | Description |
|---|---|---|
cookie_dir |
accounts | Directory with account subfolders |
default_max_price |
1000 | Max item price (Rp) |
scan_pages |
5 | Flash sale pages to scan |
concurrent_requests |
5 | Parallel checkout requests |
request_delay |
0.02 | Delay between requests (seconds) |
subtract_seconds |
0.5 | Fire N seconds before official start |
max_retries |
10 | Max retry attempts |
payment_channel_id |
8001400 | ShopeePay default |
include_keywords |
[] | Required keywords (empty = all) |
exclude_keywords |
[] | Banned keywords (empty = none) |
proxy_file |
proxies.txt | Proxy list file |
proxy_protocol |
http | Proxy protocol (http/socks5) |
proxy_rotate |
true | Rotate proxies per request |
telegram_bot_token |
"" | Telegram bot token |
telegram_chat_id |
"" | Telegram chat ID |
database |
shopee_sniper.db | SQLite DB path |
monitor_interval |
60 | Monitor polling interval (seconds) |
monitor_price_drop_threshold |
0.9 | Price drop ratio to trigger buy |
log_dir |
logs | Log file directory |
log_level |
INFO | Log level (DEBUG/INFO/WARNING/ERROR) |
| Channel | ID |
|---|---|
| ShopeePay | 8001400 |
| COD | 89000 |
| Transfer Bank | 8005200 |
| BCA | 89052001 |
| Mandiri | 89052002 |
| BNI | 89052003 |
| BRI | 89052004 |
Purchase attempts are logged to shopee_sniper.db with:
- item_id, shop_id, model_id
- item_name, price
- account_name
- success/failure + error message
- latency (ms)
- timestamp (WIB)
- mode (auto/manual/monitor)
Check recent purchases:
sqlite3 shopee_sniper.db "SELECT * FROM purchases ORDER BY id DESC LIMIT 10;"- ⏱️ NTP sync = timing akurat ±5ms
- 🚀 Concurrent checkout = peluang lebih besar
- 🔄 Proxy rotation = hindari IP ban
- 📂 Multi-account = snipe dari banyak akun sekaligus
- 🍪 Cookie harus fresh (re-export kalau expired)
- 👁️ Monitor mode = auto-buy when price drops