🏠 Home 

getBTC

quick simple test function to get bitcoin price

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/382976/697849/getBTC.js

function getBTCJSON(){
var price = getURL("https://api.coindesk.com/v1/bpi/currentprice.json");
return price;
}
function getURL(url)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", url, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
lol