Access Swiss Franc (CHF) Exchange Rates via REST API
Access Swiss Franc (CHF) Exchange Rates via REST API
In today's fast-paced financial landscape, obtaining real-time exchange rates is crucial for businesses and developers alike. The Metals-API provides a robust solution for accessing Swiss Franc (CHF) exchange rates and other metal prices through a comprehensive REST API. This blog post will delve into the capabilities of the Metals-API, focusing on its innovative features, practical applications, and how developers can leverage this powerful tool to build next-generation applications.
Metals-API Information
About Tellurium (TE)
As we explore the world of metals, it’s essential to recognize the role of technological innovation and digital transformation in the metal markets. The integration of smart technologies and data analytics has revolutionized how we interact with metal pricing and exchange rates. The Metals-API stands at the forefront of this transformation, providing developers with the tools to harness real-time data and insights.
With the rise of data-driven decision-making, the ability to analyze trends and fluctuations in metal prices is more important than ever. The Metals-API empowers developers to create applications that not only retrieve data but also analyze it for actionable insights. This capability opens up a world of possibilities for businesses looking to optimize their operations and make informed financial decisions.
API Description
The Metals-API is designed to provide developers with real-time access to metal prices and currency exchange rates, including the Swiss Franc (CHF). This API enables seamless integration into applications, allowing users to retrieve data in JSON format. The API's capabilities include fetching the latest rates, historical data, and even performing currency conversions.
For more detailed information, developers can refer to the Metals-API Documentation, which outlines the various endpoints and their functionalities. The API supports a wide range of metal symbols, which can be explored further on the Metals-API Supported Symbols page.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here’s a closer look at some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan. For example, a request to this endpoint will return the current exchange rates for CHF against various metals.
- Historical Rates Endpoint: Developers can access historical rates dating back to 2019. By appending a specific date to the request, users can retrieve past exchange rates, which is invaluable for trend analysis and forecasting.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for metals, providing insights into market conditions and helping traders make informed decisions.
- Convert Endpoint: The conversion endpoint enables users to convert amounts from one currency to another, including from CHF to various metals or vice versa. This is particularly useful for businesses dealing with international transactions.
- 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 currencies fluctuate on a day-to-day basis, which is essential for understanding market volatility.
- Carat Endpoint: This feature provides information about gold rates by carat, allowing jewelers and investors to make precise calculations.
- Lowest/Highest Price Endpoint: Users can query the API to find the lowest and highest prices for a specific date, which is crucial for market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides comprehensive price data, including open, high, low, and close prices for a specific date, aiding in technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is beneficial for those involved in the trading of metals on the London Metal Exchange.
- API Key: Each user is assigned a unique API key, which is required for authentication when making requests to the API.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The Metals-API comprises 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 Symbols page. This resource is invaluable for developers looking to integrate specific metals into their applications.
API Endpoint Examples and Responses
Latest Rates Endpoint
To get real-time exchange rates for all available metals, you can use the Latest Rates Endpoint. Here’s an example of a typical response:
{
"success": true,
"timestamp": 1783339668,
"base": "USD",
"date": "2026-07-06",
"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"
}
Historical Rates Endpoint
Accessing historical exchange rates for any date since 1999 can be done through the Historical Rates Endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1783253268,
"base": "USD",
"date": "2026-07-05",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
The Time-series Endpoint allows you to get exchange rates for a specific time period. Here’s an example:
{
"success": true,
"timeseries": true,
"start_date": "2026-06-29",
"end_date": "2026-07-06",
"base": "USD",
"rates": {
"2026-06-29": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-07-01": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-07-06": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
The Convert Endpoint allows you to convert any amount from one metal to another or to/from USD. Here’s how the response looks:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1783339668,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Using the Fluctuation Endpoint, you can track rate fluctuations between two dates. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-29",
"end_date": "2026-07-06",
"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"
}
OHLC (Open/High/Low/Close) Price Endpoint
The OHLC Price Endpoint provides open, high, low, and close prices for a specific time period. Here’s an example:
{
"success": true,
"timestamp": 1783339668,
"base": "USD",
"date": "2026-07-06",
"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"
}
Bid/Ask Endpoint
To get current bid and ask prices for metals, you can use the Bid/Ask Endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1783339668,
"base": "USD",
"date": "2026-07-06",
"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"
}
Conclusion
In conclusion, the Metals-API offers a powerful and flexible solution for accessing Swiss Franc (CHF) exchange rates and other metal prices. With its extensive range of endpoints, developers can easily integrate real-time data into their applications, enabling smarter financial decisions and enhanced market analysis. The API's capabilities, including the Latest Rates, Historical Rates, and Conversion endpoints, provide a comprehensive toolkit for any developer looking to work with metal pricing data.
For further exploration, developers are encouraged to visit the Metals-API Documentation for detailed information on each endpoint and its functionalities. Additionally, the Symbols List is a valuable resource for understanding the available metal symbols and their specifications.
By leveraging the transformative potential of the Metals-API, developers can create innovative applications that not only retrieve data but also analyze and interpret it for actionable insights. As the financial landscape continues to evolve, the ability to access and utilize real-time data will remain a critical factor for success.