Two prices appear next to the same team. One is 1.91 and the other is 2.02. Can we compare them?
Only after we establish what each price represents.
A full-match selection and a first-half selection can share a team name. Two handicap selections can refer to the same team with different lines. A familiar label is a useful clue, but it is not a comparison rule.
In this tutorial, we build a small comparison gate in Python. It accepts a deliberately narrow set of selections and rejects anything outside that contract.
All examples are synthetic. The script runs locally and makes no API requests.
Separate event matching from selection matching
Our application needs to answer two questions:
Do these source events refer to the same real-world fixture?
Do these selections represent equivalent bets within that fixture?
A market parser cannot answer the first question.
Instead, our comparison function receives an application-owned fixture ID after event matching has already happened.…