How to Get Real-Time Swiss Franc (CHF) Prices with Metals-API
How to Get Real-Time Swiss Franc (CHF) Prices with Metals-API
Accessing real-time Swiss Franc (CHF) prices in the metals market has never been easier, thanks to the innovative capabilities of the Metals-API. This powerful API provides developers with the tools necessary to retrieve up-to-date market data, enabling the creation of advanced applications that leverage real-time insights. In this blog post, we will explore how to access real-time CHF market prices using Metals-API, including step-by-step instructions, example API calls, and a deep dive into the API's features.
Metals-API Information
About Swiss Franc (CHF)
The Swiss Franc (CHF) is not only a stable currency but also a significant player in the global metals market. As the world undergoes a digital transformation, the integration of smart technologies and data analytics in the metal markets is becoming increasingly vital. The Metals-API stands at the forefront of this transformation, offering developers the ability to access real-time data that can drive insights and inform decision-making.
Technological advancements in data analytics allow businesses to track price fluctuations, analyze trends, and make informed decisions based on real-time data. The future of the metals market is bright, with possibilities for enhanced integration of smart technologies that can lead to more efficient trading and investment strategies.
API Description
The Metals-API provides a comprehensive suite of features designed to empower developers to build next-generation applications. With real-time access to metals prices, including the Swiss Franc, the API enables users to create applications that can track market trends, perform currency conversions, and analyze historical data.
One of the standout features of Metals-API is its ability to deliver real-time exchange rate data, updated at intervals depending on the subscription plan. This means that developers can choose how frequently they want to receive updates, ensuring they have the most current information available.
Key Features and Endpoints
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 for metals, including CHF, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date to your API call. This feature is essential for analyzing trends over time.
- Bid and Ask Endpoint: Retrieve real-time bid and ask prices for metals, allowing traders to make informed decisions based on current market conditions.
- Convert Endpoint: Easily convert amounts from one currency to another, including conversions to and from CHF, making it a versatile tool for financial applications.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, providing insights into price movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, which is crucial for understanding market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat, which is particularly useful for jewelers and investors in precious metals.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for a specified date, helping traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Access detailed OHLC data for a specific time period, which is vital for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a long-term view of market trends.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: All exchange rates are delivered relative to USD by default, with data returned in a structured JSON format.
- Supported Symbols Endpoint: Retrieve a constantly updated list of all available currencies and metals supported by the API.
- News Endpoint: Stay informed with the latest news articles related to various metals, enhancing your market awareness.
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 API call:
{
"success": true,
"timestamp": 1770078311,
"base": "USD",
"date": "2026-02-03",
"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 successfully retrieved the latest rates, with the base currency set to USD.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999 by using the following API call:
{
"success": true,
"timestamp": 1769991911,
"base": "USD",
"date": "2026-02-02",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for the specified date, allowing for trend analysis.
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-01-27",
"end_date": "2026-02-03",
"base": "USD",
"rates": {
"2026-01-27": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-29": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-02-03": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides a time-series view of the exchange rates, which is essential for identifying trends over time.
Convert Endpoint
The convert endpoint allows you to convert any amount from one metal to another or to/from USD:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1770078311,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows the conversion of 1000 USD to gold (XAU), providing the result in troy ounces.
Fluctuation Endpoint
Track rate fluctuations between two dates with the fluctuation endpoint:
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-27",
"end_date": "2026-02-03",
"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) Price Endpoint
To get OHLC data for a specific time period, use the following API call:
{
"success": true,
"timestamp": 1770078311,
"base": "USD",
"date": "2026-02-03",
"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 the open, high, low, and close prices for the specified date, which is essential for technical analysis.
Bid/Ask Endpoint
To get current bid and ask prices for metals, use the following API call:
{
"success": true,
"timestamp": 1770078311,
"base": "USD",
"date": "2026-02-03",
"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, which are crucial for traders looking to make quick decisions in the market.
Conclusion
The Metals-API is a powerful tool for developers looking to access real-time Swiss Franc (CHF) prices and other metals data. With its extensive range of endpoints, including the latest rates, historical data, and conversion capabilities, the API empowers users to create sophisticated applications that can analyze market trends and make informed decisions.
By leveraging the capabilities of Metals-API, developers can stay ahead of the curve in the rapidly evolving metals market. For more information, visit the Metals-API Documentation and explore the Metals-API Supported Symbols page to discover the full range of available data.