I have a jquery code to retrieve data from shapeshift.io When I test using Postman, the data is ok. However, from the jQuery the data is undefined.
jQuery("#btnSubmit").click(function(){
var param = {"withdrawal": "0x242AcBe58c4f3b514E72297EA0Ed0d847F1123BE" , "pair": "btc_eth"};
jQuery.ajax({
dataType : 'json',
type : 'POST',
contentType : 'application/json;charset=UTF-8',
url : 'https://shapeshift.io/shift',
data : JSON.stringify({data : param}),
success: function(data,status) {
alert("Data: " + data.deposit + "\nStatus: " + status);
},
error: function(){
alert("error");
}
});
});