In-play odds
In-play (live) odds are prices offered after an event has started, and they move with every goal or point.
A goal, a break of serve or a red card changes a market's prices at once, and bookmakers suspend markets around such moments before reopening them at new prices. Some also hold an in-play bet for a delay before accepting it, so the price on screen and the price taken can differ.
That makes in-play a separate engineering problem. A product needs each market's open or suspended state as well as its prices, and it needs both current, since an in-play price can be gone before the user acts. Settlement differs as well, because markets such as next goal or next point exist only once play has started.
Pre-match is where standard matched betting sits. The back bet and the lay normally both go on before the off, and the lay side's price and depth can be read from lay[].price and lay[].available before either bet is placed. A lay left unmatched at the off leaves the back bet uncovered once play starts, which is the exposure matched betting sets out to avoid.
The match itself still decides some pre-match bets. A 2Up offer pays out on what happens during play, yet both of its bets normally go on before kick-off at pre-match prices.
In the OddsRelay feed
Your product polls OddsRelay's feed, and there is no push connection to subscribe to. Every event carries commence_, its scheduled start. Where the fixture is paired with an exchange, that is the exchange's kick-off time, otherwise the earliest start the bookmakers give. An event is in play when its venues show it in play, not by its commence_, and it keeps its id across kick-off. The feed carries no scores, match clock or results, and horse racing is never in play.
In-play prices come on request. inPlay= on GET / or GET / adds the events in play to the pre-match ones, and inPlay= there or on the standard and dutching feeds returns them alone, with in_ on every event in the reply. Left at its default, exclude, a request leaves the events in play out. The 2up, each-way, extra-place and bog feeds are always pre-match, and inPlay sent to one of them is refused with 400 bad_.
A tool that must show only pre-match prices can keep the default, inPlay=, which leaves out every event its venues show in play. As a second check it can send commenceTimeFrom set to the current time, which keeps events kicking off at or after that moment, or compare each event's commence_ with meta.processed_. GET /v2/events also labels every fixture upcoming or started.
Try it on your own key
Every plan in the UK & Ireland includes every feed. Sign up free and call any of them.