Retrieve Turkish Lira (TRY) Historical Prices with this API
Retrieve Turkish Lira (TRY) Historical Prices with this API
The Turkish Lira (TRY) has been a focal point in the financial markets, especially in recent years due to its volatility and the economic changes in Turkey. For developers looking to retrieve historical prices of the Turkish Lira, the Metals-API offers a robust solution. This API not only provides real-time exchange rates but also allows users to access historical data dating back to 2019. In this blog post, we will explore the various features of the Metals-API, its capabilities, and how it can be utilized to retrieve historical prices of the Turkish Lira effectively.
About Turkish Lira (TRY)
The Turkish Lira is the official currency of Turkey and has undergone significant transformations over the years. As the country navigates through economic challenges, the Lira's value has fluctuated, making it essential for traders and developers to have access to accurate and timely data. The digital transformation in metal markets has paved the way for technological innovations that enhance data analytics and insights. By integrating smart technology, developers can leverage the Metals-API to gain a deeper understanding of currency trends and make informed decisions.
API Description
The Metals-API is designed to empower developers by providing access to real-time metals data, including exchange rates for various currencies, including the Turkish Lira. This API stands out due to its innovative approach to data delivery, allowing users to build next-generation applications that require accurate and timely financial information. With features such as the ability to retrieve historical rates, bid and ask prices, and currency conversion, the Metals-API is a comprehensive tool for anyone working in the financial sector.
For more information, you can visit the Metals-API Website or check the Metals-API Documentation for detailed guidance on how to implement these features.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for the Turkish Lira and other currencies. Depending on your subscription plan, the API updates this data every 60 minutes or even more frequently. This feature is crucial for developers who need the most current rates for trading or analysis.
- Historical Rates Endpoint: Users can access historical rates for the Turkish Lira dating back to 2019. By appending a specific date in the format YYYY-MM-DD, developers can query the API to retrieve past exchange rates, which is essential for trend analysis and forecasting.
- Bid And Ask Endpoint: This feature allows users to retrieve real-time bid and ask prices for the Turkish Lira. Understanding the spread between these prices is vital for traders looking to make informed decisions.
- Convert Endpoint: The Metals-API includes a currency conversion endpoint, enabling users to convert amounts from one currency to another, including from Turkish Lira to other currencies or vice versa. This is particularly useful for applications that require real-time conversion rates.
- Time-Series Endpoint: This endpoint allows users to query the API for daily historical rates between two specified dates. This feature is beneficial for analyzing trends over time and understanding how the Turkish Lira has performed against other currencies.
- Fluctuation Endpoint: Users can track how the Turkish Lira fluctuates on a day-to-day basis using this endpoint. By providing information about rate changes over a specified period, developers can gain insights into market volatility.
- Carat Endpoint: This endpoint provides information about gold rates by carat, which can be relevant for developers working in the precious metals market.
- Lowest/Highest Price Endpoint: Users can query the API to get the lowest and highest price of the Turkish Lira over a specified period, which is essential for understanding market extremes.
- Open/High/Low/Close (OHLC) Price Endpoint: This endpoint allows users to retrieve the open, high, low, and close prices for the Turkish Lira, providing a comprehensive view of its performance over time.
- Historical LME Endpoint: This endpoint provides access to historical rates for LME symbols, dating back to 2008, which can be useful for developers interested in metals trading.
- API Key: Each user is assigned a unique API key that must be included in the API requests to authenticate and authorize access.
- API Response: The Metals-API delivers exchange rates relative to USD by default, ensuring consistency in data representation.
- Available Endpoints: The Metals-API includes 14 different endpoints, each designed to provide specific functionalities that cater to various user needs.
- Supported Symbols Endpoint: This endpoint returns a constantly updated list of all available currencies, including the Turkish Lira, making it easy for developers to find the symbols they need.
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 developers. Below are examples of how to use various endpoints effectively:
Latest Rates Endpoint
To get real-time exchange rates for the Turkish Lira, you can use the latest rates endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1783901599,
"base": "USD",
"date": "2026-07-13",
"rates": {
"TRY": 8.45,
"XAU": 0.000482,
"XAG": 0.03815
},
"unit": "per troy ounce"
}
Historical Rates Endpoint
Accessing historical exchange rates for the Turkish Lira can be done by specifying a date. Here’s an example response:
{
"success": true,
"timestamp": 1783815199,
"base": "USD",
"date": "2026-07-12",
"rates": {
"TRY": 8.50,
"XAU": 0.000485,
"XAG": 0.03825
},
"unit": "per troy ounce"
}
Time-series Endpoint
To analyze exchange rates over a specific time period, the time-series endpoint can be utilized. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-07-06",
"end_date": "2026-07-13",
"base": "USD",
"rates": {
"2026-07-06": {
"TRY": 8.55,
"XAU": 0.000485
},
"2026-07-08": {
"TRY": 8.52,
"XAU": 0.000483
},
"2026-07-13": {
"TRY": 8.45,
"XAU": 0.000482
}
},
"unit": "per troy ounce"
}
Convert Endpoint
The convert endpoint allows you to convert amounts from one currency to another. Here’s an example response:
{
"success": true,
"query": {
"from": "USD",
"to": "TRY",
"amount": 1000
},
"info": {
"timestamp": 1783901599,
"rate": 8.45
},
"result": 8450,
"unit": "TRY"
}
Fluctuation Endpoint
To track fluctuations in the Turkish Lira's value, you can use the fluctuation endpoint. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-06",
"end_date": "2026-07-13",
"base": "USD",
"rates": {
"TRY": {
"start_rate": 8.55,
"end_rate": 8.45,
"change": -0.10,
"change_pct": -1.17
}
},
"unit": "per troy ounce"
}
OHLC (Open/High/Low/Close) Endpoint
For detailed market analysis, the OHLC endpoint provides open, high, low, and close prices. Here’s an example response:
{
"success": true,
"timestamp": 1783901599,
"base": "USD",
"date": "2026-07-13",
"rates": {
"TRY": {
"open": 8.50,
"high": 8.55,
"low": 8.40,
"close": 8.45
}
},
"unit": "per troy ounce"
}
Bid/Ask Endpoint
To get the current bid and ask prices for the Turkish Lira, you can use the bid/ask endpoint. Here’s an example response:
{
"success": true,
"timestamp": 1783901599,
"base": "USD",
"date": "2026-07-13",
"rates": {
"TRY": {
"bid": 8.44,
"ask": 8.46,
"spread": 0.02
}
},
"unit": "per troy ounce"
}
Conclusion
In conclusion, the Metals-API provides a comprehensive solution for developers looking to retrieve historical prices of the Turkish Lira. With its extensive range of features, including real-time rates, historical data, and various endpoints for conversion and fluctuation tracking, the API is an invaluable tool for anyone in the financial sector. By leveraging the capabilities of the Metals-API, developers can create applications that not only meet the demands of today’s market but also anticipate future trends.
For further exploration, visit the Metals-API Website and dive into the Metals-API Documentation for detailed implementation guidance. Don’t forget to check the Metals-API Supported Symbols page for a complete list of available currencies.