MetalpriceAPI Excel Template — Pull Live Gold, Silver & Metals Prices with Power Query

< Back to Guides

MetalpriceAPI Excel Power Query template overview — annotated screenshot showing live API data, queries panel with all workbook tabs (Live Rates, Historical, Time Series, Yesterday Rates, Hourly Rates, OHLC, Currency Convert), and Power Query benefits: fast, reliable, real-time, detailed

This guide walks you through using our pre-built MetalpriceAPI Excel template to pull live and historical metals prices (gold XAU, silver XAG, platinum XPT, palladium XPD and more), foreign exchange rates and OHLC data straight into Microsoft Excel via Power Query. No code, no URL building — just paste your API key and click Refresh All.

Getting Started

Enter your API key. Open the workbook, go to the APIKEY tab and paste your MetalpriceAPI key into the cell labeled API Key. This single cell connects every tab in the workbook to the live MetalpriceAPI data. If you don't have a key yet, create a free MetalpriceAPI account and copy the key from your dashboard.

Refresh the data. To pull the latest rates into every tab, go to Data → Refresh All in Microsoft Excel, or right-click any table and choose Refresh.

What each tab does:

  • APIKEY → where you paste your API key (the one place you ever need to edit it)
  • Live Rates → real-time exchange rates for any base + target currencies/metals
  • Historical → exchange rates for a specific past date
  • Daily Data → daily rates over a date range (one row per day)
  • Open High Low Close → OHLC breakdown for a single currency on a specific date
  • Currency Convert → convert an amount from one currency to another at a chosen date's rate
  • Time Series Data → exchange rate trends over a selected date range at regular intervals

Live Rates tab

Retrieves the latest exchange rates for your selected metals/currencies against a chosen base.

Editable cells

  • Cell B4 — Base Currency: a 3-letter ISO code (e.g., USD, EUR, GBP)
  • Cell B9 — Target Currencies: one or more 3-letter codes separated by commas (e.g., XAU,XAG,XPT,EUR)


MetalpriceAPI Excel Power Query template — Live Rates tab input cells (Base currency USD and Target currencies XAU, XAG, XPT, EUR)

Worked example — get the latest gold, silver, platinum and EUR rates against USD:

  1. Set B4 = USD
  2. Set B9 = XAU,XAG,XPT,EUR
  3. Click Data → Refresh All


MetalpriceAPI Excel Power Query template — Live Rates result table showing live USD prices for gold (XAU), silver (XAG), platinum (XPT) and EUR


Historical tab

Retrieves exchange rates for a specific past date.

Editable cells

  • Cell B4 — Base Currency (e.g., USD)
  • Cell B9 — Target Currencies (comma-separated, e.g., XAU,XAG,XPT)
  • Cell B14 — Date (use your PC's date format, e.g., 5/2/2026)


MetalpriceAPI Excel Power Query template — Historical tab input cells (Base currency, Target currencies, Date)

Worked example — gold, silver and platinum prices on a specific historical date:

  1. Set B4 = USD
  2. Set B9 = XAU,XAG,XPT
  3. Set B14 = your chosen date
  4. Click Data → Refresh All


MetalpriceAPI Excel Power Query template — Historical rates result table showing past XAU, XAG and XPT prices in USD


Daily Data tab

Pulls one row per day of exchange rates over a chosen date range — perfect for charting price history.

Editable cells

  • Cell B3 — Base Currency
  • Cell B8 — Target Currencies (comma-separated)
  • Cell B13 — Start Date
  • Cell B17 — End Date


MetalpriceAPI Excel Power Query template — Daily Data tab input cells (Base, Target currencies, Start Date, End Date)

Worked example — daily gold, silver, platinum and EUR rates across a date range:

  1. Set B3 = USD
  2. Set B8 = XAU,XAG,XPT,EUR
  3. Set B13 = your start date
  4. Set B17 = your end date
  5. Click Data → Refresh All


MetalpriceAPI Excel Power Query template — Daily rates result table showing day-by-day USD prices for XAU, XAG, XPT and EUR


Open High Low Close (OHLC) tab

Retrieves Open, High, Low and Close exchange rate values for a single target on a specific date.

Editable cells

  • Cell B3 — Base Currency
  • Cell B8 — Target Currency (single 3-letter code, e.g., XAU)
  • Cell B13 — Date


MetalpriceAPI Excel Power Query template — OHLC tab input cells (Base currency, Target currency XAU, Date)

Worked example — gold OHLC on a specific date:

  1. Set B3 = USD
  2. Set B8 = XAU
  3. Set B13 = your chosen date
  4. Click Data → Refresh All


MetalpriceAPI Excel Power Query template — OHLC result table showing gold (XAU) open, high, low and close values in USD


Currency Convert tab

Converts an amount from one currency to another at the exchange rate of a selected date.

Editable cells

  • Cell B3 — Base Currency (the currency you're converting from)
  • Cell B8 — Target Currency (the currency you're converting to)
  • Cell B13 — Date
  • Cell B17 — Amount to convert (e.g., 10)

Worked example — convert 10 USD to gold (XAU):

  1. Set B3 = USD
  2. Set B8 = XAU
  3. Set B13 = your chosen date
  4. Set B17 = 10
  5. Click Data → Refresh All


MetalpriceAPI Excel Power Query template — Currency Convert tab showing USD to XAU conversion of 10 units with quote and result


Time Series Data tab

Retrieves exchange rates at regular intervals (e.g., hourly) within a selected date range — great for intraday charts and back-tests.

Editable cells

  • Cell B3 — Base Currency
  • Cell B8 — Target Currency (single code)
  • Cell B13 — Start Date
  • Cell B17 — End Date

Worked example — hourly silver (XAG) rates across a date range:

  1. Set B3 = USD
  2. Set B8 = XAG
  3. Set B13 = your start date
  4. Set B17 = your end date
  5. Click Data → Refresh All


MetalpriceAPI Excel Power Query template — Time Series tab showing hourly USD/XAG silver rates with timestamps


Troubleshooting

Data isn't refreshing

  • Confirm your API key is pasted correctly into the APIKEY tab (no extra spaces)
  • Check your internet connection
  • Try Data → Refresh All again
  • Make sure your MetalpriceAPI plan hasn't hit its monthly request limit
  • Close and reopen the file, then refresh

"success = FALSE" error

A FALSE value in the success column means the API request failed. Common causes:

  • Invalid API key → recheck the key on your dashboard and paste it again
  • Wrong currency code → use valid 3-letter ISO codes (USD, EUR, XAU, XAG, XPT, etc.)
  • Wrong date format → use your PC's date format
  • Plan limit exceeded → wait for the monthly reset or upgrade your plan
  • Missing input → ensure every required cell on the tab is filled in