minus5 / go-uof-sdk

Betradar Unified Odds Feed SDK for the Go programming language.
MIT License
17 stars 17 forks source link

How to deal with variant markets and outrights? #17

Open namreg opened 3 years ago

namreg commented 3 years ago

According to the code, these features are not supported. Is it true?

ianic commented 3 years ago

Variant markets are treated as ...a variant of market. Non variant markets have just MarketID, and 0 for VariantID. Variant markets has non-zero VariantID. They are working just fine.

Can you please explain the outrights needs a little bit.

namreg commented 3 years ago

Variant markets are treated as ...a variant of market. Non variant markets have just MarketID, and 0 for VariantID. Variant markets has non-zero VariantID. They are working just fine.

Under variant markets I mean markets that have variant specifier. According to the Betradar docs, to get market name and it's outcomes we should make additional request.

CleanShot 2020-12-30 at 13 12 45@2x

Can you please explain the outrights needs a little bit.

Betradar can provide odds for such events as outrights (stage, simple_tournament, season). To fetch fixtures for these entities we need to call another http route. Currently sdk expects that fixture will always be match.

ianic commented 3 years ago

Each received odds change message is analyzed and additional api request is made for any variant market found.

ianic commented 3 years ago

Similar each fixture change message can trigger api request for that fixture. Api request is going to: api.betradar.com/v1/sports/{{.Lang}}/sport_events/{{.EventURN}}/fixture.xml. It could be that in response from that url is enough information to handle outrights also. Please check, I don't remember any more.