Is failure inevitable in this scenario?
d3.json("https://api.kraken.com/0/public/Time",
function(){
console.log(arguments);
});
I'm encountering a familiar CORS hurdle
XMLHttpRequest cannot load https://api.kraken.com/0/public/Time/. No 'Access-Control-Allow-Origin' header is present on the requested resource.
, however, I have no trouble accessing https://api.kraken.com/0/public/Ticker
.
I've invested quite some time already into this.
UPDATE:
My call to /Ticker works fine:
var myurl = "https://api.kraken.com/0/public/Trades";
var data = "pair=ETHXBT";
var r = d3.json(myurl).header("content-type", "application/x-www-form-urlencoded").post(data, function(error, response){console.log(arguments);});
This attempt for /Trades fails (yet again, 'Access-Control-Allow-Origin' error):
var myurl = "https://api.kraken.com/0/public/Trades";
var data = "pair=ETHXBT";
var r = d3.json(myurl).header("content-type", "application/x-www-form-urlencoded").post(data, function(error, response){console.log(arguments);});
Check out the Kraken API description here:
At this point, I acknowledge my shortcomings, but I seek your guidance to assess their depth.