Importing securities data for silver

I would like to import the price of silver in EUR/kg.

I have already downloaded the historical prices by CSV.

I would like to update the price on a daily basis.

I have the following webpage which has the silver price in EUR/kg:

On the above webpage I have the following table:

Can someone explain how I can scrape the price highlighted above on a daily basis? Is it possible to automate?

Use the json-provider:

https://chart-data.bullionvault.com/prices/prices.json?&version=v2&chartType=CHART_POINTS&securityId=AGX&interval=3600&batch=Full&valuationSecurityId=EUR
$.seriesData.prices[*].priceTime
$.seriesData.prices[*].latestPrice

https://chart-data.bullionvault.com/prices/prices.json?&version=v2&chartType=CHART_POINTS&securityId=AGX&interval=3600&batch=Full&valuationSecurityId=EUR
$.latestPrice.timestamp
$.latestPrice.price

EDIT: at the end of the URLs is =EUR. This is changeable to CAD, USD or GBP.

2 Likes

Wow! Thank you!
So now the live prices will update everyday?
How do you know to use this link in the JSON url:
https://chart-data.bullionvault.com/prices/prices.json?&version=v2&chartType=CHART_POINTS&securityId=AGX&interval=3600&batch=Full&valuationSecurityId=EUR

If I want to also get Platinum and Gold prices in EUR/kg, do I need to change security ID? What should i change them to?

I hope so.

There are already some explanations here in the forum, for example Cannot find investment funds in search - #30 by ProgFriese

securityId=AUX is gold
securityId=PDX is palladium


securityId=PTX is platinum