let data;
fetch("https://fapi.coinglass.com/api/futures/longShortRate?symbol=BTC&timeType=3")
.then(response => response.json()
)
.then (data => {
console.log(data['data'][0]);
});
let data;
fetch("https://fapi.coinglass.com/api/futures/longShortRate?symbol=BTC&timeType=3")
.then(response => response.json()
)
.then (data => {
console.log(data['data'][0]);
});
view = getResponse(url); // результата нет, но есть промис
view.then(result => console.log(result)); // через then получаем доступ к результам промиса