Retrieve Salem Gold 22k (SALE-22k) Historical Prices with this API

Retrieve Salem Gold 22k (SALE-22k) Historical Prices with this API
In the ever-evolving landscape of precious metals trading, the ability to access historical prices for gold, such as Salem Gold 22k (SALE-22k), is paramount for investors, traders, and developers alike. Utilizing the Metals-API provides a robust solution for retrieving historical prices and market data, enabling users to make informed decisions based on accurate and timely information. This blog post delves into the capabilities of the Metals-API, particularly focusing on how to effectively retrieve historical prices for gold and other precious metals.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of wealth preservation and investment strategies. In recent years, the digital transformation in precious metals has revolutionized how investors access and analyze market data. The integration of data analytics and technology in trading has led to innovative solutions for price discovery and investment strategies. With the rise of digital asset solutions, understanding gold's historical prices has never been more critical.
The Metals-API stands at the forefront of this transformation, offering developers and traders access to real-time and historical data that can be leveraged for various applications. By harnessing the power of data analytics, users can gain insights into market trends, price fluctuations, and investment opportunities.
API Description
The Metals-API is a powerful tool that enables users to access a wealth of information regarding precious metals. The API provides real-time and historical data, allowing developers to build next-generation applications that can analyze and visualize market trends. With its innovative capabilities, the Metals-API empowers users to make data-driven decisions in the precious metals market.
For detailed information on how to use the API, refer to the Metals-API Documentation. This resource provides comprehensive guidance on the various endpoints available, including their functionalities and usage examples.
Key Features and Endpoints
The Metals-API offers a range of endpoints that cater to different needs within the precious metals market. 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 the latest market conditions.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date to the API request, you can retrieve the historical price of gold, allowing for in-depth analysis of market trends over time.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time Bid and Ask prices for metals, which is crucial for making informed trading decisions.
- Convert Endpoint: This endpoint allows users to convert any amount from one currency to another, facilitating seamless transactions and calculations.
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates of their choice, providing a comprehensive view of price movements over time.
- Fluctuation Endpoint: This endpoint provides information about how currencies fluctuate on a day-to-day basis, helping users understand market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is particularly useful for jewelers and consumers interested in specific gold qualities.
- Lowest/Highest Price Endpoint: This feature allows users to query the API to get the lowest and highest price of gold for a specified date, aiding in investment decision-making.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access the open, high, low, and close prices for gold, providing a comprehensive view of market performance.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, which is essential for traders focused on industrial metals.
- API Key: The API Key is a unique identifier that must be included in the API requests to authenticate and authorize access to the data.
- API Response: The exchange rates delivered by the Metals-API are typically relative to USD, ensuring consistency in data interpretation.
- Available Endpoints: The Metals-API offers a variety of endpoints, each providing different functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies and metals, ensuring users have access to the most up-to-date information.
- Gold Price India Endpoint: Users can retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for investors in the Indian market.
- News Endpoint: This feature allows users to retrieve the latest news articles related to various metals, keeping them 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. This resource is invaluable for developers looking to integrate specific metals into their applications.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective implementation. Below are examples of various endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1745899345,
"base": "USD",
"date": "2025-04-29",
"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"
}
The response indicates a successful request, providing the latest exchange rates for various metals, including gold (XAU). The rates are expressed per troy ounce, which is the standard measurement for precious metals.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1745812945,
"base": "USD",
"date": "2025-04-28",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for a specific date, allowing users to analyze past price movements. The data can be used for trend analysis and forecasting.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-04-22",
"end_date": "2025-04-29",
"base": "USD",
"rates": {
"2025-04-22": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-04-24": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-04-29": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
The time-series response provides daily rates between specified dates, allowing for a comprehensive analysis of price trends over time. This is particularly useful for identifying patterns and making predictions.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1745899345,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response demonstrates the conversion of a specified amount from USD to gold (XAU). The result indicates how much gold can be purchased with the given amount of USD, which is essential for traders and investors looking to make transactions.
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-22",
"end_date": "2025-04-29",
"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"
}
The fluctuation endpoint provides insights into how prices have changed over a specified period. This information is crucial for understanding market volatility and making informed trading decisions.
OHLC (Open/High/Low/Close) Endpoint
{
"success": true,
"timestamp": 1745899345,
"base": "USD",
"date": "2025-04-29",
"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 endpoint provides the open, high, low, and close prices for a specific date, which is essential for traders looking to analyze market performance and make strategic decisions.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1745899345,
"base": "USD",
"date": "2025-04-29",
"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"
}
The bid/ask endpoint provides current bid and ask prices for metals, which is crucial for traders looking to enter or exit positions in the market.
Conclusion
Accessing historical prices for Salem Gold 22k (SALE-22k) and other precious metals is made seamless through the Metals-API. With its comprehensive range of endpoints and real-time data capabilities, the API empowers developers and traders to make informed decisions based on accurate market insights. By leveraging the innovative features of the Metals-API, users can enhance their trading strategies, conduct thorough analyses, and stay ahead in the competitive world of precious metals.
For more information on how to get started with the Metals-API, explore the Metals-API Documentation and familiarize yourself with the various endpoints available. Whether you are looking to retrieve the latest rates, historical prices, or market fluctuations, the Metals-API provides the tools necessary for success in the precious metals market.