Want to add our charts or pricing tables to your website? It's simple: Simply grab the bits of pre-configured code we've listed below, or follow the instructions to create your own custom widgets.
Our Metal Price Widgets are fully responsive meaning that they will fit to the full size of whatever container you put them in. Along with their neutral styling, this gives website owners maximum flexibility in many use cases.
View some examples here: Widget Example Page
More heavily customized implementations are available for a fee. Please contact us for details.
IMPORTANT! Our widgets use pym.js for automatic iframe resizing. This code need only be added once at the end of your page just before the </body> tag, regardless of how many widgets are place on that page. Without it, the widgets will not size properly and your data may be cut-off.
Place the following code once just before the </body> tag on any pages where our widgets or charts are being used:
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Simply add the "dark" variable to any widget code. See examples below.
The pricing table widget uses two variables, which may be placed in the url parameters to construct the desired table.
Example Metal Price Code
Popular Metals in USD (Default)
<div id="DMP_1" data-pym-src="//dailymetalprice.com/prices.php"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Popular Metals in USD (Dark Mode)
<div id="DMP_1" data-pym-src="//dailymetalprice.com/prices.php?dark"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Base Metals in EUR (Euro)
<div id="DMP_2" data-pym-src="//dailymetalprice.com/prices.php?c=al,cu,fe,pb,ni,zn&x=EUR"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Base Metals Plus Gold and Silver in CAD (Canadian Dollar)
<div id="DMP_3" data-pym-src="//dailymetalprice.com/prices.php?c=al,cu,fe,pb,ni,zn,au,ag&x=CAD"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Platinum Group Metals (Default USD)
<div id="DMP_4" data-pym-src="//dailymetalprice.com/prices.php?c=pt,pd,rh,ru,ir"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Platinum Group Metals (Dark Mode)
<div id="DMP_4" data-pym-src="//dailymetalprice.com/prices.php?c=pt,pd,rh,ru,ir&dark"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Platinum Only (Default USD) in grams (g)
<div id="DMP_5" data-pym-src="//dailymetalprice.com/prices.php?c=pt&u=g"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Copper, Lead and Zinc in GBP (£) and kg (kilograms)
<div id="DMP_6" data-pym-src="//dailymetalprice.com/prices.php?c=cu,pb,zn&x=GBP&u=kg"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
IMPORTANT: The div id (eg. DMP_1) can be anything, but it should be unique for each div on a page.
The charting widget uses three variables, which may be placed in the url parameters to construct the desired chart.
Example Metal Price Chart Code
Copper (lbs) One Month (Default)
<div id="DMPC_1" data-pym-src="//dailymetalprice.com/charts.php"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Copper (lbs) One Month (Dark Mode)
<div id="DMPC_1" data-pym-src="//dailymetalprice.com/charts.php?dark"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Gold (oz) One Year
<div id="DMPC_2" data-pym-src="//dailymetalprice.com/charts.php?c=au&d=240"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Silver (oz) Max
<div id="DMPC_3" data-pym-src="//dailymetalprice.com/charts.php?c=ag&d=0"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Colbalt (mt) 5 Years
<div id="DMPC_4" data-pym-src="//dailymetalprice.com/charts.php?c=co&u=mt&d=1200"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
Rhodium (oz) 5 Years (Dark Mode)
<div id="DMPC_4" data-pym-src="//dailymetalprice.com/charts.php?c=co&u=mt&d=1200&dark"></div>
<script type="text/javascript" src="//dailymetalprice.com/js/pym.min.js"></script>
IMPORTANT: The id (eg. DMPC_1) can be anything, but it should be unique for each div on a page.
Have you remembered to add the pym.js script to the end of your page? If you put it in the head it will not work.
Have you assigned unique id's to each widget container on the page?
If you are getting a 404 Not Found Error in place of your widget, have you checked that the data-pym-src url is valid? You can test it in your browser to be sure.
If you're still having problems after checking these items, please feel free to get in touch.
Please keep in mind that these widgets are provided at no cost. In return for our work and our bandwidth, we place small courtesy links on the widgets. Efforts to obscure the courtesy link or abuse this free service in any way will result in a ban without notice or explanation.
Anything else that we deem overuse or abuse may also result in a ban at our discretion. Please play nice and ask us if you have any questions about your implementation.
Updated daily. Spot prices on 23 base metals, precious metals, rare metals and materials PLUS charts and historical prices going back as far as January 2000.
NEW We've added 7 new metals and materials including: Uranium, Neodymium, Lithium, Gallium, Indium, Tellurium and Steel Rebar!
NEW ARCHIVE We've added a metal price archive with metal prices going back to 2000 in USD and back to 2010 in other national currencies and cryptocurrencies.