Skip to content
Hong Kong Dollar · HKD

Hong Kong dollar (HKD) exchange rate API

Hong Kong dollar rates against 190+ currencies – live and historical back to 1999. HKD is linked to the US dollar inside a 7.75–7.85 band, so USD/HKD barely moves while every other pair follows the dollar.

CodeHKD
SymbolHK$
Decimals2
HistorySince 1999
GET /v1/latest · base HKD
curl -G "https://api.fxapi.com/v1/latest" \
  -d base_currency=HKD \
  -d currencies=USD,CNY,EUR,GBP \
  -H "apikey: $FXAPI_KEY"
# HKD on a past date
curl -G "https://api.fxapi.com/v1/historical" \
  -d date=2005-05-18 -d base_currency=HKD \
  -d currencies=USD \
  -H "apikey: $FXAPI_KEY"
ISO 4217 codeHKD
SymbolHK$
Minor unit2 decimals
IssuerHong Kong Monetary Authority

Hong Kong is a major international financial center, and its currency works differently from most: the Hong Kong dollar is tied to the US dollar through a currency board arrangement. For developers this means USD/HKD is almost constant, while HKD/EUR, HKD/JPY or HKD/CNY move with the dollar. The fxapi HKD exchange rate API returns all of them, and the peg makes a good automated sanity check for your data pipeline.

HKD facts for developers

  • Where it’s used: Hong Kong. It is also widely accepted in Macau, whose pataca (MOP) is in turn linked to the Hong Kong dollar.
  • Symbol and formatting: $, written HK$ to distinguish it from other dollars. Format: HK$1,234.50.
  • Minor unit: 2 decimals (cents).
  • Issuer: the Hong Kong Monetary Authority (HKMA) runs the currency board. Banknotes are issued by three commercial banks – HSBC, Standard Chartered and Bank of China (Hong Kong) – plus the government’s own HK$10 note.
  • Regime: the Linked Exchange Rate System has fixed the Hong Kong dollar to the US dollar since 1983, originally at 7.80. On 18 May 2005 – the sample date on this page – the HKMA introduced a strong-side Convertibility Undertaking at 7.75 and announced that the weak side would move from 7.80 to 7.85 (completed on 20 June 2005), creating today’s band symmetric around 7.80.
  • Events in the historical data: before the 2005 refinements there was no formal strong-side limit, so a band check should only run on dates after mid-2005. The interesting moves are in HKD’s rates against other currencies, which mirror the US dollar.

Get HKD rates with the fxapi API

/v1/latest works on every plan, and Professional and Enterprise refresh it every 60 seconds. This Ruby script fetches USD/HKD and raises an alert if a value falls outside the band – a cheap check that your rate feed and parsing are sane:

require "net/http"
require "json"

BAND = (7.75..7.85)

uri = URI("https://api.fxapi.com/v1/latest")
uri.query = URI.encode_www_form(base_currency: "USD", currencies: "HKD,CNY,EUR")
req = Net::HTTP::Get.new(uri)
req["apikey"] = ENV.fetch("FXAPI_KEY")

res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
raise "fxapi returned #{res.code}" unless res.is_a?(Net::HTTPSuccess)

body = JSON.parse(res.body)
data = body["data"]
usd_hkd = data.dig("HKD", "value")

warn "USD/HKD #{usd_hkd} outside 7.75–7.85 – check your feed" unless BAND.cover?(usd_hkd.round(4))

# Cross rate: HKD per 1 EUR, derived through USD
puts format("USD/HKD %.4f  EUR/HKD %.4f  (as of %s)",
            usd_hkd, usd_hkd / data.dig("EUR", "value"), body.dig("meta", "last_updated_at"))

The cross rate is derived through the dollar – learn how in base currency and cross rates. For a plain feed of live values see the real-time exchange rates API, and for back-dated checks the historical exchange rates API. The Ruby guide covers retries and caching, and the US dollar page lists other dollar pegs.

Things to watch

  • Allow tiny tolerance. Market rates can touch the band edges; compare with a rounded value rather than strict equality.
  • CNY vs CNH. Hong Kong is the main offshore yuan market (CNH), but fxapi lists the yuan only under its ISO code CNY.
  • Same $ sign. Show HK$ or HKD next to prices that could be read as US dollars.

Popular HKD pairs

Request any of these pairs – or any other combination of the 190+ supported currencies – with base_currency=HKD:

PairLatest rate request
HKD/USD/v1/latest?base_currency=HKD&currencies=USD
HKD/CNY/v1/latest?base_currency=HKD&currencies=CNY
HKD/EUR/v1/latest?base_currency=HKD&currencies=EUR
HKD/GBP/v1/latest?base_currency=HKD&currencies=GBP
HKD/JPY/v1/latest?base_currency=HKD&currencies=JPY
HKD/SGD/v1/latest?base_currency=HKD&currencies=SGD
HKD/MOP/v1/latest?base_currency=HKD&currencies=MOP

Monthly averages and fluctuation for HKD

# Monthly average HKD rates for 2025 (IAS 21 / ASC 830)
curl -G "https://api.fxapi.com/v1/average" \
  -d date_from=2025-01-01 -d date_to=2025-12-31 -d period=month \
  -d base_currency=HKD -d currencies=USD,CNY,EUR \
  -H "apikey: $FXAPI_KEY"

# How did HKD move over the last year?
curl -G "https://api.fxapi.com/v1/fluctuation" \
  -d date_from=2025-10-01 -d date_to=2026-10-01 \
  -d base_currency=HKD -d currencies=USD,CNY,EUR \
  -H "apikey: $FXAPI_KEY"

See the historical exchange rates API, average rates API and documentation for every parameter.

HKD is one of 190+ currencies in fxapi, the foreign exchange rates API for developers – live rates, daily history since 1999 and monthly averages with one API key.

Frequently asked questions

How do I get the USD to HKD exchange rate via API?
Request /v1/latest?currencies=HKD with your key in the apikey header. With the default USD base, the value is Hong Kong dollars per 1 US dollar and should sit between 7.75 and 7.85.
Is the Hong Kong dollar pegged to the US dollar?
Yes. Under the Linked Exchange Rate System, in place since 1983, the HKMA keeps USD/HKD within 7.75–7.85 through its Convertibility Undertakings.
Does fxapi have HKD rates before 1999?
No. Daily history starts on 1999-01-01.
Can I get the HKD to CNY rate?
Yes. Use base_currency=HKD&currencies=CNY. Note that fxapi lists the yuan under its ISO code CNY; there is no separate offshore CNH code.
Free plan · no credit card

Get your free exchange rate API key

300 requests a month, latest and historical rates, fluctuation and averages – free forever. Upgrade when you need faster updates or more requests.