jonrhythmic Posted June 12, 2022 #1 Posted June 12, 2022 I'm trying to make a Sportsbetting bot, and want to find all Asian Total markets available in the Starting soon section, but I'm unable to find where these bets are located in the Stake API. This gives me the odds for 1x2 markets: data.slugSport.fixtureList[match].groups[0].templates[0].markets[0].outcomes[index].odds, but what do I have to call to find the Asian Total market? Appologies if this seems hackish, but I'm new to GraphQL, and currently just output the result in a console.log. From researching the outcome in the Network tab it seems to be found here: data.data.sportMarket.outcomes, but it gives me an error of undefined when I call it. Thanks in advance for any help!
Big Dallas Posted June 14, 2022 #2 Posted June 14, 2022 Haha, I can't help here, but it will be interesting to see how your bot work after you are done. Do you use other API's except from the one from stake?
jonrhythmic Posted June 14, 2022 Author #3 Posted June 14, 2022 No, as of right now I'm only using Stakes API. Almost done with the first iteration, just need to figure out how to fetch all matches and how to mutate the values into the correct form to send back to the API as a bet. I'll probably post the result on this forum once it's done to harvest some affiliates 😜
Big Dallas Posted June 15, 2022 #4 Posted June 15, 2022 18 hours ago, jonrhythmic said: No, as of right now I'm only using Stakes API. Almost done with the first iteration, just need to figure out how to fetch all matches and how to mutate the values into the correct form to send back to the API as a bet. I'll probably post the result on this forum once it's done to harvest some affiliates 😜 If that works well I will like to be part of those. I need to learn how to use that to automate my betting activity.
Coll1d33 Posted June 15, 2022 #5 Posted June 15, 2022 Have you tried changing the array value in market[] to something like markets[1], markets[2]. I believe that is the array list for the available markets
ulululu Posted June 15, 2022 #6 Posted June 15, 2022 Bot talk is not allowed on the forum anymore sadly
jonrhythmic Posted June 15, 2022 Author #7 Posted June 15, 2022 5 hours ago, Coll1d33 said: Have you tried changing the array value in market[] to something like markets[1], markets[2]. I believe that is the array list for the available markets I found out I called the wrong endpoint, so I'm closer to figuring it out by now. Also found out that GraphQL has something called pagination, so think I'll figure it out eventually. 5 hours ago, ulululu said: Bot talk is not allowed on the forum anymore sadly Where did you read that? I haven't seen anything that states anything like that, only that they offer any public info about their API, so I guess I have to ask support so I don't get banned.
ulululu Posted June 15, 2022 #8 Posted June 15, 2022 15 minutes ago, jonrhythmic said: I found out I called the wrong endpoint, so I'm closer to figuring it out by now. Also found out that GraphQL has something called pagination, so think I'll figure it out eventually. Where did you read that? I haven't seen anything that states anything like that, only that they offer any public info about their API, so I guess I have to ask support so I don't get banned. I guess it's not official anywhere anymore they deleted all the posts regarding bots and said we should no longer post about it. Was like half a year ago.
jonrhythmic Posted June 15, 2022 Author #9 Posted June 15, 2022 I asked support if it was allowed to ask question about making a bot, and they said it's no problem I'm struggeling to understand how the pagination works in GraphQL. I have the following code from the Network-tab: \"variables\":{\"type\":\"upcoming\",\"limit\":10,\"offset\":10,\"groups\":\"Total\",\"sport\":\"soccer\"}}", Which is what stake calls after, what I assume, is another call to the endpoint to return the next 10 vallues, so if I want to do the same in Node.js using fetch to get all the matches, what do I add as offset? 0 gives the first 10, 10 gives the following ten from 11-20, but I can't see how to get all matches? Do I have to call the function over and over?
Featured Comment
Archived
This topic is now archived and is closed to further replies.