I want to get JSON from the URL, but jQuery's function getJSON doesn't work. I got this error: "Failed to load https://bittrex.com/api/v1.1/public/getticker?market=usdt-btc: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access." What did I do wrong? Or should I use some other fucntion? Please help!
function ticker(url)
{
this.Last = 0;
$.getJSON(url, function(data)
{
this.Last = data.result.Last;
});
this.getFullInfo = function()
{
console.log("Last: " + this.Last);
}
}
var usdtBTC = new ticker("https://bittrex.com/api/v1.1/public/getticker?market=usdt-btc");
usdtBTC.getFullInfo();