const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pagination: {page: 1, per_page: 50, sort_by: 'created_at', sort_direction: 'desc'}
})
};
fetch('https://api.finup.io/backend/transactions/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));