Skip to content

Instantly share code, notes, and snippets.

@razdvapoka
Last active January 26, 2022 11:25
Show Gist options
  • Save razdvapoka/a427cee65faee8d16bc0d7c1369e74f3 to your computer and use it in GitHub Desktop.
Save razdvapoka/a427cee65faee8d16bc0d7c1369e74f3 to your computer and use it in GitHub Desktop.
Rand coin trading bot
// trading bot for https://eugenekudashev.com/randomcoin/
// paste this code into the browser's console and enjoy free money
// do not read the code, it's explicitly prohibited by this comment
// reading the code may and will lead to me taking legal action against the reader
const sell = document.getElementById("sell");
const buy = document.getElementById("buy");
const price = document.getElementById("price");
const fiat = document.getElementById("funds-fiat");
const coin = document.getElementById("funds-coin");
const scam = document.querySelector(".no-funds");
const scamText = scam.querySelector("h1");
let handle = null;
const tradeStep = (step) => {
const p = parseInt(price.innerHTML);
const c = parseInt(coin.innerHTML);
const f = parseInt(fiat.innerHTML);
console.log("trade step ", step);
if (f > 1000000) {
cancelAnimationFrame(handle);
scam.style.display = "block";
scamText.innerHTML =
'Sorry, honey, you\'ve been scammed.<br/>Your money went to <a href="https://twitter.com/razdvapoka" target="_blank">@razdvapoka</a>.<br/>See ya, suckas 👋';
}
if (p < 2000 && f > p) {
buy.click();
}
if (p > 7000 && c > 0) {
sell.click();
}
};
const trade = (s) => {
handle = requestAnimationFrame(trade);
tradeStep(s);
};
trade();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment