How to Get Real-Time Patna Gold 18k (PATN-18k) Prices for Your Financial App with Metals-API
Introduction
In today's fast-paced financial landscape, accessing real-time market data is crucial for developers building financial applications. One of the most sought-after commodities is gold, specifically the 18k gold price, represented as PATN-18k in the Patna market. With the help of Metals-API, developers can seamlessly integrate real-time gold prices into their applications. This blog post will guide you through the process of accessing real-time Patna Gold 18k (PATN-18k) prices using the Metals-API, exploring its features, capabilities, and practical applications.
Understanding Gold (XAU)
Gold has long been a symbol of wealth and stability, making it a popular choice for investors and traders alike. The digital transformation in precious metals trading has opened new avenues for data analytics and market insights. By leveraging technology integration, developers can create innovative applications that enhance price discovery and provide digital asset solutions. The Metals-API serves as a bridge between developers and the dynamic world of gold trading, offering a suite of endpoints that deliver real-time data and historical insights.
API Description
The Metals-API is a powerful tool designed to provide developers with real-time and historical data on precious metals, including gold (XAU). This API empowers developers to build next-generation applications that require accurate and timely metals data. With its innovative features, the Metals-API enables seamless integration into various financial applications, from trading platforms to investment analysis tools.
For more information, you can visit the Metals-API Documentation, which provides comprehensive guidance on how to utilize the API effectively.
Key Features and Endpoints
The Metals-API offers a variety of endpoints that cater to different needs, enabling developers to access real-time and historical data efficiently. Here are some of the key features:
- Latest Rates Endpoint: This endpoint provides real-time exchange rate data for gold and other metals, updated every 60 minutes, 10 minutes, or even more frequently, depending on your subscription plan.
- Historical Rates Endpoint: Access historical rates dating back to 2019 by appending a specific date (YYYY-MM-DD) to the endpoint. This feature is invaluable for analyzing trends and making informed decisions.
- Bid and Ask Endpoint: Retrieve real-time bid and ask prices for gold and other metals, allowing traders to make timely decisions based on current market conditions.
- Convert Endpoint: This endpoint allows you to convert amounts from one currency to another, facilitating transactions across different currencies.
- Time-Series Endpoint: Query for daily historical rates between two dates of your choice, providing insights into price movements over time.
- Fluctuation Endpoint: Track how currencies fluctuate on a day-to-day basis, helping you understand market volatility.
- Carat Endpoint: Retrieve information about gold rates by carat, which is essential for jewelers and consumers alike.
- Lowest/Highest Price Endpoint: Get the lowest and highest prices for gold over a specified period, aiding in market analysis.
- Open/High/Low/Close (OHLC) Price Endpoint: Access OHLC data for a specific time period, which is crucial for technical analysis.
- Historical LME Endpoint: Access historical rates for LME symbols dating back to 2008, providing a broader context for market analysis.
- API Key: Your unique API key is required for authentication and must be included in the API base URL's access_key parameter.
- API Response: The API delivers exchange rates relative to USD, ensuring consistency in data representation.
- Available Endpoints: The Metals-API offers 14 endpoints, each providing different functionalities tailored to various use cases.
- Supported Symbols Endpoint: Access a constantly updated list of all available currencies and metals.
- Intraday Endpoint: Query intraday exchange rate data for a single symbol, perfect for high-frequency trading applications.
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 essential for effective integration. Below are examples of various API endpoints along with their expected responses.
Latest Rates Endpoint
The Latest Rates Endpoint allows you to get real-time exchange rates for all available metals. Here’s an example response:
{
"success": true,
"timestamp": 1785975625,
"base": "USD",
"date": "2026-08-06",
"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 "rates" object contains the current price of various metals, including gold (XAU), expressed in troy ounces.
Historical Rates Endpoint
Access historical exchange rates for any date since 1999. Here’s an example response:
{
"success": true,
"timestamp": 1785889225,
"base": "USD",
"date": "2026-08-05",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
This response shows the historical rates for gold and other metals on a specific date, allowing for trend analysis.
Time-Series Endpoint
The Time-Series Endpoint enables you to get exchange rates for a specific time period. Here’s an example response:
{
"success": true,
"timeseries": true,
"start_date": "2026-07-30",
"end_date": "2026-08-06",
"base": "USD",
"rates": {
"2026-07-30": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-08-01": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-08-06": {
"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 price trends 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": 1785975625,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
This response indicates the conversion of 1000 USD to gold (XAU), providing both the conversion rate and the resulting amount in troy ounces.
Fluctuation Endpoint
The Fluctuation Endpoint tracks rate fluctuations between two dates. Here’s an example response:
{
"success": true,
"fluctuation": true,
"start_date": "2026-07-30",
"end_date": "2026-08-06",
"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 the price of gold and other metals fluctuated over the specified period, including both absolute and percentage changes.
OHLC (Open/High/Low/Close) Endpoint
The OHLC Endpoint provides open, high, low, and close data for a specific time period. Here’s an example response:
{
"success": true,
"timestamp": 1785975625,
"base": "USD",
"date": "2026-08-06",
"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 a comprehensive view of the price movements for gold and other metals during the specified period, essential for traders and analysts.
Bid/Ask Endpoint
The Bid/Ask Endpoint allows you to get current bid and ask prices for metals. Here’s an example response:
{
"success": true,
"timestamp": 1785975625,
"base": "USD",
"date": "2026-08-06",
"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 gold and other metals, along with the spread, which is crucial for traders looking to execute buy or sell orders.
Conclusion
Accessing real-time Patna Gold 18k (PATN-18k) prices is now more accessible than ever with the Metals-API. By leveraging its comprehensive suite of endpoints, developers can build robust financial applications that provide accurate and timely data. From the Latest Rates Endpoint to the Bid/Ask Endpoint, each feature is designed to empower developers with the tools they need to succeed in the competitive world of precious metals trading.
For further exploration, refer to the Metals-API Documentation for detailed guidance on implementation and usage. Additionally, the Metals-API Supported Symbols page offers a comprehensive list of available symbols, ensuring you have all the information needed to make informed decisions.
By integrating the Metals-API into your applications, you can harness the power of real-time data, enabling you to stay ahead in the ever-evolving financial landscape.