-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautomation in bettin.txt
More file actions
65 lines (59 loc) · 2.88 KB
/
automation in bettin.txt
File metadata and controls
65 lines (59 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const axios = require("axios");
const cookie = `your_cookie`;
async function sendRequest(amount) {
const response = await axios({
method: 'post',
url: "https://stake.com/_api/graphql",
headers: {
"accept": "*/*",
"accept-language": "en-GB,en;q=0.9",
"content-type": "application/json",
"cookie": cookie,
"origin": "https://stake.com",
"priority": "u=1, i",
"referer": "https://stake.com/casino/games/dice",
"sec-ch-ua": `"Not/A)Brand";v="8", "Chromium";v="126", "Brave";v="126"`,
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-model": "",
"sec-ch-ua-platform": "macOS",
"sec-ch-ua-platform-version": "12.6.2",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"sec-gpc": "1",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
"x-access-token": "b6b7f4eff2942bf84c9f910d3070fd935ed16b15ba78fd44a0041312d5090e4d7fe66ce1e8c29b592516fb5c9c765c42",
"x-lockdown-token": "s5MNWtjTM5TvCMkAzxov"
},
data: `{"query":"mutation DiceRoll($amount: Float!, $target: Float!, $condition: CasinoGameDiceConditionEnum!, $currency: CurrencyEnum!, $identifier: String!) {\\n diceRoll(\\n amount: $amount\\n target: $target\\n condition: $condition\\n currency: $currency\\n identifier: $identifier\\n ) {\\n ...CasinoBet\\n state {\\n ...CasinoGameDice\\n }\\n }\\n}\\n\\nfragment CasinoBet on CasinoBet {\\n id\\n active\\n payoutMultiplier\\n amountMultiplier\\n amount\\n payout\\n updatedAt\\n currency\\n game\\n user {\\n id\\n name\\n }\\n}\\n\\nfragment CasinoGameDice on CasinoGameDice {\\n result\\n target\\n condition\\n}\\n","variables":{"target":50.5,"condition":"above","identifier":"uix6CkiHQqTnDNYHZXt8T","amount":` + amount + `,"currency":"usdt"}}`
});
return response.data.data
}
const DEFAULT_AMOUNT = 0.01;
async function main() {
let amount = DEFAULT_AMOUNT;
let lossesInARow = 0;
while(1) {
console.log(`Betting ${amount}`)
try {
const response = await sendRequest(amount);
if (response.diceRoll.state.result < 50.5) {
console.log(`Lost`)
lossesInARow++;
amount = amount * 2;
} else {
console.log(`Won`)
lossesInARow = 0;
amount = DEFAULT_AMOUNT;
}
await new Promise(resolve => setTimeout(resolve, 100));
if (lossesInARow >= 13) {
console.log("Stopping")
process.exit(0);
}
} catch (e) {
console.log("Error came");
}
}
}
main();