Retrieve British Pound (GBP) Historical Prices using this API
Retrieve British Pound (GBP) Historical Prices using this API
In the rapidly evolving landscape of financial technology, the ability to access historical prices for currencies such as the British Pound (GBP) is crucial for developers and analysts alike. The Metals-API provides a robust solution for retrieving historical prices, enabling users to integrate real-time and historical data into their applications seamlessly. This blog post will delve into the capabilities of the Metals-API, focusing on how to effectively retrieve historical prices for GBP and other currencies, while exploring the innovative features that make this API a powerful tool for developers.
About Neodymium (ND)
Neodymium, a rare earth metal, plays a significant role in the digital transformation of metal markets. As industries increasingly rely on technological innovation and advancement, the demand for neodymium has surged, particularly in the production of high-strength magnets used in electric vehicles and renewable energy technologies. The integration of smart technology and data analytics in the metal markets has opened new avenues for understanding market dynamics and price fluctuations.
With the rise of data-driven decision-making, the ability to analyze historical price trends for metals like neodymium is essential. The Metals-API empowers developers to harness the power of real-time metals data, enabling them to build applications that provide insights into market trends and future possibilities. By leveraging the API's capabilities, developers can create tools that not only track current prices but also analyze historical data to forecast future trends.
API Description
The Metals-API is a comprehensive solution for accessing real-time and historical data on various metals and currencies. It provides developers with the tools necessary to build next-generation applications that require accurate and timely data. The API's capabilities include retrieving the latest rates, historical prices, and detailed market insights, all of which are essential for making informed financial decisions.
For more information on how to get started, visit the Metals-API Website or check out the Metals-API Documentation for detailed instructions on implementation.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs, allowing developers to access a wealth of information. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for various metals and currencies. Depending on your subscription plan, the API updates this data every 60 minutes, every 10 minutes, or even more frequently. This feature is particularly useful for applications 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 prices for GBP and other currencies, enabling them to analyze trends over time.
- Bid And Ask Endpoint: This powerful feature allows users to retrieve real-time bid and ask prices for various metals. Understanding the bid-ask spread is crucial for traders and analysts looking to make informed decisions based on market conditions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, which allows users to convert amounts from one currency to another. This feature is particularly useful for applications that require multi-currency support.
- Time-Series Endpoint: This endpoint enables users to query the API for daily historical rates between two specified dates. This is invaluable for conducting in-depth analyses of price movements over time.
- Fluctuation Endpoint: Users can track how currencies fluctuate on a day-to-day basis using this endpoint. It provides insights into market volatility, which can be critical for risk management strategies.
- Carat Endpoint: This feature allows users to retrieve information about gold rates by carat. It is particularly useful for jewelers and investors in the gold market.
- Lowest/Highest Price Endpoint: This endpoint allows users to query the API for the lowest and highest prices of a metal on a specific date, providing insights into market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: Users can access OHLC data for a specific time period, which is essential for technical analysis and trading strategies.
- 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 metals market.
- API Key: Each user is assigned a unique API key that must be included in requests to authenticate access to the API.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data presentation.
- Available Endpoints: The API features 14 endpoints, each designed to provide specific functionalities, making it a versatile tool for developers.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, ensuring users have access to the latest market information.
- News Endpoint: Users can 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 metals into their applications.
API Endpoint Examples and Responses
Understanding the structure of API responses is crucial for effective integration. Below are examples of various endpoints, showcasing their responses and the significance of each field.
Latest Rates Endpoint
Get real-time exchange rates for all available metals.
{
"success": true,
"timestamp": 1776384916,
"base": "USD",
"date": "2026-04-17",
"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"
}
In this response, the success field indicates whether the request was successful. The timestamp provides the time of the response, while base shows the base currency (USD in this case). The rates object contains the exchange rates for various metals, with each metal symbol as a key.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999.
{
"success": true,
"timestamp": 1776298516,
"base": "USD",
"date": "2026-04-16",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response provides historical rates for the specified date. The date field indicates the date for which the rates are applicable, and the rates object contains the exchange rates for that date.
Time-series Endpoint
Get exchange rates for a specific time period.
{
"success": true,
"timeseries": true,
"start_date": "2026-04-10",
"end_date": "2026-04-17",
"base": "USD",
"rates": {
"2026-04-10": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-04-12": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-04-17": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
This response illustrates how to retrieve rates over a specified time period. The start_date and end_date fields define the range, while the rates object contains the daily rates for each date within that range.
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": 1776384916,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response shows how to convert an amount from one currency to another. The query object details the conversion request, while the result field provides the converted amount.
Fluctuation Endpoint
Track rate fluctuations between two dates.
{
"success": true,
"fluctuation": true,
"start_date": "2026-04-10",
"end_date": "2026-04-17",
"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 rates have fluctuated over a specified period. The change and change_pct fields indicate the absolute and percentage changes in rates, respectively.
OHLC (Open/High/Low/Close) Endpoint
Get OHLC data for a specific time period.
{
"success": true,
"timestamp": 1776384916,
"base": "USD",
"date": "2026-04-17",
"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 essential data for traders, showing the opening, highest, lowest, and closing prices for each metal over the specified date.
Bid/Ask Endpoint
Get current bid and ask prices for metals.
{
"success": true,
"timestamp": 1776384916,
"base": "USD",
"date": "2026-04-17",
"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 for various metals, along with the spread, which is crucial for traders looking to execute buy or sell orders.
Conclusion
In conclusion, the Metals-API offers a powerful suite of tools for developers seeking to retrieve historical prices for the British Pound (GBP) and other currencies. By leveraging the various endpoints, developers can access real-time and historical data, enabling them to create applications that provide valuable insights into market trends and fluctuations. The API's comprehensive documentation and support for a wide range of symbols make it an invaluable resource for anyone working in the financial technology space.
For further exploration of the API's capabilities, be sure to check out the Metals-API Documentation and the Metals-API Supported Symbols page. With the right tools and knowledge, developers can harness the full potential of the Metals-API to drive innovation in their applications.