Get Chinese Renminbi Yuan Offshore (CNH) Historical Prices using this API
Get Chinese Renminbi Yuan Offshore (CNH) Historical Prices using this API
The Chinese Renminbi Yuan (CNY), particularly in its offshore form (CNH), has become increasingly significant in global trade and finance. As the world shifts towards digital transformation, the demand for accurate and real-time financial data has surged. This blog post will delve into how developers can leverage the Metals-API to access historical prices for the Chinese Renminbi Yuan and explore the broader implications of this data in the context of technological innovation and market analytics.
About Chinese Renminbi Yuan (CNY)
The Chinese Renminbi, often referred to as the Yuan, is the official currency of the People's Republic of China. As the second-largest economy in the world, China's currency plays a crucial role in international trade and finance. The offshore version of the Yuan, known as CNH, is traded outside of mainland China and is subject to different regulations and market dynamics. This distinction has led to a growing interest in the historical pricing of CNH, particularly for businesses and investors looking to navigate the complexities of the Chinese market.
In recent years, the digital transformation of financial markets has been accelerated by advancements in technology. The integration of smart technologies and data analytics has enabled traders and developers to gain insights into market trends and make informed decisions. The Metals-API provides a robust platform for accessing real-time and historical data, empowering developers to build applications that can analyze and visualize currency trends effectively.
Metals-API Overview
The Metals-API is a powerful tool designed to provide developers with access to real-time and historical data for various metals and currencies. This API is particularly useful for those looking to integrate financial data into their applications, whether for trading, analysis, or reporting purposes. With a focus on innovation and technological advancement, Metals-API enables developers to harness the transformative potential of real-time metals data.
One of the key features of Metals-API is its ability to deliver accurate and timely exchange rate data. This is crucial for developers who need to ensure that their applications reflect the most current market conditions. The API supports a variety of endpoints, each designed to cater to different data needs, from the latest rates to historical trends.
Key Features and Endpoints
Metals-API offers a range of endpoints that provide developers with the flexibility to access the data they need. Here are some of the most notable features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated at intervals ranging from every 60 minutes to every 10 minutes. This feature is essential for applications that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. Developers can query the Metals-API for historical rates by appending a specific date to the endpoint, allowing for detailed analysis of currency trends over time.
- Bid and Ask Endpoint: This powerful feature enables users to retrieve real-time Bid and Ask prices, which are crucial for traders looking to make informed decisions based on market spreads.
- Convert Endpoint: The API includes a currency conversion endpoint, allowing users to convert any amount from one currency to another. This is particularly useful for applications that need to handle multiple currencies seamlessly.
- Time-Series Endpoint: This endpoint allows developers to query the API for daily historical rates between two dates of their choice, facilitating in-depth analysis of currency fluctuations over specific periods.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, which can be particularly useful for jewelers and investors in precious metals.
- Lowest/Highest Price Endpoint: This endpoint enables users to query the API to get the lowest and highest price for a specified date, which is essential for understanding market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides users with the open, high, low, and close prices for a specific date, allowing for comprehensive market analysis.
- Historical LME Endpoint: For those interested in London Metal Exchange (LME) symbols, this endpoint provides access to historical rates dating back to 2008.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate access to the API.
- API Response: The exchange rates delivered by Metals-API are relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The API includes 14 different endpoints, each providing distinct functionalities tailored to various data needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, ensuring developers have access to the latest information.
- News Endpoint: Users can retrieve the latest news articles related to various metals, providing context and insights into market movements.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers looking to integrate its capabilities into their applications. Below are examples of how to use various endpoints effectively:
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1769300493,
"base": "USD",
"date": "2026-01-25",
"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
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1769214093,
"base": "USD",
"date": "2026-01-24",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2026-01-18",
"end_date": "2026-01-25",
"base": "USD",
"rates": {
"2026-01-18": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-01-20": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-25": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
Convert any amount from one metal to another or to/from USD:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1769300493,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-01-18",
"end_date": "2026-01-25",
"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
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1769300493,
"base": "USD",
"date": "2026-01-25",
"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
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1769300493,
"base": "USD",
"date": "2026-01-25",
"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 ability to access historical prices for the Chinese Renminbi Yuan offshore (CNH) through the Metals-API is a game-changer for developers and businesses alike. With its comprehensive suite of endpoints, the API provides the necessary tools to analyze market trends, track fluctuations, and make informed decisions based on real-time data. As the financial landscape continues to evolve, the integration of advanced technologies and data analytics will be crucial for staying ahead in the competitive market.
For developers looking to harness the power of financial data, the Metals-API offers a robust platform that not only simplifies the process of accessing exchange rates but also empowers users to build innovative applications that can adapt to the changing market dynamics. By leveraging the capabilities of this API, businesses can gain valuable insights and drive their strategies forward in an increasingly digital world.
To learn more about the features and capabilities of the Metals-API, visit the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available currencies and metals. Embrace the future of financial data with the Metals-API and unlock the potential of real-time insights.