I am using jQuery to call the AlphaVantage finance API for stock quotes in an HTML file on the local machine. However, the .get or .ajax calls are failing. I have tried using crossdomain and jsonp, but still the call fails in the error handler. The error text in the error handler is blank - so no indication is provided why it is failing. Any help would be appreciated. Here is the call:
$.ajax({
url: 'https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&apikey=demo',
crossDomain: true,
dataType: "json",
success: function(data, textStatus, jqXHR) {
console.log(data);
},
error: function (jqXHR, textStatus, error) {
console.log("Post error: " + error);
}
});