Fetch Brass (BRASS) Historical Prices using this API

Introduction
In the rapidly evolving landscape of metal markets, the demand for accurate and timely data has never been more critical. Fetching historical prices for metals like Brass (BRASS) can empower businesses, investors, and developers to make informed decisions. With the advent of APIs such as the Metals-API, accessing historical price data has become seamless and efficient. This blog post will delve into the capabilities of the Metals-API, focusing on how to retrieve historical prices for Brass and other metals, while exploring the broader implications of digital transformation in the metal markets.
Metals-API Information
About Brass (BRASS)
Brass, an alloy primarily composed of copper and zinc, is widely used in various applications, from musical instruments to plumbing fixtures. As industries increasingly rely on data analytics and insights, the integration of smart technology in metal markets is transforming how businesses operate. The Metals-API stands at the forefront of this transformation, offering developers the tools needed to harness real-time metals data for innovative applications.
Technological advancements have enabled the collection and analysis of vast amounts of data, allowing stakeholders to gain insights into market trends and price fluctuations. The future of metal markets is poised for further innovation, with possibilities such as predictive analytics and automated trading systems becoming more prevalent. By leveraging the Metals-API, developers can create applications that not only fetch historical prices but also analyze trends and forecast future movements in the market.
API Description
The Metals-API is a powerful tool designed to provide real-time and historical data on various metals, including Brass. This API empowers developers to build next-generation applications that can access and analyze metals data efficiently. With its user-friendly interface and comprehensive documentation, the Metals-API simplifies the process of integrating metals data into applications.
One of the standout features of the Metals-API is its ability to deliver real-time exchange rate data, updated frequently based on the subscription plan. This ensures that users have access to the most current information, which is crucial for making timely decisions in the fast-paced metal markets. Additionally, the API offers a range of endpoints that cater to different data needs, from historical rates to bid and ask prices.
Key Features and Endpoints
The Metals-API provides a variety of endpoints, each designed to serve specific data 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, every 10 minutes, or even more frequently. This feature is essential for traders and businesses that require up-to-the-minute pricing information.
- Historical Rates Endpoint: Users can access historical rates for most currencies dating back to 2019. By appending a specific date to the API request, developers can retrieve historical pricing data for Brass and other metals, allowing for in-depth analysis of price trends over time.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices for metals, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert amounts from one metal to another or to/from USD. This is particularly useful for businesses operating in multiple currencies.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two dates of their choice, facilitating comprehensive trend analysis.
- Fluctuation Endpoint: Users can track how metal prices fluctuate on a day-to-day basis, providing valuable insights into market volatility.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat, catering to specific needs in the jewelry and precious metals markets.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest price for a specified date, which is crucial for understanding market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides open, high, low, and close prices for a specific date, offering a comprehensive view of market performance.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, allowing users to analyze long-term trends in the market.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data interpretation.
- Available Endpoints: The API comes with a comprehensive list of endpoints, each providing different functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, ensuring users have access to the latest data.
- Gold Price India Endpoint: Users can retrieve the latest gold price in India using this dedicated endpoint, catering to a specific market segment.
- News Endpoint: This feature allows users to access 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. This resource is invaluable for developers looking to integrate specific metal data into their applications.
API Endpoint Examples and Responses
Understanding the structure of API responses is crucial for effective integration. Below are examples of various API endpoints, showcasing the JSON responses you can expect:
Latest Rates Endpoint
Get real-time exchange rates for all available metals:
{
"success": true,
"timestamp": 1749970851,
"base": "USD",
"date": "2025-06-15",
"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": 1749884451,
"base": "USD",
"date": "2025-06-14",
"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-06-08",
"end_date": "2025-06-15",
"base": "USD",
"rates": {
"2025-06-08": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-10": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-15": {
"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": 1749970851,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
Track rate fluctuations between two dates:
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-08",
"end_date": "2025-06-15",
"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": 1749970851,
"base": "USD",
"date": "2025-06-15",
"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": 1749970851,
"base": "USD",
"date": "2025-06-15",
"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 metals data, including historical prices for Brass. By leveraging the various endpoints offered by the API, developers can create applications that provide real-time insights, track price fluctuations, and analyze historical trends. The integration of smart technology and data analytics into the metal markets is paving the way for a more informed and efficient trading environment.
As industries continue to evolve, the importance of accurate data cannot be overstated. The Metals-API not only simplifies the process of fetching historical prices but also empowers developers to innovate and create solutions that meet the demands of a dynamic market. For more information on how to get started, refer to the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available metals.
In summary, the future of metal markets is bright, driven by technological innovation and the transformative potential of real-time data. By utilizing the Metals-API, developers can stay ahead of the curve and contribute to the ongoing digital transformation of the industry.