Get Salem Gold 22k (SALE-22k) prices programmatically using this API
Get Salem Gold 22k (SALE-22k) prices programmatically using this API
In the world of precious metals, gold (XAU) stands out as a symbol of wealth and stability. With the rise of digital transformation, the way we access and analyze gold prices has evolved significantly. Developers now have the opportunity to leverage powerful APIs to obtain real-time data, historical trends, and market insights. One such tool is the Metals-API, which provides comprehensive access to gold prices and other metal data programmatically.
About Gold (XAU)
Gold has long been a cornerstone of financial markets, serving as a hedge against inflation and currency fluctuations. The integration of technology in trading has transformed how investors and developers approach gold. With the advent of data analytics, market insights can be derived from real-time data, allowing for informed decision-making. The Metals-API Documentation provides a robust framework for accessing this data, enabling developers to create innovative applications that can analyze trends, predict price movements, and even automate trading strategies.
API Description
The Metals-API is designed to empower developers by providing real-time and historical data on various metals, including gold. This API is not just a data source; it represents a technological advancement in how precious metals are traded and analyzed. By utilizing the Metals-API, developers can build next-generation applications that harness the power of real-time metals data, offering users insights that were previously difficult to obtain.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. For instance, the Latest Rates Endpoint provides real-time exchange rate data, which is updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes, every 10 minutes, or even more frequently. This feature is essential for traders who need to make quick decisions based on the latest market conditions.
Another valuable feature is the Historical Rates Endpoint, which allows users to access historical rates dating back to 2019. This endpoint is particularly useful for analyzing trends over time. By appending a specific date in the format YYYY-MM-DD, developers can retrieve historical data that can inform investment strategies.
The Bid and Ask Endpoint is another powerful feature that provides real-time bid and ask prices for metals. This data is crucial for traders looking to execute buy or sell orders at optimal prices. Understanding the bid-ask spread can help traders gauge market liquidity and make more informed decisions.
For those interested in currency conversion, the Convert Endpoint allows users to convert any amount from one currency to another. This feature is particularly useful for international traders who need to understand the value of gold in different currencies.
The Time-Series Endpoint enables users to query daily historical rates between two chosen dates, providing a comprehensive view of price movements over time. This can be invaluable for identifying patterns and making predictions based on historical data.
Additionally, the Fluctuation Endpoint provides insights into how currencies fluctuate on a day-to-day basis. This endpoint can help traders understand volatility and adjust their strategies accordingly.
For those interested in gold rates by carat, the Carat Endpoint allows users to retrieve information about gold rates based on carat values. This feature is particularly useful for jewelers and consumers looking to understand the value of gold jewelry.
The Lowest/Highest Price Endpoint enables users to query the API for the lowest and highest prices for a specified date, providing insights into market extremes. Similarly, the Open/High/Low/Close (OHLC) Price Endpoint allows users to retrieve open, high, low, and close prices for a specific date, which is essential for technical analysis.
For those interested in LME symbols, the Historical LME Endpoint provides access to historical rates dating back to 2008, allowing for comprehensive analysis of metals traded on the London Metal Exchange.
Authentication is straightforward with the API Key, which is passed into the API base URL's access_key parameter. This unique key ensures secure access to the API's features.
Exchange rates delivered by the Metals-API are relative to USD by default, and all data is returned in a structured JSON format, making it easy for developers to integrate into their applications.
With a total of 14 available endpoints, the Metals-API offers a wide range of functionalities, each designed to meet specific needs in the precious metals market. For a complete list of supported symbols, refer to the Metals-API Supported Symbols page.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for developers. Below are examples of responses from various endpoints, which illustrate the structure and data provided by the API.
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1781914302,
"base": "USD",
"date": "2026-06-20",
"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": 1781827902,
"base": "USD",
"date": "2026-06-19",
"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-06-13",
"end_date": "2026-06-20",
"base": "USD",
"rates": {
"2026-06-13": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-06-15": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-06-20": {
"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": 1781914302,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-06-13",
"end_date": "2026-06-20",
"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": 1781914302,
"base": "USD",
"date": "2026-06-20",
"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": 1781914302,
"base": "USD",
"date": "2026-06-20",
"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
The Metals-API represents a significant advancement in how developers can access and utilize gold price data. By offering a wide range of endpoints, this API empowers users to create applications that can analyze market trends, convert currencies, and track fluctuations in real-time. Whether you are a trader looking to automate your strategies or a developer seeking to integrate precious metals data into your applications, the Metals-API provides the tools necessary to succeed in the modern financial landscape.
For more information on how to get started, visit the Metals-API Website and explore the Metals-API Documentation for detailed guidance on implementation. Don't forget to check the Metals-API Supported Symbols page for a comprehensive list of available metal symbols.