How to retrieve Salem Gold 18k (SALE-18k) prices with this API
Introduction
In the ever-evolving landscape of precious metals trading, the ability to retrieve real-time data is paramount for developers and traders alike. One such valuable resource is the Metals-API, which provides comprehensive access to gold prices, including the Salem Gold 18k (SALE-18k) prices. This blog post delves into the intricacies of the Metals-API, focusing on how it empowers users to access vital market data, particularly for gold (XAU), and explores the innovative features that make it a game-changer in the realm of digital asset solutions.
Metals-API Information
About Gold (XAU)
Gold, represented by the symbol XAU, has long been a cornerstone of the financial markets. As a precious metal, it serves not only as a store of value but also as a hedge against inflation and economic uncertainty. The digital transformation in precious metals trading has opened new avenues for data analytics and market insights, allowing traders to make informed decisions based on real-time data.
With the integration of technology in trading, the Metals-API stands out by offering innovative solutions for price discovery. By leveraging advanced data analytics, traders can gain insights into market trends, fluctuations, and historical performance, enabling them to optimize their trading strategies. The API's capabilities extend beyond mere price retrieval; it empowers developers to create next-generation applications that can analyze and visualize precious metals data in real-time.
API Description
The Metals-API is designed to provide developers with seamless access to real-time and historical data on various metals, including gold, silver, platinum, and palladium. Its transformative potential lies in its ability to deliver accurate and timely information, which is crucial for making informed trading decisions.
With a user-friendly interface and comprehensive documentation available at Metals-API Documentation, developers can easily integrate the API into their applications. The API supports a wide range of functionalities, allowing users to retrieve the latest rates, historical data, bid and ask prices, and much more.
Key Features and Endpoints
The Metals-API boasts a variety of endpoints that cater to different trading needs. 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 or every 10 minutes. This feature is essential for traders who need the most current market prices.
- Historical Rates Endpoint: Users can access historical rates dating back to 2019. By appending a specific date to the API request, developers can retrieve past prices, which is invaluable for trend analysis and forecasting.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion endpoint, enabling users to convert amounts from one metal to another or to/from USD. This is particularly useful for traders dealing in multiple currencies.
- Time-Series Endpoint: Users can query the API for daily historical rates between two selected dates, facilitating in-depth analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides information about how prices fluctuate on a day-to-day basis, helping traders understand market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is essential for jewelers and traders dealing in different gold purities.
- Lowest/Highest Price Endpoint: This feature allows users to query the API for the lowest and highest prices within a specified timeframe, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access OHLC data for specific periods, which is crucial for technical analysis and trading strategies.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing for comprehensive market research.
- API Key: Users must pass their unique API key into the API base URL's access_key parameter for authentication, ensuring secure access to the data.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format, making it easy to parse and utilize.
- Available Endpoints: The Metals-API includes 14 endpoints, each offering distinct functionalities tailored to various trading needs.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies, ensuring users have access to the latest symbols.
- News Endpoint: Users can 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.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective integration. 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": 1764298844,
"base": "USD",
"date": "2025-11-28",
"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": 1764212444,
"base": "USD",
"date": "2025-11-27",
"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-11-21",
"end_date": "2025-11-28",
"base": "USD",
"rates": {
"2025-11-21": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-11-23": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-11-28": {
"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": 1764298844,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2025-11-21",
"end_date": "2025-11-28",
"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": 1764298844,
"base": "USD",
"date": "2025-11-28",
"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": 1764298844,
"base": "USD",
"date": "2025-11-28",
"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 is an invaluable tool for developers and traders looking to access real-time and historical data on precious metals, particularly gold. Its innovative features, such as the latest rates, historical data, and conversion capabilities, empower users to make informed trading decisions. By integrating the Metals-API into their applications, developers can harness the power of real-time data analytics, enhancing their trading strategies and market insights.
As the digital landscape continues to evolve, the importance of reliable and accurate data cannot be overstated. The Metals-API not only provides access to essential market information but also facilitates the development of advanced applications that can analyze and visualize precious metals data. For those interested in exploring the full capabilities of the Metals-API, the Metals-API Documentation is an excellent resource, offering detailed guidance on implementation and usage.
In summary, whether you are a trader seeking the latest gold prices or a developer aiming to create innovative applications, the Metals-API is a powerful ally in navigating the complexities of the precious metals market.