Take odds of India 1.14 and Australia 5.60. Convert each to implied probability (1/odds) and you get 87.72% and 17.86%, which adds up to 105.58%. That extra 5.58% is the bookmaker's margin. I wanted to watch that number move live, so I wrote a small scraper for Parimatch. How it fits together: A Flask app runs a background Selenium thread per event. It pulls the odds and keeps the latest values in memory. A GET /odds?event=... endpoint returns those odds plus implied probabilities. If nobody is watching that event yet, it starts a new thread and tells you to retry in a few seconds. A Streamlit page polls the API and plots odds, probabilities and margin over time. A separate script checks whether 1/a + 1/b drops below 1. That condition is what defines an arbitrage window. The weak spots are real. The scraper just grabs the first market on the page, because I haven't added market selection. Error handling for site changes is thin. It only covers one bookmaker. The arbitrage check is also simplified. It compares a fixed initial bet against the current opposing odds, which is not proper simultaneous betting across bookmakers. Mostly the project taught me how odds encode the house edge. It's educational only, since betting carries real financial risk.   submitted by   /u/shravanrevanna [link]   [comments]