/metals-api-google-sheets-function

Load price from Metals-API.com to google sheets

Primary LanguageJavaScript

Metals API Google Sheets Function

Setup:

  1. Register a free account at Metals API
  2. You instantly get an API key. Copy that in this code where you see [YOUR METALS-API.COM ACCESS KEY]. Lose the brackets [ ]
  3. In Google Sheets go to the Tools menu and select Script Editor
  4. Create a new Script, name it as you like and copy this code there
  5. ctrl+s to save the script.
  6. if Google ask for permission, give it. Its your profile, your sheet so it is in house anyway.

Usage in Google Sheets:

=GETPRICE("USD";"XAU")

It will return the price of $1 worth of XAU in this case.