Skip to content

Instantly share code, notes, and snippets.

@onedayitwillmake
Created December 12, 2017 23:19
Show Gist options
  • Save onedayitwillmake/cb63d3cc22d24b0620461f3f2a89601e to your computer and use it in GitHub Desktop.
Save onedayitwillmake/cb63d3cc22d24b0620461f3f2a89601e to your computer and use it in GitHub Desktop.
compare-gemini-gdax.js
(function loop(){
window.gem = window.gem || $(".header-market-link[href*=gem] .price-right").get()[0]
window.gdax = window.gdax || $(".header-market-link[href*=gdax] .price-right").get()[0]
let gemPrice = parseFloat(gem.innerText);
let gdaxPrice = parseFloat(gdax.innerText);
console.log(Math.round(gdaxPrice - gemPrice), Math.round(gemPrice/gdaxPrice * 1000) / 1000)
setTimeout(loop, 200)
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment