spopp23/Kickbase-Trading-Advisor

Tool for Kickbase to assist with trades, budget calculations, and market value predictions

★ 0Forks 0GitHub ↗Compare

README

KickAdvisor

Kickbase Trading Advisor: A helper for the fantasy football game Kickbase, designed to assist you in making the best trading decisions. The tool estimates other managers' budgets, predicts future player market values, and sends this information to you daily via email. More features and improvements are planned. This project uses the community Kickbase API by kevinskyba, big shoutout!

Features

  1. Manager Budget Calculation: Based on the activity log in each Kickbase league and the points-to-money reward for each matchday, the tool estimates each manager's current budget. Since there is no access to other players' login bonuses or achievements, your own are used for the estimation. While not perfect, this approach still provides a practical and reasonably accurate estimate.
  2. Market Value Prediction: Using selected features such as points, minutes played, current market value, recent value changes, and more, a machine learning model predicts market value changes for the following day. This is done for all players currently on the market as well as those in your squad.
  3. Email Notifier: The results from the previous features are sent to you via email daily around 23:00 (+-45 minutes), always after the market value updates around 22:00. You can also run this manually at any time without waiting for the scheduled execution.
  4. More Features in the Future: ...

How Can You Use It?

  1. Fork the Repository: Click the "Fork" button to create a copy of this repository in your account.
  2. Set Your Variables: In the file daily_predictions.py, set the following variables:
    • competition_ids: The league you are playing in (default: 1 = Bundesliga).
    • league_name: The exact name of your league (case-sensitive, include spaces, use UTF encoding for special symbols like emojis). If the name doesn't match any league in your account, the tool will default to your first league. If you belong to only one league, you can leave this empty.
    • start_budget: Your league's starting budget (default: 50,000,000), used to calculate managers' budgets.
    • league_start_date: Your league's starting date (default: 2025-08-08), used to calculate managers' budgets.
  3. Add Your Secrets: In your fork, add the following secrets:
    • KICK_USER: Your Kickbase Username (usually your email)
    • KICK_PASS: Your Kickbase Password (handled securely)
    • EMAIL_USER: Your Gmail Address (for sending and receiving emails)
    • EMAIL_PASS: Password for your Gmail account (usually an app password)
      • The email notifier currently only works with Gmail. If you use another email provider, you can leave EMAIL_USER and EMAIL_PASS empty; the results will still be displayed in the Actions log. See the section "Test Your Setup" below for more details.
      • An app password is a special password generated by your email provider for third-party apps. You usually need it if your email uses two-factor authentication. Check your email account settings under "Security" or "App Passwords" to see if you need one. Here is how Google handles this.
  4. Test Your Setup: Go to the "Actions" tab in your fork. Click "Run Daily Predictions" and then "Run Workflow." It should take at most about 2 minutes. If everything works, the workflow will show a green check mark. You can then click on the workflow, select "run-daily-predictions," and click "Run daily_predictions.py." There, you should see the results and, if email is set up, you may also receive an email with the results. If the workflow shows a red cross, something went wrong. To check this, follow the same steps to view the results; you should find an error message indicating what went wrong. Most of the time, this is caused by wrong or missing variables and/or secrets. Once everything works, the tool will run automatically every day between approximately 22:30 and 23:30. The scheduled time can also be changed in the actions.yml file.
Other Use Case Options: The tool can be used without the email notifier. Just leave out the secrets, and the results will still be displayed in the GitHub Action execution log. As described in the fourth step "Test Your Setup," you can also always execute the workflow manually and are not bound to the scheduled time. The tool can also be used locally without GitHub Actions: for this, you need to have Python installed along with the packages listed in requirements.txt. Create a .env file in the root folder with the same credentials you used in your secrets. You can then execute the main file daily_predictions.py. If you have any further questions or encounter issues, please use the "Issues" tab at the top of the repository or contact me via the email listed on my GitHub profile.

Future Work & Ideas

  • Three-day and one-week market predictions
  • Overpay calculator, based on budget and more
  • Improve the notifier; using email is not optimal

Contributors

LennardFeLeonLicher

Issues