- Register a free account at Metals API
- You instantly get an API key. Copy that in this code where you see [YOUR METALS-API.COM ACCESS KEY]. Lose the brackets [ ]
- In Google Sheets go to the Tools menu and select Script Editor
- Create a new Script, name it as you like and copy this code there
- ctrl+s to save the script.
- if Google ask for permission, give it. Its your profile, your sheet so it is in house anyway.
=GETPRICE("USD";"XAU")
It will return the price of $1 worth of XAU in this case.