A Pen by Виталий Котляр on CodePen.
Created
December 28, 2020 17:54
-
-
Save ketlller/78ac5e1069727c494ef768b117089471 to your computer and use it in GitHub Desktop.
BANAN_MONIC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> | |
<script src='https://code.jquery.com/jquery-latest.js'></script> | |
<!--автокликер//--> | |
<script> | |
$(function() { | |
$('.button').on('click', function() { | |
}); | |
var clc = setInterval( function() { $('.button').click(); }, 72000); | |
}); | |
</script> | |
</head> | |
<button class='button'>Получить курс</button> | |
<body> | |
<div class="div"></span> | |
<span style="color: #008000;"><div class="sell">Торг пара 1 Buy: <span></span></div></span> | |
<span style="color: #FF0000;"> <div class="buy">Торг пара 1 Sell: <span></span></div></span> | |
</div> | |
<div class="div"></span> | |
<span style="color: #008000;"><div class="sell2">Торг пара 2 Buy <span></span></div></span> | |
<span style="color: #FF0000;"> <div class="buy2">Торг пара 2 Sell: <span></span></div></span> | |
</div> | |
<div class="div"> | |
<div class="inputdrub1">Спред торг пара 1: <span></span>%</div> | |
<div class="inputdrub2">Спред торг пара 2: <span></span>%</div> | |
<div class="inputdrub2tt">Расхождение 2-1 Buy: <span></span></div> | |
<div class="inputdrub1tt">Расхождение 2-1 Sell: <span></span></div> | |
<p><span style="color: #008000;">Сигнал покупки: <span id="Status_pokypki">---</span> <input type="number" id="11min_transaction11" value=""> | |
Sound <input type="checkbox" id="pokypka" name="pokypka" checked></p> </span></span> | |
</p> | |
<p><span style="color: #FF0000;">Сигнал продажи: <span id="Status_prodano">---</span> <input type="number" id="22min_transaction22" value=""> | |
Sound <input type="checkbox" id="prodaem" name="prodaem" checked></p> </span></span> | |
</span></span> | |
</p> | |
<div class="text-center"> | |
<br>-------------------------------------------------------------------------------</br> | |
<span style="color: #0000CD;"> <div class="inputdrub3"><span></span>%</div> 1. Профит (ставим <span style="color: #FF0000;">Limit продажу</span> на <span style="color: #008000;">"Торг пару 1 Buy"</span> + по рынку продадим на <span style="color: #FF0000;">"Торг пара 2 Sell"</span>): </span> | |
<p><span style="color: #0000CD;">Сигнал профита 1: <input type="number" id="1min_transaction1" value="">% | |
Sound <input type="checkbox" id="1min_transaction11_notificator" name="1min_transaction11_notificator" checked></p> </span></span></p> | |
<span style="color: #0000CD;"> <div class="inputdrub3333"><span></span>%</div> 2. Профит (ставим <span style="color: #FF0000;">Limit продажу</span> на <span style="color: #008000;">"Торг пару 2 Buy"</span> + по рынку продадим на <span style="color: #FF0000;">"Торг пара 1 Sell</span>"): </span> | |
<p><span style="color: #0000CD;">Сигнал профита 2: <input type="number" id="1min_transaction1333" value="">% | |
Sound <input type="checkbox" id="1min_transaction11333_notificator" name="1min_transaction11333_notificator" checked></p> </span></span></p> | |
<span style="color: #FF0000;"><div class="inputdrub4"><span></span>%</div> 3. Профит (продаем по рынку Sell = Торг пара 1 Sell | |
+ Торг пара 2 Sell) : </span> | |
<p><span style="color: #FF0000;"> Сигнал профита 3: <input type="number" id="2min_transaction2" value="">% | |
Sound <input type="checkbox" id="2min_transaction11_notificator" name="2min_transaction11_notificator" checked> </span></span></p> | |
</div> | |
<div class="text-center"> | |
<br>-------------------------------------------------------------------------------</br> | |
<span style="color: #008000;"> <p><div class="inputdrub111">Профит: <span></span>%. Сигнал Buy 1: <input type="number" id="min_transaction1" value=""> | |
Продал по: <input type="number" id="min_transactionss111" value=""> <span id="Status_min_transaction11">---</span> | |
<span style="color: #008000;"> <p>Sound notification <input type="checkbox" id="min_transaction11_notificator" name="min_transaction11_notificator" checked></p> </span> | |
</div> </p> </span> | |
<div class="text-center"> | |
<span style="color: #FF0000;"> <p><div class="inputdrub222">Профит: <span></span>%. Сигнал Sell 1: <input type="number" id="min_transaction2" value=""> | |
Купил по: <input type="number" id="min_transactionss222" value=""> <span id="Status_min_transaction22">---</span> | |
<span style="color: #FF0000;"> <p>Sound notification <input type="checkbox" id="min_transaction22_notificator" name="min_transaction22_notificator" checked></p> </span> | |
</p> </span> | |
</div> | |
<br>-------------------------------------------------------------------------------</br> | |
<div class="text-center"> | |
<span style="color: #008000;"> <p><div class="inputdrub333">Профит: <span></span>%. Сигнал Buy 2: <input type="number" id="min_transaction3" value=""> | |
Продал по: <input type="number" id="min_transactionss333" value=""> <span id="Status_min_transaction11">---</span> | |
<span style="color: #008000;"> <p>Sound notification <input type="checkbox" id="min_transaction33_notificator" name="min_transaction11_notificator" checked></p> </span> | |
</div> </p> </span> | |
<div class="text-center"> | |
<span style="color: #FF0000;"> <p><div class="inputdrub444">Профит: <span></span>%. Сигнал Sell 2: <input type="number" id="min_transaction4" value=""> | |
Купил по: <input type="number" id="min_transactionss444" value=""> <span id="Status_min_transaction22">---</span> | |
<span style="color: #FF0000;"> <p>Sound notification <input type="checkbox" id="min_transaction44_notificator" name="min_transaction22_notificator" checked></p> </span> | |
</p> </span> | |
</div> | |
<br>-------------------------------------------------------------------------------</br> | |
</body> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var btn = document.querySelector('button'); | |
var div = document.querySelector('.div'); | |
var divBuy = document.querySelector('.buy span'); | |
var divSell = document.querySelector('.sell span'); | |
var divBuy2 = document.querySelector('.buy2 span'); | |
var divSell2 = document.querySelector('.sell2 span'); | |
var currentPrice_BuyCOIN_USD = null; | |
var currentPrice_SellCOIN_USD = null; | |
var currentPrice_BuyCOIN_USD_livecoin = null; | |
var currentPrice_SellCOIN_USD_livecoin = null; | |
var value1 = document.querySelector('.inputdrub1 span'); | |
var value2 = document.querySelector('.inputdrub2 span'); | |
var value1tt = document.querySelector('.inputdrub1tt span'); | |
var value2tt = document.querySelector('.inputdrub2tt span'); | |
var profit1 = document.querySelector('.inputdrub3 span'); | |
var profit333 = document.querySelector('.inputdrub3333 span'); | |
var profit2 = document.querySelector('.inputdrub4 span'); | |
var value1111 = document.querySelector('.inputdrub111 span'); | |
var value2222 = document.querySelector('.inputdrub222 span'); | |
var value3333 = document.querySelector('.inputdrub333 span'); | |
var value4444 = document.querySelector('.inputdrub444 span'); | |
btn.addEventListener('click', () => { | |
let proxyUrl = 'https://cors-anywhere.herokuapp.com/'; | |
var targetUrl = 'https://api.binance.com/api/v1/depth?symbol=ETHUPUSDT'; | |
// targetUrl2=targetUrl2.replace(/[^\=]*$/,'PZM/BTC'); | |
var targetUrl2 = 'https://api.binance.com/api/v1/depth?symbol=ETHDOWNUSDT'; | |
// targetUrl=targetUrl.replace(/[^\/]+(?=\/$)/,'BTC_USD'); | |
let resUrl = proxyUrl + targetUrl; | |
let resUrl2 = proxyUrl + targetUrl2; | |
console.log(); | |
fetch(resUrl) | |
.then(res => { | |
res.json().then(body => { | |
divBuy.innerHTML = parseFloat(body.bids[0][0]).toFixed(5); | |
divSell.innerHTML = parseFloat(body.asks[0][0]).toFixed(5); | |
currentPrice_BuyCOIN_USD = body.bids[0][0]; | |
currentPrice_SellCOIN_USD = body.asks[0][0]; | |
}); | |
}) | |
// .catch(err => console.log(err)); | |
fetch(resUrl2) | |
.then(res => { | |
res.json().then(body => { | |
divBuy2.innerHTML = parseFloat(body.bids[0][0]).toFixed(5); | |
divSell2.innerHTML = parseFloat(body.asks[0][0]).toFixed(5); | |
currentPrice_BuyCOIN_USD_livecoin = body.bids[0][0]; | |
currentPrice_SellCOIN_USD_livecoin = body.asks[0][0]; | |
}); | |
}) | |
//.catch(err => console.log(err)); | |
// if(1 > 0 && $('#1min_transaction11_notificator123123').prop('checked'))beep1(); | |
if(1 > 0) | |
{ | |
(beep1()); | |
}; | |
}); | |
function beep1() { | |
setTimeout(() => { | |
var value11 = (((currentPrice_BuyCOIN_USD*100)/currentPrice_SellCOIN_USD)-100).toFixed(2); | |
value1.innerHTML = value11; | |
var value22 = (((currentPrice_BuyCOIN_USD_livecoin*100)/currentPrice_SellCOIN_USD_livecoin)-100).toFixed(2); | |
value2.innerHTML = value22; | |
var value11tt = (currentPrice_BuyCOIN_USD_livecoin*1)-(currentPrice_BuyCOIN_USD*1).toFixed(3); | |
value1tt.innerHTML = value11tt; | |
var value22tt = (currentPrice_SellCOIN_USD_livecoin*1)-(currentPrice_SellCOIN_USD*1).toFixed(3); | |
value2tt.innerHTML = value22tt; | |
var min_transactionss111 = $('#min_transactionss111').val(); | |
var min_transactionss222 = $('#min_transactionss222').val(); | |
var min_transactionss333 = $('#min_transactionss333').val(); | |
var min_transactionss444 = $('#min_transactionss444').val(); | |
var value111 = (((currentPrice_SellCOIN_USD*100)/min_transactionss111)-100).toFixed(2); | |
value1111.innerHTML = value111; | |
var value222 = (((currentPrice_BuyCOIN_USD*100)/min_transactionss222)-100).toFixed(2); | |
value2222.innerHTML = value222; | |
var value333 = (((currentPrice_SellCOIN_USD_livecoin*100)/min_transactionss333)-100).toFixed(2); | |
value3333.innerHTML = value333; | |
var value444 = (((currentPrice_BuyCOIN_USD_livecoin*100)/min_transactionss444)-100).toFixed(2); | |
value4444.innerHTML = value444; | |
// currentPrice_SellCOIN_USD | |
// currentPrice_BuyCOIN_USD | |
// currentPrice_SellCOIN_USD_livecoin | |
// currentPrice_BuyCOIN_USD_livecoin | |
var value33 = ((((currentPrice_SellCOIN_USD*100)/min_transactionss111)-100) + (((currentPrice_BuyCOIN_USD_livecoin*100)/min_transactionss333)-100)).toFixed(2); | |
profit1.innerHTML = value33; | |
var value33333 = ((((currentPrice_BuyCOIN_USD*100)/min_transactionss111)-100) + (((currentPrice_SellCOIN_USD_livecoin*100)/min_transactionss333)-100)).toFixed(2); | |
profit333.innerHTML = value33333; | |
var value44 = ((((currentPrice_BuyCOIN_USD*100)/min_transactionss222)-100) + (((currentPrice_BuyCOIN_USD_livecoin*100)/min_transactionss444)-100)).toFixed(2); profit2.innerHTML = value44; | |
// if(btcalpha > 0 && $('#btcalphalivecoin_notificator').prop('checked'))beep(); | |
// console.log(body); | |
// }); | |
//}) | |
//.catch(err => console.log(err)); | |
var min_transactionss1 = $('#min_transaction1').val(); | |
if(currentPrice_BuyCOIN_USD > min_transactionss1 && $('#min_transaction11_notificator').prop('checked'))beep3(); | |
var min_transactionss2 = $('#min_transaction2').val(); | |
if(currentPrice_SellCOIN_USD > min_transactionss2 && $('#min_transaction22_notificator').prop('checked'))beep3(); | |
var min_transactionss3 = $('#min_transaction3').val(); | |
if(currentPrice_BuyCOIN_USD_livecoin > min_transactionss3 && $('#min_transaction33_notificator').prop('checked'))beep3(); | |
var min_transactionss4 = $('#min_transaction4').val(); | |
if(currentPrice_SellCOIN_USD_livecoin > min_transactionss4 && $('#min_transaction44_notificator').prop('checked'))beep3(); | |
var min1_transaction1 = $('#1min_transaction1').val(); | |
if(((((currentPrice_SellCOIN_USD*100)/min_transactionss111)-100) + (((currentPrice_BuyCOIN_USD_livecoin*100)/min_transactionss333)-100)) > min1_transaction1 && $('#1min_transaction11_notificator').prop('checked'))beep2(); | |
var min1_transaction1333 = $('#1min_transaction1333').val(); | |
if(((((currentPrice_BuyCOIN_USD*100)/min_transactionss111)-100) + (((currentPrice_SellCOIN_USD_livecoin*100)/min_transactionss333)-100)) > min1_transaction1 && $('#1min_transaction11333_notificator').prop('checked'))beep2(); | |
var min2_transaction2 = $('#2min_transaction2').val(); | |
if(((((currentPrice_BuyCOIN_USD*100)/min_transactionss222)-100) + (((currentPrice_BuyCOIN_USD_livecoin*100)/min_transactionss444)-100)) > min2_transaction2 && $('#2min_transaction11_notificator').prop('checked'))beep2(); | |
var pokypka = $('#11min_transaction11').val(); | |
if(value11tt > pokypka && $('#pokypka').prop('checked'))beep2(); | |
var prodaem = $('#22min_transaction22').val(); | |
if(value11tt < prodaem && $('#prodaem').prop('checked'))beep3(); | |
var Status_pokypki = document.querySelector('#Status_pokypki'); | |
//if(pokypka > 0) { | |
if(value11tt > pokypka) { | |
Status_pokypki.innerHTML = ('ПОКУПАЕМ'); | |
Status_pokypki.style.color = "#008000"; | |
//} | |
} | |
else { | |
Status_pokypki.innerHTML = ('ОЖИДАЮ'); | |
Status_pokypki.style.color = "#FFFF00"; | |
} | |
var Status_prodano = document.querySelector('#Status_prodano'); | |
//if(prodaem > 0) { | |
if(value11tt < prodaem) { | |
Status_prodano.innerHTML = ('ПРОДАЕМ'); | |
Status_prodano.style.color = "#f00"; | |
//} | |
} | |
else { | |
Status_prodano.innerHTML = ('ОЖИДАЮ'); | |
Status_prodano.style.color = "#FFFF00"; | |
} | |
}, 3000); | |
}; | |
function beep() { | |
(new Audio("https://raw.githubusercontent.com/ketlller/ketlller.github.io/master/beep.wav")).play(); | |
}; | |
function beep2() { | |
(new Audio("https://raw.githubusercontent.com/ketlller/audio/main/02073.wav")).play(); | |
}; | |
function beep3() { | |
(new Audio("https://raw.githubusercontent.com/ketlller/audio/main/03493.wav")).play(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.title{text-align: center;} | |
.text-center{text-align: center;} | |
.half{max-width:50%;text-align: center;} | |
.halfer{display: flex;flex-flow: row;justify-content: space-around;margin: 2% 10%;} | |
.button1 { position: fixed; bottom: 490px; right: 20px; display: block; background: | |
#2db700; color: #fff; text-decoration: none; padding: 6px 23px; font-size: 17px;} | |
.button:hover { background: #222; } | |
#n1{ position: fixed; bottom: 545px; left: 20px; display: block; padding: 4px;font-size: 14px;width: 110px;border: 3px solid #53ed0c;} | |
#n2{ position: fixed; bottom: 545px; left: 330px; display: block; padding: 4px;font-size: 14px;width: 110px;border: 3px solid #ff0808;} | |
#n3{ position: fixed; bottom: 545px; left: 465px; display: block; padding: 4px;font-size: 14px;width: 110px;border: 3px solid #53ed0c;} | |
#n4{ position: fixed; bottom: 545px; left: 773px; display: block; padding: 4px;font-size: 14px;width: 110px;border: 3px solid #ff0808;} | |
#n5{ position: fixed; bottom: 545px; left: 909px; display: block; padding: 4px;font-size: 14px;width: 110px;border: 3px solid #53ed0c;} | |
#n6{ position: fixed; bottom: 545px; left: 1220px; display: block; padding: 4px;font-size: 14px;width: 110px;border: 3px solid #ff0808;} | |
#out1{ position: fixed; bottom: 490px; left: 465px; display: block; padding: 4px;font-size: 14px;width: 110px;border: 3px solid #53ed0c;} | |
#out2{ position: fixed; bottom: 490px; left: 773px; display: block; padding: 4px;font-size: 14px;width: 110px;border: 3px solid #ff0808;} | |
.button { position: fixed; bottom: 400px; right: 20px; | |
display: inline-block; /* Строчно-блочный элемент */ | |
background: #00FF00; /* Серый цвет фона */ | |
color: #fff; /* Белый цвет текста */ | |
padding: 1rem 1.5rem; /* Поля вокруг текста */ | |
text-decoration: none; /* Убираем подчёркивание */ | |
border-radius: 3px; /* Скругляем уголки */ | |
} | |
#status-block{height: 150px;display: none;} | |
#min_transaction{padding: 5px;font-size: 14px;width: 40px;border: 1px solid #dbdbdb;} | |
#min_transactionss1{ position: fixed; bottom: 455px; left: 350px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#btcalphalivecoin_notificator{ position: fixed; bottom: 446px; left: 380px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#min_transactionss2{ position: fixed; bottom: 325px; left: 350px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#btcalphahotbit_notificator{ position: fixed; bottom: 316px; left: 380px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#min_transactionss3{ position: fixed; bottom: 455px; left: 773px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#livecoinbtcalpha_notificator{ position: fixed; bottom: 446px; left: 803px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#min_transactionss4{ position: fixed; bottom: 325px; left: 773px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#livecoinhotbit_notificator{ position: fixed; bottom: 316px; left: 803px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#min_transactionss5{ position: fixed; bottom: 455px; left: 1220px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#hotbitbtcalpha_notificator{ position: fixed; bottom: 446px; left: 1250px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#min_transactionss6{ position: fixed; bottom: 325px; left: 1220px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
#hotbitlivecoin_notificator{ position: fixed; bottom: 316px; left: 1250px; display: block; padding: 4px;font-size: 14px;width: 60px;border: 3px solid #53ed0c;} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment