Access Graphite South America (SA-GR) Accessing Exchange Rates via JSON API in JSON Format
Access Graphite South America (SA-GR) Accessing Exchange Rates via JSON API in JSON Format
In today's rapidly evolving financial landscape, the ability to access real-time data is crucial for developers and businesses alike. One of the most significant advancements in this area is the Metals-API, which provides developers with the tools to retrieve exchange rates for various metals, including Gold (XAU), in JSON format. This blog post will delve into how to effectively utilize the Metals-API to access Gold exchange rates, offering sample API responses and integration tips to enhance your applications.
Metals-API Information
About Tellurium (TE)
As we explore the world of metals, it's essential to recognize the role of digital transformation in metal markets. The integration of smart technology and data analytics is revolutionizing how we interact with metal commodities. The Metals-API exemplifies this transformation, offering developers the ability to harness real-time data and insights. With a focus on technological innovation, the API empowers users to build next-generation applications that can analyze trends, forecast prices, and make informed decisions.
API Description
The Metals-API is a powerful tool that provides access to real-time and historical exchange rates for various metals. It allows developers to integrate metal pricing data into their applications seamlessly. The API's capabilities include retrieving the latest rates, historical data, and even fluctuations over time, making it an invaluable resource for financial applications. For more detailed information, you can visit the Metals-API Website or check out the Metals-API Documentation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data, updated based on your subscription plan. Depending on the plan, updates can occur every 60 minutes, every 10 minutes, or even more frequently.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date (YYYY-MM-DD) to your query. This feature is essential for analyzing trends over time.
- Bid And Ask Endpoint: Retrieve real-time bid and ask prices for metals, allowing for precise trading decisions.
- Convert Endpoint: This endpoint enables currency conversion, allowing users to convert amounts from one currency to another seamlessly.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, providing insights into price movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, which is crucial for understanding market dynamics.
- Carat Endpoint: Retrieve information about Gold rates by Carat, catering to specific market needs.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for a specified date, which can help in making informed trading decisions.
- Open/High/Low/Close (OHLC) Price Endpoint: Access OHLC data for a specific time period, providing a comprehensive view of price movements.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is vital for long-term analysis.
- API Key: Your unique API key is required to access the API, ensuring secure and authorized usage.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in JSON format.
- Available Endpoints: The Metals-API features 14 endpoints, each providing different functionalities tailored to various needs.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals.
- Intraday Endpoint: Query intraday exchange rate data for a single symbol, which is essential for high-frequency trading applications.
List of Symbols
The 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
To get real-time exchange rates for all available metals, you can use the Latest Rates Endpoint. Below is an example response:
{
"success": true,
"timestamp": 1788797246,
"base": "USD",
"date": "2026-09-07",
"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 using the Historical Rates Endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1788710846,
"base": "USD",
"date": "2026-09-06",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-series Endpoint
To get exchange rates for a specific time period, you can utilize the Time-Series Endpoint. Below is an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-08-31",
"end_date": "2026-09-07",
"base": "USD",
"rates": {
"2026-08-31": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-09-02": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-09-07": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
The Convert Endpoint allows you to convert any amount from one metal to another or to/from USD. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1788797246,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates using the Fluctuation Endpoint. Below is an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-08-31",
"end_date": "2026-09-07",
"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
To get OHLC data for a specific time period, you can use the OHLC Price Endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1788797246,
"base": "USD",
"date": "2026-09-07",
"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
To get current bid and ask prices for metals, you can use the Bid/Ask Endpoint. Below is an example response:
{
"success": true,
"timestamp": 1788797246,
"base": "USD",
"date": "2026-09-07",
"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
In conclusion, the Metals-API offers a robust solution for developers looking to access real-time and historical exchange rates for metals like Gold (XAU). By leveraging the various endpoints, developers can create applications that provide valuable insights into market trends, facilitate trading decisions, and enhance financial analysis. With features such as the Latest Rates Endpoint, Historical Rates Endpoint, and the Convert Endpoint, the API is designed to meet the diverse needs of the financial sector.
For further exploration of the API's capabilities, be sure to check the Metals-API Documentation and the Metals-API Supported Symbols page. The integration of this API into your applications can significantly enhance your ability to analyze and respond to market changes effectively.