Precious metals rates and currency conversion JSON API



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

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

{
  "base": USD, 
  "date": "2024-04-19",
  "rates": {
      "Silver(USDXAG)": 28.7398 
      "Gold(USDXAU)": 2392.2358 
      "Palladium(USDXPD)": 1018.0000 
      "Platinum(USDXPT)": 930.5529 
      "Rhodium(USDXRH)": 4715.0000 
      "Ruthenium(USDRUTH)": 428.0000 
      "Copper(USDXCU)": 0.2810 
      "Aluminum(USDALU)": 0.0813 
      "Nickel(USDNI)": 0.5664 
      "Zinc(USDZNC)": 0.0875 
      "Tin(USDTIN)": 1.0721 
      "Cobalt(USDLCO)": 1.0734 
      "Iridium(USDIRD)": 4850.0000 
      "Lead(USDLEAD)": 0.0669 
      "Iron Ore(USDIRON)": 0.0034 
      "LBMA Gold Am(USDLBXAUAM)": 2379.8500 
      "LBMA Gold Pm(USDLBXAUPM)": 2382.7000 
      "LBMA Silver(USDLBXAG)": 28.4700 
      "LBMA Platinum Am(USDLBXPTAM)": 942.0000 
      "LBMA Platinum Pm(USDLBXPTPM)": 942.0000 
      "LBMA Palladium Am(USDLBXPDAM)": 1036.0000 
      "LBMA Palladium Pm(USDLBXPDPM)": 1047.0000 
      "LME Aluminium(USDLME-ALU)": 0.0823 
      "LME Copper(USDLME-XCU)": 0.3032 
      "LME Zinc(USDLME-ZNC)": 0.0881 
      "LME Nickel(USDLME-NI)": 0.5924 
      "LME Lead(USDLME-LEAD)": 0.0672 
      "LME Tin(USDLME-TIN)": 1.1099 
      "Uranium(USDURANIUM)": 89.2500 
      "LME Steel Scrap CFR Turkey(USDSTEEL-SC)": 0.0121 
      "LME Steel Rebar FOB Turkey(USDSTEEL-RE)": 0.0180 
      "LME Steel HRC FOB China(USDSTEEL-HR)": 0.0163 
      "Bronze(USDBRONZE)": 0.1783 
      "Magnesium(USDMG)": 0.0893 
      "Osmium(USDOSMIUM)": 43421.1386 
      "Rhenium(USDRHENIUM)": 62.2475 
      "Molybdenum(USDMO)": 1.3629 
      "Tungsten(USDTUNGSTEN)": 0.0097 
      "Lithium(USDLITHIUM)": 0.4510 
      "Ahmedabad Gold(USDXAU-AHME)": 2171.4154 
      "Bangalore Gold(USDXAU-BANG)": 2169.7155 
      "Chennai Gold(USDXAU-CHEN)": 1777.5553 
      "Coimbatore Gold(USDXAU-COIM)": 2193.8537 
      "Delhi Gold(USDXAU-DELH)": 2174.8152 
      "Hyderabad Gold(USDXAU-HYDE)": 2169.7155 
      "Kochi Gold(USDXAU-KOCH)": 1777.7253 
      "Kolkata Gold(USDXAU-KOLK)": 2169.7155 
      "Mumbai Gold(USDXAU-MUMB)": 2169.7155 
      "Surat Gold(USDXAU-SURA)": 2171.4154 
      "Antimony(USDANTIMONY)": 0.4026 
      "Bitumen(USDBITUMEN)": 0.0160 
      "Gallium(USDGALLIUM)": 8.5948 
      "Manganese(USDMN)": 0.0001 
      "Neodymium(USDND)": 1.9187 
      "Tellurium(USDTE)": 2.3298 
      "Titanium(USDTITANIUM)": 52.5000 
      "Indium(USDINDIUM)": 7.9292 
      "Ahmedabad Silver(USDXAG-AHME)": 29.4078 
      "Bangalore Silver(USDXAG-BANG)": 33.5700 
      "Chennai Silver(USDXAG-CHEN)": 30.5977 
      "Coimbatore Silver(USDXAG-COIM)": 30.5977 
      "Delhi Silver(USDXAG-DELH)": 29.4078 
      "Hyderabad Silver(USDXAG-HYDE)": 30.5977 
      "Kochi Silver(USDXAG-KOCH)": 30.5977 
      "Kolkata Silver(USDXAG-KOLK)": 29.4078 
      "Mumbai Silver(USDXAG-MUMB)": 29.4078 
      "Surat Silver(USDXAG-SURA)": 29.4078 
      "iShares Gold Trust(USDIAU)": 45.3000 
    [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.

We don’t have any discounts currently.

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 9 am to 6 pm (GMT+1). 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.

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.