Jump to content

Get BetID from json response


ulululu

Featured Comment

  • Moderator
Posted

You can open your JSON file on this site if I am not mistaken, but you will not be able to post this bet ID in Stake chat because it is not possible to post archived bets.

Also you can check out this thread
 

Posted
13 minutes ago, Faris said:

You can open your JSON file on this site if I am not mistaken, but you will not be able to post this bet ID in Stake chat because it is not possible to post archived bets.

Also you can check out this thread
 

Thanks for the quick answer, i am talking about the response you get from playing a game though. Like e.g. doing 1 roll in plinko. It seems like the Casino BetID gets generated afterwards. Would be nice if someone could prove me wrong.

Posted
10 minutes ago, ulululu said:

Thanks for the quick answer, i am talking about the response you get from playing a game though. Like e.g. doing 1 roll in plinko. It seems like the Casino BetID gets generated afterwards. Would be nice if someone could prove me wrong.

I think the question is whether or not the hexadecimal bet id (ex: id: "49c73e30-408c-4dd3-91a8-c96172dd7d73")  is another way to express the casino:12,345,678  format we use.  I've been wondering the same thing.

I suspect it is, but I'm not sure how it's converted.

Maybe @Dan or @Tristan  can help?

  • Moderator
Posted
13 minutes ago, ulululu said:

Thanks for the quick answer, i am talking about the response you get from playing a game though. Like e.g. doing 1 roll in plinko. It seems like the Casino BetID gets generated afterwards. Would be nice if someone could prove me wrong.

You can see your latest Bet IDs here ⬇️

image.thumb.png.1784d7640a9fc22fe77fb4977f5cf475.png


And you can check the list of the last 500 bets by going to Account > Transactions > Bets.


image.thumb.png.d4fb2bc97c9f28b2b4b29876bbbbabbc.png

3 minutes ago, dupeddonk said:

I think the question is whether or not the hexadecimal bet id (ex: id: "49c73e30-408c-4dd3-91a8-c96172dd7d73")  is another way to express the casino:12,345,678  format we use.

I suspect it is, but I'm not sure how it's converted.

Oh, this can be checked with the /bet command

image.png.d5c467ed9fe55868a8e099e9c0638682.png

 

image.thumb.png.4900ff7ce80007685fd16400756e4b38.png

Posted
Just now, Faris said:

@dupeddonk Isn't this the right way?


image.png.e771986667c204c3f20d7596dfccb5f8.png

Yes, which make me think that string can be converted to the bet ID number with a simple function.

I assume he's asking because he wants to be able to extract the bet id automatically from the response object that's returned for each bet.

Posted
10 minutes ago, dupeddonk said:

Yes, which make me think that string can be converted to the bet ID number with a simple function.

I assume he's asking because he wants to be able to extract the bet id automatically from the response object that's returned for each bet.

Exactly, thanks for both of your answers.

3 hours ago, Faris said:

@dupeddonk Isn't this the right way?


image.png.e771986667c204c3f20d7596dfccb5f8.png

I have successfully implemented this into my program. Apparently this does not work in the beta chat though?

  • Moderator
Posted
2 hours ago, ulululu said:

Exactly, thanks for both of your answers.

I have successfully implemented this into my program. Apparently this does not work in the beta chat though?

Unfortunately, this does not work in the beta version right now.

  • Moderator
Posted

i dont know if this was fixed or not, but it was a bug that existed some time ago.

if you make a looot of bets in a single day, the archive for that day looks the same as the others and has a .json extension too, but when you try to open it looks like its corrupted.

This happens because it has the wrong extension, it is a compressed archive, by changing the extension to .zip or .arj, I dont remember the correct extension, and decompressing it  you get the correct .json.

 

Posted
1 hour ago, xrflive said:

It is possible to get the bet id from a json call. You need to call the "BetLookup" method by passing the iiid of the bet.

Do you have an example request string by any chance ? 

Posted
34 minutes ago, ulululu said:

Do you have an example request string by any chance ? 

 

This is the request payload to get information on a bet:

Quote

{
   "operationName":"BetLookup",
   "variables":{
      "iid":"house:57363259999"
   },
   "query":"query BetLookup($iid: String, $betId: String) { bet(iid: $iid, betId: $betId) { ...BetFragment __typename }}fragment BetFragment on Bet { id iid type scope game { name icon __typename } bet { ... on CasinoBet { ...CasinoBetFragment __typename } ... on MultiplayerCrashBet { ...MultiplayerCrashBet __typename } ... on MultiplayerSlideBet { ...MultiplayerSlideBet __typename } ... on SoftswissBet { ...SoftswissBet __typename } ... on SportBet { ...SportBet __typename } ... on EvolutionBet { ...EvolutionBet __typename } ... on PlayerPropBet { ...PlayerPropBetFragment __typename } ... on ThirdPartyBet { ...ThirdPartyBet __typename } __typename } __typename}fragment CasinoBetFragment on CasinoBet { id active payoutMultiplier amountMultiplier amount payout updatedAt currency game user { id name __typename } __typename}fragment MultiplayerCrashBet on MultiplayerCrashBet { id user { id name __typename } payoutMultiplier gameId amount payout currency result updatedAt cashoutAt btcAmount: amount(currency: btc) __typename}fragment MultiplayerSlideBet on MultiplayerSlideBet { id user { id name __typename } payoutMultiplier gameId amount payout currency slideResult: result updatedAt cashoutAt btcAmount: amount(currency: btc) active createdAt __typename}fragment SoftswissBet on SoftswissBet { id amount currency updatedAt payout payoutMultiplier user { id name __typename } softswissGame: game { id name edge extId provider { id name __typename } __typename } __typename}fragment SportBet on SportBet { id amount active currency status payoutMultiplier potentialMultiplier cashoutMultiplier payout createdAt user { id name __typename } outcomes { odds status outcome { id name active odds __typename } market { ...MarketFragment fixture { id tournament { id category { id sport { id slug __typename } __typename } __typename } __typename } __typename } fixture { ...FixturePreviewFragment __typename } __typename } adjustments { id payoutMultiplier updatedAt createdAt __typename } __typename}fragment MarketFragment on SportMarket { id name status extId specifiers outcomes { id active name odds __typename } __typename}fragment FixturePreviewFragment on SportFixture { id extId status slug marketCount(status: [active, suspended]) data { ...FixtureDataMatchFragment ...FixtureDataOutrightFragment __typename } eventStatus { ...FixtureEventStatus __typename } tournament { ...TournamentTreeFragment __typename } ...LiveStreamExistsFragment __typename}fragment FixtureDataMatchFragment on SportFixtureDataMatch { startTime competitors { ...CompetitorFragment __typename } __typename}fragment CompetitorFragment on SportFixtureCompetitor { name extId countryCode abbreviation __typename}fragment FixtureDataOutrightFragment on SportFixtureDataOutright { name startTime endTime __typename}fragment FixtureEventStatus on SportFixtureEventStatus { homeScore awayScore matchStatus clock { matchTime remainingTime __typename } periodScores { homeScore awayScore matchStatus __typename } currentServer { extId __typename } homeGameScore awayGameScore statistic { yellowCards { away home __typename } redCards { away home __typename } corners { home away __typename } __typename } __typename}fragment TournamentTreeFragment on SportTournament { id name slug category { id name slug sport { id name slug __typename } __typename } __typename}fragment LiveStreamExistsFragment on SportFixture { abiosStream { exists __typename } betradarStream { exists __typename } diceStream { exists __typename } __typename}fragment EvolutionBet on EvolutionBet { id amount currency createdAt payout payoutMultiplier user { id name __typename } evolutionGame: game { id name edge __typename } __typename}fragment PlayerPropBetFragment on PlayerPropBet { active amount cashoutMultiplier createdAt currency id odds payout payoutMultiplier updatedAt status user { id name __typename } playerProps { id lineType odds playerProp { ...PlayerPropLineFragment __typename } __typename } __typename}fragment PlayerPropLineFragment on PlayerPropLine { id line over under suspended balanced name player { id name __typename } market { id stat { name value __typename } game { id fixture { id name data { ... on SportFixtureDataMatch { competitors { ...CompetitorFragment __typename } __typename } __typename } tournament { id category { id sport { id name slug __typename } __typename } __typename } __typename } __typename } __typename } __typename}fragment ThirdPartyBet on ThirdPartyBet { id amount currency updatedAt payout payoutMultiplier user { id name __typename } thirdPartyGame: game { id name edge extId provider { id name __typename } __typename } __typename}"
}

 

Posted
5 hours ago, bato93 said:

 

This is the request payload to get information on a bet:

 

Ah wait a second, you need the iid which you don't get from the bet response^^ you only get the id which you can put in the stake chat

Posted
11 hours ago, ulululu said:

Ah wait a second, you need the iid which you don't get from the bet response^^ you only get the id which you can put in the stake chat

 

Take a closer look at the query it offers two possible parameters iid and betId, the second is what you are looking for you just need to set a different variable.

 

The response gives you the detailed bet information then including the iid:

Quote

{
  "data": {
    "bet": {
      "id": "13db6e58-325b-4c00-9858-c809aeXXXXXX",
      "iid": "house:574408XXXXX",
      "type": "casino",
      "scope": "house",
      "game": {
        "name": "limbo",
        "icon": "stake-game-limbo",
        "__typename": "GameKuratorGame"
      },
      "bet": {
        "id": "13db6e58-325b-4c00-9858-c809aeXXXXX",
        "active": false,
        "payoutMultiplier": 1.0001,
        "amountMultiplier": 1,
        "amount": 0,
        "payout": 0,
        "updatedAt": "Wed, 29 Sep 2021 17:41:18 GMT",
        "currency": "btc",
        "game": "limbo",
        "user": {
          "id": "28b445d0-b52c-427a-b455-8f12XXXXX",
          "name": "XXXXX",
          "__typename": "User"
        },
        "__typename": "CasinoBet"
      },
      "__typename": "Bet"
    }
  }
}

 

Posted
8 hours ago, bato93 said:

 

Take a closer look at the query it offers two possible parameters iid and betId, the second is what you are looking for you just need to set a different variable.

 

The response gives you the detailed bet information then including the iid:

 

Ah i see i only saw that you used the iid as variable, gonna check it out then, thanks !

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

Privacy Policy Terms of Use