KARACHI: The latest interbank exchange rates in Pakistan have been released, showing the official value of the Pakistani Rupee (PKR) against major foreign currencies. The rates, used by commercial banks for foreign exchange transactions and international trade, include the latest buying and selling prices for currencies such as the US Dollar (USD), Euro (EUR), British Pound (GBP), Saudi Riyal (SAR), UAE Dirham (AED), and others.
Below is the updated interbank currency rates table for today.
${item.code} |
${item.buy.toFixed(2)} |
${item.sell.toFixed(2)} |
`;
tbody.appendChild(tr);
});
}
function filterCurrencies() {
const query = document.getElementById('forex-search-input').value.toLowerCase().trim();
const filtered = interbankData.filter(item =>
item.code.toLowerCase().includes(query) ||
item.name.toLowerCase().includes(query)
);
renderTableData(filtered);
}
function updateFaqData() {
const usd = interbankData.find(d => d.code === "USD");
const sar = interbankData.find(d => d.code === "SAR");
const gbp = interbankData.find(d => d.code === "GBP");
if(usd) {
document.getElementById('ib-faq-usd-buy').innerText = usd.buy.toFixed(2);
document.getElementById('ib-faq-usd-sell').innerText = usd.sell.toFixed(2);
}
if(sar) {
document.getElementById('ib-faq-sar-buy').innerText = sar.buy.toFixed(2);
document.getElementById('ib-faq-sar-sell').innerText = sar.sell.toFixed(2);
}
if(gbp) {
document.getElementById('ib-faq-gbp-buy').innerText = gbp.buy.toFixed(2);
document.getElementById('ib-faq-gbp-sell').innerText = gbp.sell.toFixed(2);
}
}
function initInterbankWidget() {
renderTableData(interbankData);
updateFaqData();
const chartCurrencies = ['USD', 'GBP', 'EUR', 'CHF', 'SGD', 'CAD', 'AUD'];
const chartData = interbankData.filter(d => chartCurrencies.includes(d.code));
const chartCanvas = document.getElementById('interbankChart');
if (chartCanvas && typeof Chart !== 'undefined') {
const ctx = chartCanvas.getContext('2d');
window.myInterbankChart = new Chart(ctx, {
type: 'bar',
data: {
labels: chartData.map(d => d.code),
datasets: [
{
label: 'Bank Buying',
data: chartData.map(d => d.buy),
backgroundColor: 'rgba(22, 163, 74, 0.85)',
borderColor: '#16a34a',
borderWidth: 1,
borderRadius: 6
},
{
label: 'Bank Selling',
data: chartData.map(d => d.sell),
backgroundColor: 'rgba(15, 23, 42, 0.85)',
borderColor: '#0f172a',
borderWidth: 1,
borderRadius: 6
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
labels: {
font: { family: "'Poppins', sans-serif", size: 11, weight: 500 }
}
}
},
scales: {
y: {
beginAtZero: false,
grid: { color: '#f1f5f9' },
ticks: {
font: { family: "'Poppins', sans-serif", size: 10 }
}
},
x: {
grid: { display: false },
ticks: {
font: { family: "'Poppins', sans-serif", size: 11, weight: 600 }
}
}
}
}
});
}
}
if (document.readyState === 'loading') {
document.addEventListener("DOMContentLoaded", initInterbankWidget);
} else {
initInterbankWidget();
}