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
window | |
.fetch('https://scanner.tradingview.com/crypto/scan', { | |
body: | |
'{"filter":[{"left":"volume|60","operation":"nempty"},{"left":"exchange","operation":"equal","right":"BINANCE"},{"left":"name","operation":"match","right":"btc"}],"symbols":{"query":{"types":[]}},"columns":["name","change_abs|60","volume|60","name","subtype","pricescale","minmov","fractional","minmove2"],"sort":{"sortBy":"volume|60","sortOrder":"desc"},"options":{"lang":"en"},"range":[0,150]}', | |
headers: { | |
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', | |
}, | |
method: 'POST', | |
}) | |
.then((res) => res.json()) |
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
(function(win) { | |
const $ = win.jQuery; | |
const symbolsToSelect = ['ETH', 'XMR', 'LTC']; // <-- CUSTOMIZE THIS!! | |
const $selectableCoins = $('.ms-selectable .ms-list li'); | |
const $selectedCoins = $('.ms-selection .ms-list li'); | |
$selectedCoins.click(); | |
const getCoinSelector = (symbol) => | |
$selectableCoins.filter(function() { | |
const text = $(this).text(); | |
return text.endsWith(`(${symbol})`); |