Precious metals rates and currency conversion JSON API



  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

GET https://metals-api.com/api/latest

{
  "base": USD, 
  "date": "2024-11-22",
  "rates": {
      "Silver(USDXAG)": 31.2561 
      "Gold(USDXAU)": 2715.9000 
      "Palladium(USDXPD)": 1010.0000 
      "Platinum(USDXPT)": 965.4839 
      "Rhodium(USDXRH)": 4600.0000 
      "Ruthenium(USDRUTH)": 478.0000 
      "Copper(USDXCU)": 0.2547 
      "Aluminum(USDALU)": 0.0816 
      "Nickel(USDNI)": 0.4854 
      "Zinc(USDZNC)": 0.0922 
      "Tin(USDTIN)": 0.8914 
      "Iridium(USDIRD)": 4600.0000 
      "Lead(USDLEAD)": 0.0617 
      "Iron Ore(USDIRON)": 0.0032 
      "LBMA Gold Am(USDLBXAUAM)": 2669.7000 
      "LBMA Gold Pm(USDLBXAUPM)": 2665.3000 
      "LBMA Silver(USDLBXAG)": 31.0700 
      "LBMA Platinum Am(USDLBXPTAM)": 956.0000 
      "LBMA Platinum Pm(USDLBXPTPM)": 960.0000 
      "LBMA Palladium Am(USDLBXPDAM)": 1024.0000 
      "LBMA Palladium Pm(USDLBXPDPM)": 1028.0000 
      "LME Aluminium(USDLME-ALU)": 0.0805 
      "LME Copper(USDLME-XCU)": 0.2746 
      "LME Zinc(USDLME-ZNC)": 0.0922 
      "LME Nickel(USDLME-NI)": 0.4855 
      "LME Lead(USDLME-LEAD)": 0.0617 
      "LME Tin(USDLME-TIN)": 0.8875 
      "Uranium(USDURANIUM)": 78.6000 
      "LME Steel Scrap CFR Turkey(USDSTEEL-SC)": 0.0110 
      "LME Steel Rebar FOB Turkey(USDSTEEL-RE)": 0.0180 
      "LME Steel HRC FOB China(USDSTEEL-HR)": 0.0151 
      "Bronze(USDBRONZE)": 0.1646 
      "Magnesium(USDMG)": 0.0845 
      "Osmium(USDOSMIUM)": 50150.6966 
      "Rhenium(USDRHENIUM)": 75.5716 
      "Tungsten(USDTUNGSTEN)": 0.0104 
      "Lithium(USDLITHIUM)": 0.2657 
      "Ahmedabad Gold(USDXAU-AHME)": 2647.9802 
      "Bangalore Gold(USDXAU-BANG)": 2647.9802 
      "Chennai Gold(USDXAU-CHEN)": 2651.3376 
      "Coimbatore Gold(USDXAU-COIM)": 2646.3015 
      "Delhi Gold(USDXAU-DELH)": 2651.3376 
      "Hyderabad Gold(USDXAU-HYDE)": 2646.3015 
      "Kochi Gold(USDXAU-KOCH)": 2646.3015 
      "Kolkata Gold(USDXAU-KOLK)": 2646.3015 
      "Mumbai Gold(USDXAU-MUMB)": 2646.3015 
      "Surat Gold(USDXAU-SURA)": 2647.9802 
      "Antimony(USDANTIMONY)": 0.5518 
      "Bitumen(USDBITUMEN)": 0.0147 
      "Gallium(USDGALLIUM)": 9.0983 
      "Manganese(USDMN)": 0.0001 
      "Neodymium(USDND)": 2.0251 
      "Tellurium(USDTE)": 2.6023 
      "Titanium(USDTITANIUM)": 43.5000 
      "Indium(USDINDIUM)": 10.1940 
      "Molybdenum(USDMO)": 2.0608 
      "Cobalt(USDLCO)": 0.7558 
      "Ahmedabad Silver(USDXAG-AHME)": 33.9129 
      "Bangalore Silver(USDXAG-BANG)": 33.9129 
      "Chennai Silver(USDXAG-CHEN)": 33.9129 
      "Coimbatore Silver(USDXAG-COIM)": 33.9129 
      "Delhi Silver(USDXAG-DELH)": 33.9129 
      "Hyderabad Silver(USDXAG-HYDE)": 33.9129 
      "Kochi Silver(USDXAG-KOCH)": 33.9129 
      "Kolkata Silver(USDXAG-KOLK)": 33.9129 
      "Mumbai Silver(USDXAG-MUMB)": 33.9129 
      "Surat Silver(USDXAG-SURA)": 33.9129 
      "iShares Gold Trust(USDIAU)": 51.1600 
    [170+ world Currencies, Metals and Cryptocurrencies]
  }, 
  "unit":"per ounce"
} 

...

You are in good company:

Trusted by the world’s most ambitious teams.

Get your API key

Powerful JSON API

The Metals-API API comes with guaranteed availability, scalable volumes and responds within milliseconds.

Get your API key

Built for developers

Our principle at Metals-API.com — developers first. Detailed API Documentation, intuitive code examples and a straightforward API structure will allow you to implement the API in under 10 minutes.

Get your API key

Trusted worldwide

Metals-API is used by thousands of developers, SMBs and large corporations every day. Rock-solid data sources and 6+ years of experience make our API the #1 resource for metals rates.

Get your API key

Bank-Level Security

Your connection to the Metals-API API is encrypted using bank-grade 256-bit SSL Encryption.

Get your API key

Trusted Sources

Currency data delivered by Metals-API is sourced from financial data providers and banks, including the European Central Bank.

Get your API key

Dedicated Support

Our world-class support team is happy to assist any time of the day and any day of the year. That's a promise.

Get your API Key

Frequently asked questions.

You can always refer to our Documentation, but here are a few answers to common questions.

FAQs

What is Metals-API?

Metals-API started out as a simple, lightweight Open-Source API for current and historical precious metals rates published by the banks. The Metals-API API is capable of delivering real-time precious metals data via API at an accuracy of 2 decimal points and a frequency as high as every 60 seconds. Capabilities include delivering exchange rates for Precious Metals, converting single currencies, returning Time-Series data, fluctuation data and lowest and highest price of any day.

Yes! When you choose an annual plan, you save the cost of 2 months, meaning you get 2 months free compared to paying monthly.

You can message us through our chat popup, or email us using our contact info

No, it is not possible to have both a monthly and an annual plan simultaneously.
Once you have purchased a monthly plan, you will only be able to purchase other monthly plans.
Similarly, if you have an annual plan, you will only be able to purchase other annual plans.

If you want to switch from a monthly plan to an annual plan or vice versa, you will need to cancel your current plan and purchase the new plan that you want.

Yes, we use LME as one of our data sources.

We offer a Carat Endpoint, all the values on this endpoint are per Carat (ct) unit. For other endpoints, please check the Supported Metals & Currencies where the unit for each metal is detailed. In order to get the price per gram, please have a look at the following example:
1 carat = 0.2 grams
Carat 24K: 12.907 per carat 12.907/0.2 = 64.535 g

Depending on the type of Subscription plan you choose when purchasing the Subscription, you will be invoiced in advance on a recurring and periodic basis (such as daily, weekly, monthly, or annually). Unless you or the company decide to terminate it, Your Subscription will automatically renew at the end of each period under the same terms.

Metals-API provides Gold (XAU) and Silver (XAG) rates for many cities in India. Please have a look at the Supported Metals & Currencies where you can find which cities are available.

We don’t offer fluctuation data for the same day. For the same day, you need to query us at 00:00 each day and save it on your site, then make one request each time the user visits the website. Fluctuation endpoint is available per date.

Yes, we are always online from Monday to Friday; 8am-5pm (EST). Send us a message via the contact form or email and our Customer Support team will be with you shortly. Urgent requests are usually handled within minutes.

Please have a look at our Refund Policy: https://metals-api.com/refund

Yes! But it has to be for a bigger bundle than what’s available.

You can manage all of this on your own from your dashboard!

All the metals rates you get using USD as a base currency need to be divided by 1. This means 1/value.
We return the values based on the base currency.
For example, for 1 USD the return is a number like 0.00049817281835633 for Gold (XAU).
To get the gold rate per ounce in USD: 1/0.00049817281835633 = 2007.33 USD.

It starts on the day that you subscribe to one of our paid plans.

1 - Register
2 - Look for the symbols that match your search
3 - Make an API call with them, placing your selected metals in symbol, and your preferred currency in base currency.

Yes! It’s deleted automatically. The information is handled by Stripe, we don’t store your credit or debit card data.

You can find them by going onto the Billing section (https://www.metals-api.com/payment-setting). There you will be able to download your invoices.

If you’re doing a call with a time-series endpoint, you can’t use today’s date as the end date. The date is updated on the time zone 0 UTC

Data & Features

Exchange rate data delivered by the Metals-API API is collected from over 15 reliable data sources, every minute. Sources include banks and financial data providers.

Metals API provides various London Metal Exchange (LME) prices. We offer the Settlement Price, which is closer to the offer price. For example, the symbol for copper is LME-XCU. Additionally, we provide 3 Month prices, indicated by symbols like XCU3M. Please note that this is just one example of the many LME symbols we support.

Metals API returns LME prices per troy ounce. To convert the price to per ton, you need to multiply the value by 32,150. Here’s an example request and conversion:
Example request:

{ "success": true, "timestamp": 1721936340, "date": "2024-07-25", "base": "USD", "rates": { "LME-XCU": 3.6055511943479, "USD": 1, "USDLME-XCU": 0.2773501043523139 } }

Conversion: 0.2773501043523139 * 32,150 = 8,916.80585493
This means the price per ton would be approximately 8,916.81 USD.

Currency and Metals conversion are supported using the same API endpoints and can be used to convert any amount from one currency to another, or from one metal to any metal and any currency to any metal.

The Metals-API API delivers EOD / End of Day historical exchange rates, which become available at 00:05am GMT for the previous day and are time stamped at one second before midnight.

All exchange rate data delivered by Metals-API is midpoint data. Midpoint rates are determined by calculating the average median rate of Bid and Ask at a certain time.

The Metals-API API is capable of delivering accurate exchange rate data for Precious Metals, in 170 world currencies, including Bitcoin and other major cryptocurrencies.

All the metals rates you get using USD as a base currency need to be divided by 1. This means 1/value.
We return the values based on the base currency.
For example, for 1 USD the return is a number like 0.00049817281835633 for Gold (XAU).
To get the gold rate per ounce in USD: 1/0.00049817281835633 = 2007.33 USD.

API Access

By default, it is (240 / minute) because we want to avoid attacks or abusers, but we can expand it for you in case you need more.

You can display the latest Metals (Gold, Silver, Platinum, etc) rates in the desired currencies (USD, GBP, CAD, etc) on your website using this WordPress plugin. The plugin includes comprehensive controls to display desired date metal rates as well as the latest, with the help of short codes with custom WP Editor.
Install your WordPress plugin here

The API has had an uptime of 99.99% throughout the last 12 months. You can review the current status anytime on the Status icon on the main menu.

Metals API is a Drupal module that consumes, caches and produces blocks to display precious metal prices from our API. In order to use the Metals API module, install the module following Standard Drupal module installation practices. More information is included in the README.txt file. Once the module is installed, navigate to the Metals API Integration Settings page from the Configuration -> Web Services menu item and paste your Metals API Key in the provided field. The module is configured to refresh the feed at a rate of once every 24 hours. You can adjust that to whatever rate you feel is necessary, provided that your Metals API Account allows for it.
Install your Metals API Drupal module here.