Get Salem Gold 22k (SALE-22k) prices using this API

Introduction
In the ever-evolving landscape of financial technology, the demand for real-time data on precious metals has surged. One of the most sought-after assets is gold, represented by the symbol XAU. The Metals-API provides a robust solution for accessing current and historical gold prices, enabling developers to integrate this data into their applications seamlessly. This blog post will explore the capabilities of the Metals-API, focusing on how it empowers developers to harness real-time metals data for innovative applications.
About Gold (XAU)
Gold has long been a symbol of wealth and stability, often viewed as a safe haven during economic uncertainty. As digital transformation sweeps across industries, the precious metals market is no exception. The integration of data analytics and technology in trading has revolutionized how investors and developers approach gold trading. By leveraging real-time data, developers can create applications that provide market insights, enhance trading strategies, and improve price discovery.
With the rise of digital asset solutions, gold is now more accessible than ever. The Metals-API offers a comprehensive suite of tools that allow developers to access gold prices and other metal data in real-time, facilitating informed decision-making and strategic planning. The API's capabilities extend beyond simple price retrieval; it empowers users to analyze trends, track fluctuations, and convert between different currencies with ease.
API Description
The Metals-API is designed to provide developers with the tools necessary to build next-generation applications that require real-time metals data. With its innovative architecture, the API offers a range of features that cater to various use cases, from simple price retrieval to complex data analysis.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data. Depending on the subscription plan, users can access the latest rates updated every 60 minutes or even every 10 minutes. This level of granularity is crucial for developers looking to build applications that require up-to-the-minute information.
Additionally, the API provides historical rates dating back to 2019, allowing developers to analyze trends over time. By appending a specific date to the API request, users can retrieve historical data for any metal, enabling comprehensive market analysis.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints, each designed to fulfill specific needs. Hereβs a closer look at some of the key features:
Latest Rates Endpoint
The Latest Rates Endpoint allows developers to fetch real-time exchange rates for all available metals. This endpoint is essential for applications that require current pricing information. For example, a request to this endpoint might return data structured as follows:
{
"success": true,
"timestamp": 1744160651,
"base": "USD",
"date": "2025-04-09",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
In this response, the "rates" object contains the current exchange rates for various metals, with gold (XAU) clearly indicated.
Historical Rates Endpoint
The Historical Rates Endpoint allows users to access historical exchange rates for any date since 1999. This feature is invaluable for developers looking to analyze past market behavior. A typical response might look like this:
{
"success": true,
"timestamp": 1744074251,
"base": "USD",
"date": "2025-04-08",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"unit": "per troy ounce"
}
Here, the response provides the historical rates for gold and other metals, allowing for detailed analysis of price movements over time.
Bid And Ask Endpoint
The Bid and Ask Endpoint is a powerful feature that enables developers to retrieve real-time bid and ask prices for metals. This information is crucial for traders who need to make informed decisions based on current market conditions. An example response might be:
{
"success": true,
"timestamp": 1744160651,
"base": "USD",
"date": "2025-04-09",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
},
"XAG": {
"bid": 0.0381,
"ask": 0.0382,
"spread": 0.0001
}
},
"unit": "per troy ounce"
}
This response provides both the bid and ask prices for gold, along with the spread, which is essential for understanding market liquidity.
Convert Endpoint
The Convert Endpoint allows users to convert any amount from one metal to another or to/from USD. This feature is particularly useful for applications that require currency conversion. A typical response might look like this:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1744160651,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
The response indicates the amount of gold that can be obtained for a specified amount of USD, providing valuable information for financial planning.
Time-Series Endpoint
The Time-Series Endpoint allows developers to query the API for daily historical rates between two dates of their choice. This feature is essential for analyzing trends over specific periods. A response might look like this:
{
"success": true,
"timeseries": true,
"start_date": "2025-04-02",
"end_date": "2025-04-09",
"base": "USD",
"rates": {
"2025-04-02": {
"XAU": 0.000485
},
"2025-04-09": {
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
This endpoint provides a clear view of how gold prices have changed over a specified time frame, allowing for in-depth analysis.
Fluctuation Endpoint
The Fluctuation Endpoint enables users to track rate fluctuations between two dates. This feature is crucial for understanding market volatility. A typical response might look like this:
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-02",
"end_date": "2025-04-09",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
}
},
"unit": "per troy ounce"
}
This response provides insights into how the price of gold has fluctuated over the specified period, including both absolute and percentage changes.
Open/High/Low/Close (OHLC) Price Endpoint
The OHLC Price Endpoint allows developers to query the API for the open, high, low, and close prices for a specific time period. This data is essential for traders looking to analyze market performance. An example response might look like this:
{
"success": true,
"timestamp": 1744160651,
"base": "USD",
"date": "2025-04-09",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
}
},
"unit": "per troy ounce"
}
This response provides a comprehensive view of gold's price performance over the specified period, allowing traders to make informed decisions.
Lowest/Highest Price Endpoint
The Lowest/Highest Price Endpoint allows users to query the API to get the lowest and highest price for a specified date range. This feature is particularly useful for identifying market extremes. A typical response might look like this:
{
"success": true,
"timestamp": 1744160651,
"base": "USD",
"date": "2025-04-09",
"rates": {
"XAU": {
"lowest": 0.000481,
"highest": 0.000487
}
},
"unit": "per troy ounce"
}
This response provides critical information for traders looking to understand market dynamics and identify potential entry and exit points.
Historical LME Endpoint
The Historical LME Endpoint provides access to historical rates for LME symbols dating back to 2008. This endpoint is particularly useful for developers working with industrial metals. A typical response might look like this:
{
"success": true,
"timestamp": 1744160651,
"base": "USD",
"date": "2025-04-09",
"rates": {
"XCU": 0.294118,
"XAL": 0.434783
},
"unit": "per troy ounce"
}
This endpoint allows for comprehensive analysis of historical pricing trends for various metals, enhancing market understanding.
API Key and Response
To access the Metals-API, developers must use an API key, which is passed into the API base URL's access_key parameter. This key is essential for authentication and ensures that only authorized users can access the data. The API response is structured to deliver exchange rates relative to USD by default, providing a consistent reference point for users.
Supported Symbols Endpoint
The Supported Symbols Endpoint provides a constantly updated list of all available currencies and metals. This feature is crucial for developers who need to ensure they are working with the correct symbols. For a complete list of supported symbols, refer to the Metals-API Supported Symbols page.
Gold Price India Endpoint
The Gold Price India Endpoint allows users to retrieve the latest gold price specifically for the Indian market. This feature is particularly useful for developers targeting regional applications. A typical response might look like this:
{
"success": true,
"timestamp": 1744160651,
"base": "INR",
"date": "2025-04-09",
"rates": {
"XAU": 0.000482
},
"unit": "per troy ounce"
}
This response provides the latest gold price in India, allowing for localized applications and insights.
News Endpoint
The News Endpoint allows users to retrieve the latest news articles related to various metals. This feature is essential for developers looking to provide users with up-to-date information on market trends and events. A typical response might look like this:
{
"success": true,
"news": [
{
"title": "Gold Prices Surge Amid Economic Uncertainty",
"link": "https://example.com/gold-prices-surge",
"date": "2025-04-09"
}
]
}
This response provides valuable insights into current events affecting the metals market, enhancing the user experience.
Conclusion
The Metals-API is a powerful tool for developers looking to integrate real-time data on precious metals into their applications. With features such as the Latest Rates Endpoint, Historical Rates Endpoint, and Bid and Ask Endpoint, the API provides comprehensive access to critical market data. By leveraging this API, developers can create innovative solutions that enhance trading strategies, provide market insights, and facilitate informed decision-making.
As the digital transformation of the precious metals market continues, the Metals-API stands out as a key player in providing the necessary data and tools for developers. For more information on how to get started, visit the Metals-API Documentation and explore the extensive capabilities of this API.