NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server
Currency Conversion API

Swiss Franc (CHF) Currency API

The Swiss Franc is widely regarded as a safe-haven currency due to Switzerland's political neutrality, strong financial sector, and low inflation. Managed by the Swiss National Bank, the CHF is a popular reserve currency and flight-to-safety asset. CHF exchange rates are influenced by SNB policy decisions, European economic conditions, and global risk appetite.

The Swiss Franc Currency API allows you to:

  • Convert CHF (Swiss Franc) to any of 170+ supported currencies
  • Get real-time CHF exchange rates
  • Access CHF conversion rates via simple REST API
  • Free tier available for CHF currency pairs
(4.4)

From 5,079 users

2,800+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
249ms287ms337ms684ms1101ms

Didn't find what you were looking for? Suggest an improvement


/v1/convertcurrency GET

https://api.api-ninjas.com/v1/convertcurrency


Parameters

  • have  required

    Currency you currently hold. For example, CHF.

  • want  required

    Currency you want to convert to. For example, USD.

  • amount  required

    Amount of currency to convert.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object with the following fields or an error if the request is unsuccessful.

  • old_amount

    The original amount provided in the request.

  • old_currency

    The original currency code (e.g. CHF).

  • new_currency

    The target currency code (e.g. USD).

  • new_amount

    The converted amount in the target currency.

  • timestamp

    Unix timestamp (in seconds) indicating the time at which the exchange rate used for the conversion was applied.

Related CHF Currency Pairs

PairFromTo
USD/CHFUnited States DollarSwiss Franc
EUR/CHFEuroSwiss Franc

Sample Request Live Demo!

have
want
amount

Try our APIs in the API playground

Sign up for a free API key to get started — no credit card required.

https://api.api-ninjas.com/v1/convertcurrency?have=CHF&want=USD&amount=1000

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    old_amount:1000,
    old_currency:"CHF",
    new_currency:"USD",
    new_amount:1131.9,
    timestamp:1777407247
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/convertcurrency?have=CHF&want=USD&amount=1000" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed above, you can still make API calls by using any HTTP request library and following the documentation above.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Convert Currency API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • Send a GET request with three required parameters: have (the 3-character code of the currency you currently hold, e.g. GBP), want (the 3-character code you want to convert to, e.g. AUD), and amount (the quantity to convert). To pull the underlying rates directly instead, see the Exchange Rate API.
  • It returns a JSON object with old_amount and old_currency echoing your input, new_amount and new_currency giving the converted result, and a timestamp (Unix seconds) indicating when the exchange rate used for the conversion was applied. See the error codes page for what is returned on a failed request.
  • Premium members get live forex prices while free users receive 15-minute delayed data, and the API converts between fiat currencies only (for crypto, use a dedicated crypto endpoint). The free tier covers a limited set such as CNY, GBP, AUD and KRW, while the full list of supported currencies is unlocked on premium plans.
  • It is ideal for displaying localized prices in e-commerce checkouts, building travel budgeting tools, and normalizing multi-currency invoices or financial reports. For tracking how much a currency pair fluctuates over time, pair it with the Currency Volatility API.