How to Get Brass (BRASS) prices using this API for your application

Introduction
In the rapidly evolving landscape of digital finance, the ability to access real-time data is crucial for developers and businesses alike. One such valuable asset is the price of Brass (BRASS), a metal that plays a significant role in various industries. This blog post will delve into how to get Brass prices using the Metals-API, exploring its capabilities, features, and how it empowers developers to create innovative applications.
Metals-API Information
About Brass (BRASS)
Brass, an alloy primarily composed of copper and zinc, is widely used in manufacturing, construction, and various engineering applications. As industries increasingly embrace digital transformation, the demand for accurate and real-time pricing data for metals like Brass has surged. The integration of smart technology and data analytics into metal markets is revolutionizing how businesses operate, providing insights that were previously unattainable.
Technological advancements have enabled the development of APIs that deliver real-time data, allowing developers to build applications that can analyze market trends, forecast prices, and optimize inventory management. The Metals-API stands at the forefront of this transformation, offering a comprehensive solution for accessing metal prices, including Brass.
API Description
The Metals-API is a powerful tool designed to provide developers with real-time and historical data on metal prices. This API is particularly beneficial for applications that require up-to-date pricing information, enabling businesses to make informed decisions based on current market conditions. With its robust features, the Metals-API empowers developers to create next-generation applications that leverage real-time metals data.
For those looking to integrate Brass pricing into their applications, the Metals-API offers a variety of endpoints that cater to different needs. From retrieving the latest rates to accessing historical data, the API provides a comprehensive suite of tools for developers.
Key Features and Endpoints
The Metals-API includes several key features that enhance its 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 allows developers to access the most current Brass prices at any time.
- Historical Rates Endpoint: Access historical rates for Brass 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 feature enables you to retrieve real-time bid and ask prices for Brass, providing insights into market liquidity and pricing dynamics.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, allowing users to convert any amount from one metal to another or to/from USD. This is particularly useful for businesses operating in multiple currencies.
- Time-Series Endpoint: Query the API for daily historical rates between two dates of your choice, enabling detailed analysis of price movements over time.
- Fluctuation Endpoint: Track how Brass prices fluctuate on a day-to-day basis, providing insights into market volatility and trends.
- Carat Endpoint: Retrieve information about Gold rates by Carat, which can be useful for applications that require precise measurements.
- Lowest/Highest Price Endpoint: Query the API to get the lowest and highest price of Brass over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Access open, high, low, and close prices for Brass, which are critical for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, allowing for comprehensive market analysis.
- API Key: Your unique API key is essential for accessing the Metals-API, ensuring secure and authorized usage.
- API Response: The API delivers exchange rates relative to USD by default, with all data returned in a structured JSON format.
- Available Endpoints: The Metals-API provides a constantly updated list of all available currencies and metals, ensuring developers have access to the latest information.
- Gold Price India Endpoint: Retrieve the latest gold price in India, which can be relevant for applications focused on regional markets.
- News Endpoint: Get the latest news articles related to various metals, keeping users informed about market developments.
List of Symbols
The Metals-API provides access to a comprehensive range of metal symbols, including Brass. 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. Here’s an example response:
{
"success": true,
"timestamp": 1746417618,
"base": "USD",
"date": "2025-05-05",
"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 that the API successfully retrieved the latest rates, with the base currency set to USD. The rates for various metals, including Brass, are provided in troy ounces.
Historical Rates Endpoint
Accessing historical exchange rates for any date since 1999 can be done through the Historical Rates Endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1746331218,
"base": "USD",
"date": "2025-05-04",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for the specified date, allowing developers to analyze past pricing trends for Brass and other metals.
Time-series Endpoint
The Time-Series Endpoint allows you to get exchange rates for a specific time period. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2025-04-28",
"end_date": "2025-05-05",
"base": "USD",
"rates": {
"2025-04-28": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-04-30": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-05-05": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response provides daily rates for the specified date range, enabling developers to analyze trends and fluctuations in Brass prices over time.
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": 1746417618,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates a successful conversion from USD to Brass, providing the converted amount in troy ounces.
Fluctuation Endpoint
Using the Fluctuation Endpoint, you can track rate fluctuations between two dates. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2025-04-28",
"end_date": "2025-05-05",
"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 detailed information about how Brass prices fluctuated over the specified period, including percentage changes and absolute values.
OHLC (Open/High/Low/Close) Endpoint
The OHLC Endpoint allows you to get open, high, low, and close prices for Brass over a specific time period. Here’s an example response:
{
"success": true,
"timestamp": 1746417618,
"base": "USD",
"date": "2025-05-05",
"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 response provides critical pricing information that can be used for technical analysis and trading strategies.
Bid/Ask Endpoint
The Bid/Ask Endpoint provides current bid and ask prices for Brass. Here’s an example response:
{
"success": true,
"timestamp": 1746417618,
"base": "USD",
"date": "2025-05-05",
"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 valuable information for traders, indicating the current market conditions for Brass.
Conclusion
In conclusion, the Metals-API is an invaluable resource for developers looking to integrate real-time Brass pricing into their applications. With its extensive range of features and endpoints, the API provides the tools necessary to access up-to-date market data, analyze trends, and make informed decisions. By leveraging the capabilities of the Metals-API, developers can create innovative applications that harness the power of real-time metals data.
For more information on how to get started with the Metals-API, visit the Metals-API Documentation and explore the various endpoints available. Whether you are interested in historical rates, bid/ask prices, or currency conversion, the Metals-API has you covered. Don't forget to check out the Metals-API Supported Symbols page for a complete list of available metals and their specifications.
As the digital landscape continues to evolve, staying informed about market trends and pricing data will be crucial for success in the metals industry. Embrace the future of metal markets with the Metals-API and unlock the potential of real-time data for your applications.