Get Kolkata Gold 24k (KOLK-24k) Historical Prices for Backtesting with this API
Get Kolkata Gold 24k (KOLK-24k) Historical Prices for Backtesting with this API
In the world of precious metals trading, having access to accurate and timely data is crucial for making informed decisions. For developers and traders looking to backtest their strategies, the ability to retrieve historical prices for gold, specifically Kolkata Gold 24k (KOLK-24k), is invaluable. This blog post will explore how to leverage the Metals-API to access historical prices and other essential data related to gold and other metals.
About Gold (XAU)
Gold, represented by the symbol XAU, has been a cornerstone of wealth and value for centuries. As a precious metal, it plays a significant role in the global economy, serving as a hedge against inflation and currency fluctuations. The digital transformation in precious metals trading has opened new avenues for data analytics and market insights, allowing traders to make more informed decisions based on real-time data.
With the integration of technology in trading, the way prices are discovered has evolved. The Metals-API provides developers with the tools necessary to build next-generation applications that can analyze market trends, track price movements, and even convert currencies seamlessly. This innovation in price discovery not only enhances trading strategies but also empowers users to create digital asset solutions that can adapt to market changes swiftly.
API Description
The Metals-API is a powerful tool that offers real-time and historical data for various metals, including gold, silver, platinum, and palladium. This API is designed to empower developers by providing them with the necessary data to build applications that can analyze and predict market trends effectively. With its robust capabilities, the Metals-API is transforming how traders interact with precious metals data.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rates, historical data, and various endpoints that cater to different trading needs. Whether you are looking to track the latest rates, analyze historical trends, or convert currencies, the Metals-API has you covered.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that provide different functionalities, making it a versatile tool for traders and developers alike. Here are some of the key features:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who need to stay updated on market movements.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to the API request, users can retrieve historical prices for gold and other metals, which is crucial for backtesting trading strategies.
- Bid And Ask Endpoint: This powerful feature allows you to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and trading opportunities.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint that enables users to convert any amount from one currency to another, facilitating seamless transactions.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, making it easier to analyze trends over specific periods.
- Fluctuation Endpoint: Retrieve information about how currencies fluctuate on a day-to-day basis, which is vital for understanding market volatility.
- Carat Endpoint: This feature provides information about gold rates by carat, allowing users to understand the value of gold in different purities.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price for a specified date, which can help traders identify market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for a specific date, offering a comprehensive view of market performance.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is beneficial for traders focused on industrial metals.
- API Key: Your unique API key is required to access the Metals-API, ensuring secure and authenticated requests.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API features 14 different endpoints, each providing unique functionalities to cater to various trading needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, allowing users to stay informed about the latest offerings.
- News Endpoint: Retrieve the latest news articles related to various metals, keeping traders informed about market developments.
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
Understanding the API responses is crucial for developers looking to implement the Metals-API effectively. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1767399810,
"base": "USD",
"date": "2026-01-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"
}
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1767313410,
"base": "USD",
"date": "2026-01-02",
"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": "2025-12-27",
"end_date": "2026-01-03",
"base": "USD",
"rates": {
"2025-12-27": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-12-29": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-01-03": {
"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": 1767399810,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-12-27",
"end_date": "2026-01-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"
}
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1767399810,
"base": "USD",
"date": "2026-01-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"
}
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1767399810,
"base": "USD",
"date": "2026-01-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"
}
Conclusion
In conclusion, the Metals-API provides a comprehensive suite of tools for accessing historical prices and real-time data for precious metals like gold. By utilizing the various endpoints, developers can create applications that not only track market trends but also facilitate effective trading strategies. The ability to retrieve historical data, analyze fluctuations, and convert currencies empowers traders to make informed decisions in a rapidly changing market.
For those looking to dive deeper into the capabilities of the Metals-API, I encourage you to explore the Metals-API Documentation for detailed information on each endpoint and its functionalities. Additionally, the Metals-API Supported Symbols page provides a complete list of available symbols, ensuring that you have all the necessary data at your fingertips.
As the landscape of precious metals trading continues to evolve, leveraging advanced APIs like Metals-API will be essential for developers and traders alike. Embrace the digital transformation and unlock the potential of real-time metals data to enhance your trading strategies.