Access Swiss Franc (CHF) Exchange Rates with API Documentation in JSON Format
Access Swiss Franc (CHF) Exchange Rates with API Documentation in JSON Format
In today's fast-paced financial landscape, having access to real-time exchange rates is crucial for businesses and developers alike. The Metals-API provides a robust solution for retrieving exchange rates, including the Swiss Franc (CHF), in a convenient JSON format. This blog post will delve into the capabilities of the Metals-API, particularly focusing on its features, endpoints, and practical applications for developers looking to integrate exchange rate data into their applications.
Metals-API Information
About Tellurium (TE)
While Tellurium (TE) may not be the primary focus of this post, it serves as a reminder of the digital transformation occurring within metal markets. The integration of smart technology and data analytics is revolutionizing how we interact with metals and currencies. As developers, understanding these trends can help us harness the power of data to create innovative applications that meet the evolving needs of users.
API Description
The Metals-API is designed to empower developers by providing real-time and historical data on metal prices and currency exchange rates. With its advanced capabilities, the API allows for seamless integration into applications, enabling users to access critical financial data at their fingertips. The API supports various endpoints, each tailored to specific functionalities, ensuring that developers can retrieve the information they need efficiently.
For more detailed information, you can refer to the Metals-API Documentation, which outlines the full range of features and usage guidelines.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data, updated every 60 minutes or more frequently, depending on your subscription plan. It allows developers to access the most current rates for the Swiss Franc (CHF) and other currencies.
- Historical Rates Endpoint: Developers can access historical exchange rates dating back to 2019. By appending a specific date to the API request, users can retrieve past rates, which is invaluable for trend analysis and financial forecasting.
- Bid And Ask Endpoint: This feature enables users to retrieve real-time bid and ask prices, providing insights into market conditions and helping traders make informed decisions.
- Convert Endpoint: The conversion endpoint allows users to convert amounts between different currencies, including metals and fiat currencies like the CHF. This is particularly useful for applications that require currency conversion functionalities.
- Time-Series Endpoint: This endpoint allows users to query daily historical rates between two specified dates, making it easier to analyze trends over time.
- Fluctuation Endpoint: Users can track how exchange rates fluctuate over a specified period, providing insights into market volatility and trends.
- Carat Endpoint: This feature provides information about gold rates based on carat, which is essential for jewelers and investors in precious metals.
- Lowest/Highest Price Endpoint: Developers can query the API to find the lowest and highest prices for a given date, which is useful for market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides detailed price data for a specific time period, including opening, high, low, and closing prices.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is crucial for those involved in trading metals on the London Metal Exchange.
- API Key: Each user is provided with a unique API key that must be included in requests to authenticate access to the API.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data representation.
- Available Endpoints: The Metals-API features 14 different endpoints, each designed to provide specific functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies and metals, ensuring users have access to the latest information.
List of Symbols
The Metals-API provides access to a comprehensive range of metal symbols. For a complete list of all supported symbols and their specifications, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Latest Rates Endpoint
To get real-time exchange rates for all available metals, you can use the following endpoint:
{
"success": true,
"timestamp": 1779617261,
"base": "USD",
"date": "2026-05-24",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744,
"XCU": 0.294118,
"XAL": 0.434783,
"XNI": 0.142857,
"XZN": 0.344828
},
"unit": "per troy ounce"
}
This response indicates that the API call was successful and provides the latest rates for various metals, including their values relative to USD.
Historical Rates Endpoint
Accessing historical exchange rates for any date since 1999 can be done with the following example:
{
"success": true,
"timestamp": 1779530861,
"base": "USD",
"date": "2026-05-23",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for specific metals on a given date, allowing developers to analyze trends over time.
Time-series Endpoint
To get exchange rates for a specific time period, you can use the time-series endpoint:
{
"success": true,
"timeseries": true,
"start_date": "2026-05-17",
"end_date": "2026-05-24",
"base": "USD",
"rates": {
"2026-05-17": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-05-19": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-05-24": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time-series view of exchange rates, enabling developers to visualize trends and fluctuations over the specified period.
Convert Endpoint
The convert endpoint allows users to convert any amount from one metal to another or to/from USD:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1779617261,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates a successful conversion from USD to gold (XAU), providing the conversion rate and the resulting amount in troy ounces.
Fluctuation Endpoint
To track rate fluctuations between two dates, you can use the fluctuation endpoint:
{
"success": true,
"fluctuation": true,
"start_date": "2026-05-17",
"end_date": "2026-05-24",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
},
"XAG": {
"start_rate": 0.03825,
"end_rate": 0.03815,
"change": -0.0001,
"change_pct": -0.26
},
"XPT": {
"start_rate": 0.000915,
"end_rate": 0.000912,
"change": -3.0e-6,
"change_pct": -0.33
}
},
"unit": "per troy ounce"
}
This response provides insights into how the rates have changed over the specified period, which is crucial for traders and analysts.
OHLC (Open/High/Low/Close) Endpoint
To get OHLC data for a specific time period, you can use the following example:
{
"success": true,
"timestamp": 1779617261,
"base": "USD",
"date": "2026-05-24",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
},
"XAG": {
"open": 0.03825,
"high": 0.0383,
"low": 0.0381,
"close": 0.03815
},
"XPT": {
"open": 0.000915,
"high": 0.000918,
"low": 0.00091,
"close": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides detailed price data for metals, which is essential for traders looking to analyze market movements.
Bid/Ask Endpoint
To get current bid and ask prices for metals, you can use the following example:
{
"success": true,
"timestamp": 1779617261,
"base": "USD",
"date": "2026-05-24",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
},
"XAG": {
"bid": 0.0381,
"ask": 0.0382,
"spread": 0.0001
},
"XPT": {
"bid": 0.000911,
"ask": 0.000913,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
This response provides the current bid and ask prices for various metals, which is crucial for traders looking to make informed decisions based on market conditions.
Conclusion
The Metals-API offers a comprehensive solution for developers seeking to access real-time and historical exchange rates, including those for the Swiss Franc (CHF). With a variety of endpoints designed to meet different needs, developers can easily integrate this powerful API into their applications. By leveraging features such as the latest rates, historical data, and conversion capabilities, businesses can enhance their financial applications and provide users with valuable insights.
For further exploration of the API's capabilities, be sure to check out the Metals-API Documentation and the Metals-API Supported Symbols page. With the right tools and knowledge, developers can harness the power of real-time metals data to create innovative financial solutions.