Skip to content
Swiss Franc · CHF

Swiss franc (CHF) exchange rate API

Swiss franc rates against 190+ currencies, including the full EUR/CHF history through the 2011–2015 minimum exchange rate. Set base_currency=CHF for rates per 1 franc.

CodeCHF
SymbolCHF
Decimals2
HistorySince 1999
GET /v1/latest · base CHF
curl -G "https://api.fxapi.com/v1/latest" \
  -d base_currency=CHF \
  -d currencies=EUR,USD,GBP,JPY \
  -H "apikey: $FXAPI_KEY"
# CHF on a past date
curl -G "https://api.fxapi.com/v1/historical" \
  -d date=2015-01-15 -d base_currency=CHF \
  -d currencies=EUR \
  -H "apikey: $FXAPI_KEY"
ISO 4217 codeCHF
SymbolCHF
Minor unit2 decimals
IssuerSwiss National Bank

The Swiss franc is widely regarded as a safe-haven currency, and EUR/CHF matters to every business with Swiss customers, suppliers or payroll. It has also produced some of the most dramatic days in modern FX history, which makes reliable historical data important for backtests and audits. The fxapi CHF exchange rate API gives you live franc rates and daily history from 1999 onwards, with any base currency.

CHF facts for developers

  • Where it’s used: Switzerland and Liechtenstein.
  • Symbol and formatting: the ISO code CHF is the usual symbol (Fr. is also seen), placed before the amount. Swiss German formatting uses an apostrophe as thousands separator: CHF 1'234.50.
  • Minor unit: 2 decimals (Rappen/centimes). Cash is rounded to 0.05 because the smallest coin is 5 centimes.
  • Central bank: the Swiss National Bank (SNB).
  • Regime: floating, with SNB foreign exchange interventions at times.
  • Events in the historical data: on 6 September 2011 the SNB set a minimum exchange rate of 1.20 francs per euro and defended it for more than three years. On 15 January 2015 – the sample date on this page – it discontinued the floor without warning, and the franc appreciated sharply against the euro within minutes. The SNB’s policy rate was negative from January 2015 until September 2022.

Get CHF rates with the fxapi API

/v1/historical is available on every plan. This Ruby script measures the move on the day the floor ended and includes a Swiss cash-rounding helper:

require "net/http"
require "json"

def eur_chf(date)
  uri = URI("https://api.fxapi.com/v1/historical")
  uri.query = URI.encode_www_form(date: date, base_currency: "EUR", currencies: "CHF")
  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)
  JSON.parse(res.body).dig("data", "CHF", "value")
end

before = eur_chf("2015-01-14")
after  = eur_chf("2015-01-15")
puts format("EUR/CHF %.4f -> %.4f (%.1f%%)", before, after, (after / before - 1) * 100)

# Swiss cash rounding: nearest 0.05 CHF
def cash_round(amount)
  (amount * 20).round / 20.0
end

puts cash_round(19.97) # => 19.95

Need converted amounts directly? The currency converter API (/v1/convert) is included from the Basic plan; full daily series come from the time series API (/v1/range) on Professional and up. Single past dates are covered by the historical exchange rates API on every plan. More in the Ruby guide, and see the euro page for the other side of EUR/CHF.

Things to watch

  • End-of-day vs intraday. On 15 January 2015 the intraday low was far below the closing rate. fxapi’s historical values are end-of-day (UTC) – see end-of-day vs real-time rates.
  • Cash vs electronic rounding. Apply 0.05 rounding only to cash totals.
  • Base direction. EUR/CHF (francs per euro) and CHF/EUR are often mixed up in spreadsheets – fix the base in code.

Popular CHF pairs

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

PairLatest rate request
CHF/EUR/v1/latest?base_currency=CHF&currencies=EUR
CHF/USD/v1/latest?base_currency=CHF&currencies=USD
CHF/GBP/v1/latest?base_currency=CHF&currencies=GBP
CHF/JPY/v1/latest?base_currency=CHF&currencies=JPY
CHF/CAD/v1/latest?base_currency=CHF&currencies=CAD
CHF/CNY/v1/latest?base_currency=CHF&currencies=CNY

Monthly averages and fluctuation for CHF

# Monthly average CHF 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=CHF -d currencies=EUR,USD,GBP \
  -H "apikey: $FXAPI_KEY"

# How did CHF 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=CHF -d currencies=EUR,USD,GBP \
  -H "apikey: $FXAPI_KEY"

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

CHF 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 EUR to CHF exchange rate via API?
Call /v1/latest?base_currency=EUR&currencies=CHF with your key in the apikey header. The value is francs per 1 euro.
Can I see what happened when the SNB removed the franc floor?
Yes. Request /v1/historical for 2015-01-14 and 2015-01-15 with base_currency=EUR&currencies=CHF, or use /v1/fluctuation for the period to get the percentage change.
Does fxapi have Swiss franc rates before 1999?
No. Daily data starts on 1999-01-01 for all currencies.
How do I round CHF amounts for cash payments?
The smallest Swiss coin is 5 centimes, so cash totals are rounded to the nearest 0.05 CHF. Card and bank payments use 2 decimals. See currency rounding and precision.
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.