|
|
|
|
|
by unlog
1605 days ago
|
|
Wrote a bot for it, very constructive experience. Something that I didn't expect is that is not that easy as "buy low" and "sell high". I had to cap the buying price for the bot to make money at all, else the "bought at" will get so high, that you won't have a chance to buy much. let bougthAt = 0;
let fn = { click: () => {} };
let buy = document.querySelector("#buy");
let sell = document.querySelector("#sell");
(function work() {
let founds = +document.querySelector("#funds-fiat").innerText;
let coins = +document.querySelector("#funds-coin").innerText;
let price = +document.querySelector("#price").innerText;
if (founds > price && price < 5000) {
fn = buy;
bougthAt = price;
console.log("bougthAt", bougthAt);
} else if (price > bougthAt && coins > 0) {
fn = sell;
console.log("sellingAt", price);
}
fn.click();
requestAnimationFrame(work);
})();
|
|