A C# proof-of-concept for automating login and betting on kicktipp.de, inspired by the Python project schwalle/kicktipp-betbot and its fork ehonda/kicktipp-cli.
✅ Completed:
- Environment-based credentials: Load username/password from
.envfile - Secure login automation: Uses HttpClient and AngleSharp for form parsing and submission
- Cookie management: Extracts and saves login tokens for future use
- Open predictions fetching: Retrieves available matches for betting
- Random bet placement: Automatically places random bets on open predictions
- Safety features: Dry-run mode and existing bet detection
- Hard-coded community: Currently targets "ehonda-test" community
- HttpClient + AngleSharp: Modern C# web automation stack
- Environment variables: Secure credential storage via
.envfile - HTTPS support: All communication uses secure connections
- Form parsing: Robust HTML form handling for login and betting
- Error handling: Comprehensive exception handling and status reporting
For security, credentials are stored outside the repository to prevent AI agents with solution directory read access from accidentally leaking credentials to remote sources:
- Create secrets directory: A
KicktippAi.Secretsdirectory should exist as a sibling to the solution directory - Setup credentials: Copy
.env.exampleto the secrets directory atKicktippAi.Secrets/dev/Poc/.env - Add your credentials: Edit the
.envfile with your actual kicktipp.de credentials
# Directory structure:
├── KicktippAi/ # This repository
│ ├── dev/Poc/.env.example # Template file
│ └── ...
└── KicktippAi.Secrets/ # Secrets directory (outside repo)
└── dev/Poc/.env # Your actual credentials
- Navigate to project:
cd dev/Poc - Run the application:
dotnet run - Interactive betting: The app will show a dry-run first, then ask for confirmation
Kicktipp.de Automation POC
==========================
✓ Login successful!
✓ Login token extracted and saved to .env file
✓ Found 4 open matches:
04.07.2025 21:00 'Fluminense' vs. 'Al-Hilal'
05.07.2025 03:00 'Palmeiras' vs. 'FC Chelsea'
05.07.2025 18:00 'Paris St. Germain' vs. 'FC Bayern München'
05.07.2025 22:00 'Real Madrid' vs. 'Borussia Dortmund'
=== DRY RUN ===
05.07.2025 03:00 'Palmeiras' vs. 'FC Chelsea' - betting 3:0
05.07.2025 18:00 'Paris St. Germain' vs. 'FC Bayern München' - betting 0:0
05.07.2025 22:00 'Real Madrid' vs. 'Borussia Dortmund' - betting 1:2
Summary: 3 bets to place, 0 skipped
Do you want to place these bets for real? (y/N): y
=== PLACING REAL BETS ===
✓ Successfully submitted 3 bets!
The SimplePredictor class generates random but realistic football scores:
- Common scores like 1:0, 2:1, 1:1, 3:1, etc.
- Based on the Python reference implementation patterns
- Automatically finds betting input fields ending with
_heimTippand_gastTipp - Handles hidden form fields and submit buttons correctly
- Follows the same patterns as the Python kicktipp-cli
- Dry run mode: Shows what would be bet without actually submitting
- Existing bet detection: Skips matches where bets are already placed
- Override option: Can override existing bets if needed (implemented but not exposed in UI)
- Interactive confirmation: User must explicitly confirm bet placement
- .NET 9.0: Modern C# runtime
- AngleSharp: HTML parsing and DOM manipulation
- DotNetEnv: Environment variable loading from
.envfiles
dev/Poc/
├── Program.cs # Main application entry point
├── Services/
│ └── KicktippService.cs # Core web automation logic
├── Models/
│ └── KicktippModels.cs # Data models and predictor logic
└── .env.example # Environment template (instructions only)
KicktippAi.Secrets/ # External secrets directory
└── dev/Poc/
├── .env.example # Copy of environment template
└── .env # Your actual credentials (gitignored)
Potential next steps:
- Multi-community support (beyond hardcoded "ehonda-test")
- More sophisticated prediction algorithms
- Command-line arguments for configuration
- Scheduling and automation features
- Better error handling and retry logic
This project is inspired by and follows the patterns established in schwalle/kicktipp-betbot, the original Python implementation for kicktipp.de automation. We specifically used the ehonda/kicktipp-cli fork (dev branch) as a reference for translating the Python implementation concepts to modern C#.