

async function fetchConversionRate() { const apiKey = 'fca_live_6GSGFoRWIj1zasVOZEs6lIHTISKkCVr3ceJBr1yz'; const apiUrl = `https://api.freecurrencyapi.com/v1/latest?apikey=${apiKey}&base_currency=GBP`;try { const response = await fetch(apiUrl); const data = await response.json(); const rate = data.data.EUR; const gbpAmount = 60; const eurAmount = gbpAmount * rate; document.getElementById('conversion').innerText = `€${eurAmount.toFixed(2)}`; } catch (error) { console.error('Error fetching the exchange rate:', error); document.getElementById('conversion').innerText = 'Error fetching the exchange rate.'; } }document.addEventListener('DOMContentLoaded', fetchConversionRate);

async function fetchConversionRate() {
const apiKey = 'fca_live_6GSGFoRWIj1zasVOZEs6lIHTISKkCVr3ceJBr1yz';
const apiUrl = `https://api.freecurrencyapi.com/v1/latest?apikey=${apiKey}&base_currency=GBP`;try {
const response = await fetch(apiUrl);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log(data); // Log the API response for debugging
const rate = data.data.USD;
const gbpAmount = 60;
const usdAmount = gbpAmount * rate;
document.getElementById('conversion').innerText = `$${usdAmount.toFixed(2)}`;
} catch (error) {
console.error('Error fetching the exchange rate:', error);
document.getElementById('conversion').innerText = 'Error fetching the exchange rate.';
}
}document.addEventListener('DOMContentLoaded', fetchConversionRate);
Standard
listing
£
60
- Up to 10 photos of your off grid home
- Social media coverage
- Proofread for accuracy
- Zero commission
Premium
listing
£
100
- Up to 20 photos plus video tour!
- Social media coverage
- Full review of your listing with text enhancement and image feedback for maximum sale potential
- Zero commission