Event State

Hi there,

I am relatively new to your API so please forgive me if a similar question has already been asked! First off, I must say that the API is amazing & I am amazed that Smarkets provide live event scores (from what I’ve seen) which is a real benefit & something other exchanges don’t provide so thank you for that!

On to my question, I am attempting to get additional information about certain events so I use the v3/events/{event_ids}/states. I’ve run this against a few football events and have found the info & provider_metadata props quite useful in terms of grabbing the competition name. I’ve noticed that under info there can/is a prop called gsm_competition_id. If the name of the competition is not available (usually under provider_metadata), is there still a way I can grab the competition name using this ID? Also, is it possible to know the minimum that would be present in these objects info & provider_metadata?

One last thing, within this call to get event states, would it be in scope to add the country code of where the event is taking place? Again, I am new to this API so sorry if this already exists & I’ve just not found it yet :slight_smile:

Thank you,

Hey Will

Thanks for the kind words - we are constantly working on improving our API and any feedback is more than welcome!

You have spotted two things in our API which I am not very happy about: the info.gsm_competition_id field and the provider_metadata field. We put these fields in there because there was no way for our customers to identify to which competition/league the event related but as you mention it’s inconsistent: these fields are only present for some events.

The good news is that we are working on a replacement for this which will be consistent across all of our events. I expect it will work in the following way (this may be a subject of change): /v3/events/{event_ids}/ will have a competition_id field which will uniquely identify the competition/tournament the event belongs to. You will then (presumably) be able to fetch details on the competition/tournament using another endpoint such as /v3/competitions/{competition_ids}/. I can’t promise when this will be live but I’m hoping in the next couple of weeks, until then I think you have to make do with the gsm_competition_id/provider_metadata fields even though they are incomplete and not well documented.

We do not expose this data as of currently. Would you mind sharing why you are interested in knowing this? I’d be happy to evaluate adding to the API but obviously we want to have a fairly good reason to do so.

Hey there,

Thanks for the reply to this! Yes I can see how competition_id field as well as a separate endpoint would be beneficial. Much like the endpoint to get the competitors in an event which is also hugely helpful for what I am trying to achieve so thank you for that as well :slight_smile: The country code would be beneficial to me personally as I am trying to match/group events by country. I also use this for data analysis reasons to see how prices vary on markets in separate countries.


Hey again!

That’s good to hear! Your use case is in line with what I had expected. I believe the /v3/competitions/{competition_id}/ endpoint that I had previously mentioned would help you here because that would also expose information about the country that the competition relates to?


Hey Hrafn,

Sorry for the late reply! Yes, I believe this information could also be incorporated into that endpoint. Is it possible to subscribe to updates of this (if an ongoing feature request) via email? I would like to keep in the loop.