const axios = require("axios");
const BASE_URL =
"https://api-public.sandbox.pro.coinbase....";
const ResultsArr = [];
const getForexLatest = async url => {
const recentForex = {
AED: 0,
AFN: 0
};
try {
const res = await axios.get(url).then(res => {
const amount = res;
console.log(amount);
// for (var key in amount) {
// if (key === "AED") {
// recentForex.AED = amount[key];
// }
// }
});
} catch (e) {
console.log(e);
}
};
void (async () => {
try {
getForexLatest(BASE_URL);
} catch (e) {
console.log(e);
}
})();
getForexLatest(BASE_URL);