The Easiest Way to Get Philippine Peso (PHP) Historical Rates Using Online APIs
The Easiest Way to Get Philippine Peso (PHP) Historical Rates Using Online APIs
In today's digital age, accessing historical currency rates has become increasingly essential for developers and financial analysts alike. One of the most efficient ways to obtain Philippine Peso (PHP) historical rates is through the Metals-API. This powerful API provides real-time and historical data for various metals and currencies, enabling developers to create innovative applications that leverage this information. In this blog post, we will explore how to retrieve historical prices for metals, including the PHP, using the Metals-API, along with detailed examples, parameters, and data formats.
About Tellurium (TE)
While our focus is on the Philippine Peso, it's worth noting the broader context of metals in the market, particularly Tellurium (TE). The digital transformation in metal markets has been profound, driven by technological innovations and advancements in data analytics. The integration of smart technologies has enabled real-time tracking of metal prices, providing insights that were previously unattainable.
As we look to the future, the potential for further advancements in this field is immense. The ability to analyze data trends and fluctuations in metal prices can empower developers to create applications that not only track prices but also predict market movements. This transformative potential is at the heart of what the Metals-API offers.
API Description
The Metals-API is a comprehensive solution for accessing metals prices and currency conversion data. It provides a suite of endpoints that allow developers to retrieve the latest rates, historical data, and even perform conversions between different metals and currencies. By leveraging this API, developers can build next-generation applications that require real-time data and historical insights.
One of the key features of the Metals-API is its ability to deliver data in a structured JSON format, making it easy for developers to integrate into their applications. The API supports a wide range of symbols, including precious metals like Gold (XAU), Silver (XAG), and others, allowing for versatile applications in financial analysis and trading.
Key Features and Endpoints
The Metals-API offers several endpoints that cater to different needs:
- Latest Rates Endpoint: Depending on your subscription plan, this endpoint returns real-time exchange rate data updated every 60 minutes or even more frequently. This is crucial for applications that require the most current pricing information.
- Historical Rates Endpoint: Historical rates are available for most currencies dating back to 2019. You can query the Metals-API for historical rates by appending a date in the format YYYY-MM-DD to the endpoint.
- Bid And Ask Endpoint: This powerful feature enables you to retrieve real-time Bid and Ask prices, which are essential for traders looking to make informed decisions.
- Convert Endpoint: The API includes a currency conversion endpoint, allowing you to convert any amount from one currency to another, which is particularly useful for financial applications.
- Time-Series Endpoint: This endpoint allows you to query the API for daily historical rates between two dates of your choice, providing a comprehensive view of price trends over time.
- Fluctuation Endpoint: You can retrieve information about how currencies fluctuate on a day-to-day basis, which is vital for understanding market volatility.
- Carat Endpoint: This feature allows you to retrieve information about Gold rates by Carat, which is particularly useful for jewelers and precious metal traders.
- Lowest/Highest Price Endpoint: This endpoint allows you to query the API to get the lowest and highest price for a specified date range.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint provides the open, high, low, and close prices for a specific date, which is essential for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, which is crucial for traders dealing with industrial metals.
- API Key: Your API Key is a unique identifier that you must include in your requests to authenticate your access to the API.
- API Response: The Metals-API delivers exchange rates relative to USD by default, and all data is returned in a structured JSON format.
- Available Endpoints: The API comes with 14 endpoints, each providing different functionalities, ensuring that developers have the tools they need to build robust applications.
- Supported Symbols Endpoint: This constantly updated endpoint returns all available currencies and metals, allowing developers to stay informed about the latest offerings.
- News Endpoint: Retrieve the latest news articles related to various metals, which can be useful for market analysis and staying updated on industry trends.
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.
API Endpoint Examples and Responses
Understanding how to interact with the Metals-API is crucial for effective implementation. Below are examples of various endpoints along with their expected JSON responses.
Latest Rates Endpoint
To get real-time exchange rates for all available metals, you can use the following endpoint:
GET https://metals-api.com/api/latest?access_key=YOUR_API_KEY
Example Response:
{
"success": true,
"timestamp": 1772896072,
"base": "USD",
"date": "2026-03-07",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
To access historical exchange rates for any date since 1999, use the following endpoint:
GET https://metals-api.com/api/historical?access_key=YOUR_API_KEY&date=YYYY-MM-DD
Example Response:
{
"success": true,
"timestamp": 1772809672,
"base": "USD",
"date": "2026-03-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, use the time-series endpoint:
GET https://metals-api.com/api/timeseries?access_key=YOUR_API_KEY&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Example Response:
{
"success": true,
"timeseries": true,
"start_date": "2026-02-28",
"end_date": "2026-03-07",
"base": "USD",
"rates": {
"2026-02-28": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-03-02": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-03-07": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Convert Endpoint
To convert any amount from one metal to another or to/from USD, use the convert endpoint:
GET https://metals-api.com/api/convert?access_key=YOUR_API_KEY&from=USD&to=XAU&amount=1000
Example Response:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1772896072,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Fluctuation Endpoint
To track rate fluctuations between two dates, use the fluctuation endpoint:
GET https://metals-api.com/api/fluctuation?access_key=YOUR_API_KEY&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Example Response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-02-28",
"end_date": "2026-03-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, use the following endpoint:
GET https://metals-api.com/api/open-high-low-close?access_key=YOUR_API_KEY&date=YYYY-MM-DD
Example Response:
{
"success": true,
"timestamp": 1772896072,
"base": "USD",
"date": "2026-03-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, use the following endpoint:
GET https://metals-api.com/api/bid-ask?access_key=YOUR_API_KEY
Example Response:
{
"success": true,
"timestamp": 1772896072,
"base": "USD",
"date": "2026-03-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 provides a robust and versatile solution for accessing historical rates and real-time data for metals and currencies, including the Philippine Peso. By utilizing the various endpoints, developers can create applications that not only track prices but also analyze trends and fluctuations in the market. The API's structured JSON responses make it easy to integrate into applications, while its extensive documentation ensures that developers have the resources they need to succeed.
For more information on how to get started with the Metals-API, check out the Metals-API Documentation and explore the Metals-API Supported Symbols for a comprehensive list of available options. With the right tools and knowledge, you can harness the power of real-time metals data to drive your applications forward.