As a getting started howto, could you provide a call flow like on these 2 simple examples :
- Let’s say we want to select :
- only bettable tennis events
- retrieve the market type (ie money_line, one_x_two, correct_score, both_to_score, handicap etc)
- competitors (ie players for tennis, teams for soccer etc)
- the odd on back and lay
- the available liquidity of each of these positions
- information if the event won’t be live / will be live / is live (ie started)
- exchange type (ie “back-lay” or something else)
- odd type (ie decimal or something else)
For this example, what i meant as a call flow is about the order of subsequent calls you have to make to collect of this information. What could it be in this case?
We begin by get events then in the given result? what info is used to make the next call? If the next call is GET competitors then we need the event_ids which should be, for example “id”: “565413” delivered by calling Get Events, right?
i would represent this action by :
Call 1 : Get Events (“id” as one of the result) / Call 2 : Get ("event_ids which is the previous “id” as the parameter value) competitors.
This is an answer example to my question. What would be the complete same description for getting all the previous mentioned information all together?
This would answer, for example, this question : One of the information is about prices we can have with Get prices which is a call needing market_ids but where do we get this market_ids value? Would we describe this as :
Call 1 : Get events (“id”) / Call 2 : Get (“id”) markets (“id” this result call should represent the market id i think) / Call 3 : GET (market_ids which should be the “id” in call 2 result) prices.
Through these exmples, hoping you see the way i’m looking for to undersand the articulation logic to deal with Smarkets sport events data.
- Same call flow question about placing an order with an example for back or lay and how to retrieve the result of a place order ? I mean how to know if the submitted offer is not (yet) matched, or fully matched, or partially matched (but then how to retrieve all the different splitted stake / odd related to our submitted order?). I do see “orders_response” but i don’t see the split details about each odd/stake in there (ie you place a back with odd 1.35 and stake 15 and you get splitted result like : a match with odd 1.3 and stake 10 and a match with odd 1.25 and stake 5).
By the way is it possible splitted matched positions can not be in favor of the position. For example, the example above is not in favor of the betting person. This example would be : you place a back with odd 1.35 and stake 15 and you get splitted result like : a match with odd 1.35 and stake 10 and a match with odd 1.4 and stake 5.
As for question 1, what would be the call flow to place a position and retrieve these responses? (Call 1 : Post xxx (result x) / Call 2 : Get (parameter i) yyy ( result y ) / Call 3 : Get (parameter j) zzz (result z)
Could we have an option to directly retrieve values :
- as decimal for odds
- as euros for prices