Get Yellow Brass (Y-BRASS) Historical Prices with Python API Integration

Get Yellow Brass (Y-BRASS) Historical Prices with Python API Integration
In the rapidly evolving landscape of metal markets, the demand for accurate and timely data is paramount. The Yellow Brass (Y-BRASS) symbol represents a significant component in the brass market, and accessing its historical prices can provide invaluable insights for developers, traders, and analysts alike. By leveraging the capabilities of the Metals-API, developers can seamlessly integrate real-time and historical pricing data into their applications, enabling informed decision-making and strategic planning.
Metals-API Information
The Metals-API is a powerful tool designed to provide developers with access to real-time and historical metal prices. This API is particularly beneficial for those involved in trading, investment, and market analysis, as it offers a comprehensive suite of features that cater to various needs. With its focus on technological innovation and data analytics, Metals-API empowers users to harness the potential of real-time metals data.
About Brass (BRASS)
Brass, an alloy primarily composed of copper and zinc, is widely used in various applications, from plumbing fixtures to musical instruments. The digital transformation in metal markets has led to significant advancements in how brass prices are monitored and analyzed. With the integration of smart technology and data analytics, stakeholders can now access insights that were previously difficult to obtain.
Technological innovations have paved the way for enhanced data analytics, allowing for a deeper understanding of market trends and price fluctuations. As the demand for brass continues to grow, the ability to track historical prices and analyze trends becomes increasingly important. The future of brass pricing will likely see further integration of smart technology, enabling real-time data access and predictive analytics.
API Description
The Metals-API is designed to provide developers with a robust set of tools for accessing metal prices. Its capabilities include real-time data retrieval, historical price access, and various endpoints that cater to different needs. By utilizing this API, developers can build next-generation applications that leverage the power of real-time metals data.
For comprehensive documentation on how to utilize the Metals-API, visit the Metals-API Documentation. This resource provides detailed information on the various endpoints available, including their functionalities and usage examples.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different data retrieval 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 crucial for traders who need to stay updated on price movements.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. By appending a specific date to the API request, users can access historical pricing data, which is essential for trend analysis and forecasting.
- Bid And Ask Endpoint: This powerful feature enables users to retrieve real-time bid and ask prices, 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 currency to another. This feature is particularly useful for traders dealing in multiple currencies.
- Time-Series Endpoint: Users can query the API for daily historical rates between two dates of their choice, facilitating in-depth analysis of price movements over time.
- Fluctuation Endpoint: This endpoint provides information about how currencies fluctuate on a day-to-day basis, helping users understand market volatility.
- Carat Endpoint: Users can retrieve information about gold rates by carat, which is essential for jewelers and gold traders.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API to get the lowest and highest price for a specified date, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access the open, high, low, and close prices for a specific date, providing a comprehensive view of market performance.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols dating back to 2008, which is crucial for those involved in trading on the London Metal Exchange.
- API Key: Each user is assigned a unique API key that must be included in API requests to authenticate access.
- API Response: The API delivers exchange rates relative to USD by default, ensuring consistency in data representation.
- Available Endpoints: The Metals-API offers a variety of endpoints, each providing different functionalities tailored to user needs.
- Supported Symbols Endpoint: This endpoint returns all available currencies, allowing users to stay updated on the latest symbols supported by the API.
- Gold Price India Endpoint: Users can retrieve the latest gold price in India using this dedicated endpoint, which is essential for local traders.
- News Endpoint: The API allows users to 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. This resource is invaluable for developers looking to integrate specific metal data into their applications.
API Endpoint Examples and Responses
Understanding the API responses is crucial for effective integration. Below are examples of various API endpoints and their corresponding JSON responses:
Latest Rates Endpoint
{
"success": true,
"timestamp": 1749556829,
"base": "USD",
"date": "2025-06-10",
"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 request, providing the latest exchange rates for various metals relative to USD. Each metal symbol is associated with its current price per troy ounce.
Historical Rates Endpoint
{
"success": true,
"timestamp": 1749470429,
"base": "USD",
"date": "2025-06-09",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for a specific date, allowing users to analyze past pricing trends. The data is crucial for understanding market movements over time.
Time-series Endpoint
{
"success": true,
"timeseries": true,
"start_date": "2025-06-03",
"end_date": "2025-06-10",
"base": "USD",
"rates": {
"2025-06-03": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2025-06-05": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2025-06-10": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This endpoint allows users to track price changes over a specified period, providing valuable insights into market dynamics and trends.
Convert Endpoint
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1749556829,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
The Convert Endpoint is particularly useful for traders who need to convert amounts between different metals or currencies. This response indicates the conversion of 1000 USD to its equivalent in gold (XAU).
Fluctuation Endpoint
{
"success": true,
"fluctuation": true,
"start_date": "2025-06-03",
"end_date": "2025-06-10",
"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 endpoint provides insights into how metal prices fluctuate over a specified period, which is essential for traders looking to capitalize on market movements.
OHLC (Open/High/Low/Close) Price Endpoint
{
"success": true,
"timestamp": 1749556829,
"base": "USD",
"date": "2025-06-10",
"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"
}
The OHLC endpoint provides a comprehensive view of market performance for a specific date, allowing users to analyze price movements throughout the trading day.
Bid/Ask Endpoint
{
"success": true,
"timestamp": 1749556829,
"base": "USD",
"date": "2025-06-10",
"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 endpoint provides current bid and ask prices, which are essential for traders looking to make informed buying and selling decisions.
Conclusion
In conclusion, the Yellow Brass (Y-BRASS) symbol represents a vital aspect of the metal market, and accessing its historical prices through the Metals-API can significantly enhance decision-making capabilities for developers and traders alike. The API's extensive features, including real-time data access, historical pricing, and various endpoints, empower users to build sophisticated applications that leverage the power of metals data.
As the metal markets continue to evolve, staying informed about pricing trends and fluctuations will be crucial for success. By utilizing the Metals-API Documentation, developers can gain a deeper understanding of how to effectively integrate this data into their applications, ensuring they remain competitive in a dynamic market.
For those looking to explore the full range of metal symbols and their specifications, the Metals-API Supported Symbols page is an invaluable resource. By harnessing the capabilities of the Metals-API, developers can unlock the potential of real-time metals data and drive innovation in their applications.