Bank of Thailand exchange rates

Latest official average exchange rates from the Bank of Thailand for every currency, a THB converter, and how to pull the rates into Google Sheets.

Loading the latest rates from the Bank of Thailand…

All currencies

CurrencyBuying (sight)Buying (transfer)SellingMid rate
Loading the latest rates from the Bank of Thailand…

Source: Bank of Thailand, daily average exchange rates of commercial banks in Thailand.
These are the average rates of commercial banks for that day, published by the Bank of Thailand around 6 pm on business days. Your bank's actual rate will differ slightly and changes during the day.

Pull the rate into Google Sheets

Quick estimate (market rate, not the Bank of Thailand rate):

code
=GOOGLEFINANCE("CURRENCY:USDTHB")

Official Bank of Thailand rate: sign up free at portal.api.bot.or.th, create an app to get a token, then add this in Extensions → Apps Script and use =BOTFX("USD") or =BOTFX("USD","selling") in any cell.

js
function BOTFX(currency, type) {
  // type: "mid_rate" (ค่าเริ่มต้น), "selling", "buying_transfer", "buying_sight"
  var TOKEN = 'ใส่ token จาก portal.api.bot.or.th';
  var cache = CacheService.getScriptCache(), key = 'fx_' + currency;
  var rows = cache.get(key);
  if (!rows) {
    var end = new Date(), start = new Date(end.getTime() - 12 * 864e5);
    var f = function (d) { return Utilities.formatDate(d, 'Asia/Bangkok', 'yyyy-MM-dd'); };
    var url = 'https://gateway.api.bot.or.th/Stat-ExchangeRate/v2/DAILY_AVG_EXG_RATE/'
      + '?start_period=' + f(start) + '&end_period=' + f(end) + '&currency=' + currency;
    var res = UrlFetchApp.fetch(url, { headers: { Authorization: TOKEN } });
    rows = JSON.stringify(JSON.parse(res.getContentText()).result.data.data_detail);
    cache.put(key, rows, 6 * 3600);
  }
  var list = JSON.parse(rows).filter(function (r) { return r.mid_rate; });
  var last = list.sort(function (a, b) { return a.period < b.period ? -1 : 1; }).pop();
  return Number(last[type || 'mid_rate'] || last.mid_rate);
}

More free tools