Hi, I'm Tom Freeman ๐Ÿ––

As a software developer, I absolutely love diving into the world of technology and crafting innovative solutions that make life better. I'm super excited about the ever-changing tech scene and I'm at my best when I'm in a fast-paced environment that pushes me to explore new technologies. I can't wait to share my fresh ideas and learn from others, in this passionate community!

My automated betting bot

For this project, we had a pretty big task on our hands. Our client had a betting system that was a bit sluggish due to manual input, so we decided to automate it to make things smoother. On top of that, I designed a custom logging system. At first, I had it set up on my NAS in a Docker container, but I ran into a few hiccups with one of the tools I was using. Eventually, I managed to eliminate the need for end-to-end testing tools for scraping, which also meant we could ditch the Docker container.

๐Ÿ” How it works:

I scrape data from a tips website and then check it against the system, which consists of a set of rules we've created to decide if a bet is worth placing. If it meets the criteria, I open a WebSocket to Betfair and wait for the odds to fall within the 'system's' range. As soon as they do, it places a bet.

๐Ÿ–Œ๏ธ The User Interface:

The client, need visibility of the automated system. It needed to track the botโ€˜s progress. I created a website using svelte-kit and a react-native app. They provided graphs, trade history, and fun stats. I also created a developer page secured by password to manage app settings and git branch/tag updates.

๐Ÿ•ฐ๏ธ Whatโ€˜s next:

Taking this further, I plan to explore a more algorithmic approach aimed at generating profits by laying all trades within a market.

๐Ÿ”ง Skills and tools:

I've implemented advanced shell scripting tools like pm2, Docker, vi, CI scripts, and GitHub Actions to establish a robust CI/CD pipeline. The app now allows for seamless configuration management, and changes can be applied without any need to restart the bot. Ensuring the automated bot runs smoothly 24/7 without any crashes is of utmost importance, and I've set up notifications to keep me informed about any occurrences or issues promptly.

โœ‚๏ธ Twists:

Initially, I implemented the scraping of the tips website using Nightmarejs. However, I later rewrote the process using Cypress and jQuery due to the logging benefits it offered. To improve performance, I decided to parallelize the scraping service, but this required a Cypress Cloud subscription, which my client was not willing to pay for. As a result, I re-implemented it using asynchronous Cypress processes, which, unfortunately, led to login cookie conflicts. In my quest for a more efficient solution, I discovered that making fetch requests to obtain the raw HTML of the page and then parsing it with cheerio.js was a quicker and simpler approach.

blob1 blob2

My Projects