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": "2023-06-09",
  "rates": {
      "Silver(USDXAG)": 24.2514 
      "Gold(USDXAU)": 1963.6900 
      "Palladium(USDXPD)": 1366.5000 
      "Platinum(USDXPT)": 1013.0000 
      "Ruthenium(USDRUTH)": 463.0000 
      "Copper(USDXCU)": 0.2360 
      "Aluminum(USDALU)": 0.0704 
      "Nickel(USDNI)": 0.6565 
      "Zinc(USDZNC)": 0.0737 
      "Tin(USDTIN)": 0.8014 
      "Cobalt(USDLCO)": 0.9672 
      "Iridium(USDIRD)": 4600.0000 
      "Lead(USDLEAD)": 0.0631 
      "Iron Ore(USDIRON)": 0.0034 
      "LBMA Gold Am(USDLBXAUAM)": 1947.2500 
      "LBMA Gold Pm(USDLBXAUPM)": 1966.4000 
      "LBMA Silver(USDLBXAG)": 23.6700 
      "LBMA Platinum Am(USDLBXPTAM)": 1026.0000 
      "LBMA Platinum Pm(USDLBXPTPM)": 1020.0000 
      "LBMA Palladium Am(USDLBXPDAM)": 1381.0000 
      "LBMA Palladium Pm(USDLBXPDPM)": 1381.0000 
      "LME Aluminium(USDLME-ALU)": 0.0675 
      "LME Copper(USDLME-XCU)": 0.2598 
      "LME Zinc(USDLME-ZNC)": 0.0741 
      "LME Nickel(USDLME-NI)": 0.6533 
      "LME Lead(USDLME-LEAD)": 0.0640 
      "LME Tin(USDLME-TIN)": 0.8102 
      "Uranium(USDURANIUM)": 50.3500 
      "LME Steel Scrap CFR Turkey(USDSTEEL-SC)": 0.0120 
      "LME Steel Rebar FOB Turkey(USDSTEEL-RE)": 0.0190 
      "LME Steel HRC FOB China(USDSTEEL-HR)": 0.0170 
      "Bronze(USDBRONZE)": 0.1543 
      "Magnesium(USDMG)": 0.0998 
      "Osmium(USDOSMIUM)": 40015.9250 
      "Rhenium(USDRHENIUM)": 47.4951 
      "Indium(USDINDIUM)": 12.9080 
      "Molybdenum(USDMO)": 1.5257 
      "Tungsten(USDTUNGSTEN)": 0.0101 
      "Lithium(USDLITHIUM)": 1.4463 
      "Ahmedabad Gold(USDXAU-AHME)": 2071.6268 
      "Bangalore Gold(USDXAU-BANG)": 2071.6268 
      "Chennai Gold(USDXAU-CHEN)": 1797.1629 
      "Coimbatore Gold(USDXAU-COIM)": 2086.7507 
      "Delhi Gold(USDXAU-DELH)": 2075.0641 
      "Hyderabad Gold(USDXAU-HYDE)": 2069.9082 
      "Kochi Gold(USDXAU-KOCH)": 1797.3348 
      "Kolkata Gold(USDXAU-KOLK)": 2069.9082 
      "Mumbai Gold(USDXAU-MUMB)": 2069.9082 
      "Surat Gold(USDXAU-SURA)": 2071.6268 
      "Antimony(USDANTIMONY)": 0.3586 
      "Ahmedabad Silver(USDXAG-AHME)": 25.2294 
      "Bangalore Silver(USDXAG-BANG)": 30.0561 
      "Chennai Silver(USDXAG-CHEN)": 26.7074 
      "Coimbatore Silver(USDXAG-COIM)": 26.7074 
      "Delhi Silver(USDXAG-DELH)": 25.2294 
      "Hyderabad Silver(USDXAG-HYDE)": 26.7074 
      "Kochi Silver(USDXAG-KOCH)": 27.3948 
      "Kolkata Silver(USDXAG-KOLK)": 25.2294 
      "Mumbai Silver(USDXAG-MUMB)": 25.2294 
      "Surat Silver(USDXAG-SURA)": 25.2294 
    [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

Your API request volume can be exceeded by 20% without your service being affected. Please note that after 120% of your volume has been used your API access will be disabled.

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.