How to retrieve Salem Gold 22k (SALE-22k) pricing data via API

How to Retrieve Salem Gold 22k (SALE-22k) Pricing Data via API
In the rapidly evolving landscape of precious metals trading, the ability to access real-time pricing data is crucial for investors and developers alike. One of the most sought-after metals is gold, represented by the symbol XAU. This blog post will delve into how to retrieve Salem Gold 22k (SALE-22k) pricing data using the Metals-API, exploring its features, capabilities, and the transformative potential of real-time metals data.
Metals-API Information
About Gold (XAU)
Gold has long been a symbol of wealth and stability, and its digital transformation is reshaping how investors interact with this precious metal. The integration of data analytics and market insights allows traders to make informed decisions based on real-time data. With the rise of technology in trading, innovations in price discovery are becoming more prevalent, enabling users to access gold pricing data at their fingertips.
As digital asset solutions continue to evolve, the demand for accurate and timely gold pricing data has never been higher. The Metals-API provides developers with the tools necessary to build next-generation applications that can leverage this data for various use cases, from investment tracking to automated trading systems.
API Description
The Metals-API is a powerful tool that offers a wide range of functionalities for accessing metals pricing data. It empowers developers to create applications that can retrieve real-time and historical data, analyze market trends, and perform currency conversions. The API's capabilities are designed to support a variety of use cases, making it an essential resource for anyone involved in the precious metals market.
With the Metals-API, developers can easily integrate real-time pricing data into their applications, allowing for seamless user experiences. The API's robust architecture ensures that data is delivered quickly and accurately, enabling users to make informed decisions based on the latest market conditions.
Key Features and Endpoints
The Metals-API offers several key features that enhance its usability and functionality:
- 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 crucial for traders who need to stay updated on the latest market movements.
- Historical Rates Endpoint: Access historical rates for most currencies dating back to 2019. By appending a specific date to your query, you can retrieve past pricing data, which is essential for trend analysis and forecasting.
- Bid and Ask Endpoint: This powerful feature allows you to retrieve real-time bid and ask prices for various metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The API includes a currency conversion feature, enabling users to convert any amount from one currency to another, which is particularly useful for international transactions.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, allowing for in-depth analysis of price trends over time.
- Fluctuation Endpoint: Retrieve information about how currencies fluctuate on a day-to-day basis, which can help traders identify patterns and make informed decisions.
- Carat Endpoint: This endpoint 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 specific metal over a defined period, which is useful for identifying market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Access open, high, low, and close prices for a specific time period, providing a comprehensive view of market performance.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is valuable for those tracking industrial metals.
- API Key: Your unique API key is required for authentication and must be included in the API base URL's access_key parameter.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The API offers a comprehensive list of endpoints, each providing different functionalities to cater to various user needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals supported by the API.
- Gold Price India Endpoint: Retrieve the latest gold price in India using this dedicated endpoint, which is particularly useful for local investors.
- News Endpoint: Stay informed with the latest news articles related to various metals, helping users keep up with 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
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1748678414,
"base": "USD",
"date": "2025-05-31",
"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"
}
This response indicates a successful query, providing the latest exchange rates for various metals relative to USD.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999:
{
"success": true,
"timestamp": 1748592014,
"base": "USD",
"date": "2025-05-30",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This example shows how to retrieve historical rates, which can be critical for analyzing market trends over time.
Time-series Endpoint
Get exchange rates for a specific time period:
{
"success": true,
"timeseries": true,
"start_date": "2025-05-24",
"end_date": "2025-05-31",
"base": "USD",
"rates": {
"2025-05-24": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-05-26": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-31": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates over a specified time frame, allowing for detailed analysis of price movements.
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": 1748678414,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This example illustrates how to convert a specified amount of USD into troy ounces of gold, showcasing the API's versatility.
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-05-24",
"end_date": "2025-05-31",
"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"
}
This response provides insights into how prices have changed over a specified period, which is vital for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period:
{
"success": true,
"timestamp": 1748678414,
"base": "USD",
"date": "2025-05-31",
"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 a comprehensive view of market performance, allowing traders to analyze price movements throughout the trading day.
Bid/Ask Endpoint
Get current bid and ask prices for metals:
{
"success": true,
"timestamp": 1748678414,
"base": "USD",
"date": "2025-05-31",
"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"
}
This response provides the current bid and ask prices, which are essential for traders looking to execute buy or sell orders effectively.
Conclusion
In conclusion, the Metals-API offers a comprehensive suite of tools for accessing and analyzing precious metals pricing data, including gold, silver, platinum, and more. By leveraging the various endpoints and features available, developers can create powerful applications that provide real-time insights into market conditions. Whether you are looking to track the latest prices, analyze historical trends, or convert currencies, the Metals-API is an invaluable resource for anyone involved in the precious metals market.
For more information on how to get started with the Metals-API, visit the Metals-API Documentation for detailed guidance on implementation and usage. Additionally, explore the Metals-API Supported Symbols page to familiarize yourself with the various metal symbols available for querying.