A sophisticated TypeScript-based trading bot that automatically places bets on BNB-USD price predictions across PancakeSwap and CandleGenie platforms. The bot uses intelligent strategies to maximize winning probability by analyzing market sentiment and betting patterns.
- Dual Platform Support: Works with both PancakeSwap Prediction V2 and CandleGenie Prediction V3
- Smart Betting Strategies:
- Against Strategy: Bets against the majority when odds are favorable
- With Strategy: Bets with the majority when conditions are optimal
- Automatic Claiming: Automatically claims winnings and handles refunds
- Dynamic Timing: Adjusts betting timing based on network conditions
- Real-time Monitoring: Live console output with colored status updates
- Error Handling: Robust error handling with automatic retry mechanisms
- Node.js (v14 or higher)
- npm or yarn package manager
- BSC (Binance Smart Chain) wallet with BNB for betting
- Private key for your wallet
-
Clone the repository
git clone https://github.com/mooncitydev/crypto-prediction-bot.git cd PredictionBot-main
-
Install dependencies
npm install # or yarn install
-
Set up environment variables Create a
.env
file in the root directory:PRIVATE_KEY=your_wallet_private_key_here BET_AMOUNT=0.1
Variable | Description | Default | Required |
---|---|---|---|
PRIVATE_KEY |
Your wallet's private key | - | β Yes |
BET_AMOUNT |
Amount of BNB to bet per round | 0.1 | β No |
- PancakeSwap Prediction V2:
0x18B2A687610328590Bc8F2e5fEdDe3b582A49cdA
- CandleGenie Prediction V3:
0x995294CdBfBf7784060BD3Bec05CE38a5F94A0C5
Against Strategy (Default)
npm run start
With Strategy
npm run start -- --with
Against Strategy (Default)
npm run cg
With Strategy
npm run cg -- --with
-
Against Strategy:
- Analyzes bull vs bear betting amounts
- Places bets against the majority when the ratio is favorable (< 5:1)
- Exploits market inefficiencies and herd behavior
-
With Strategy:
- Bets with the majority when conditions suggest momentum
- Uses similar ratio analysis but follows the crowd
- Waits ~281.5 seconds after round start before placing bets
- Dynamically adjusts timing based on network congestion
- Reduces wait time by 6 seconds (2 blocks) if transactions fail
- Claiming: Automatically claims winnings from previous rounds
- Refunds: Handles refunds for invalid rounds
- Dues: Sends 2% of winnings to specified address (
0x74b8B9b7aa13D26056F4eceBDF06C917d15974C7
)
src/
βββ index.ts # PancakeSwap bot main file
βββ candle-genie.ts # CandleGenie bot main file
βββ lib.ts # Shared utilities and strategies
βββ types/
βββ typechain/ # Generated contract type definitions
βββ CandleGeniePredictionV3.d.ts
βββ PancakePredictionV2.d.ts
βββ factories/
npm test
The project uses TypeScript with the following configuration:
- Target: ES5
- Module: CommonJS
- Strict mode enabled
- This bot involves financial risk. Only use funds you can afford to lose
- Past performance does not guarantee future results
- Cryptocurrency trading is highly volatile and unpredictable
- The bot's strategies are based on historical patterns and may not work in all market conditions
- Never share your private key
- Use a dedicated wallet for bot trading
- Monitor your bot's performance regularly
- Keep your private key secure and never commit it to version control
- The bot uses BSC mainnet by default
- Ensure you have sufficient BNB for gas fees
- Network congestion may affect transaction timing
- Start Small: Begin with small bet amounts to test the bot
- Monitor Closely: Watch the bot's performance for the first few rounds
- Network Conditions: Consider network congestion when setting bet amounts
- Strategy Selection: Test both "against" and "with" strategies to see what works best
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Egor Gavrilov - Initial work
If you encounter any issues or have questions:
- Check the console output for error messages
- Verify your private key and BNB balance
- Ensure your network connection is stable
- Review the contract addresses are correct
Need Help? Contact the developer:
- Telegram: @moooncity
Remember: Trading cryptocurrencies involves substantial risk of loss and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade cryptocurrency, you should carefully consider your investment objectives, level of experience, and risk appetite.