Solved

live tickers of main commodities prices/quotes?

Posted on 2014-03-01
3
1,494 Views
Last Modified: 2014-03-06
Where can I find some live ticker of the prices/quotes of following commodities?

1) Energy: petrol, ethanol, natural gas, naphtha, petroleum.
2) Diamonds: (nothing)
3) Metals: aluminium, silver, nickel, gold, palladium, platinum, copper, zinc.
4) Agriculture: subdivided in wheat, corn, soybean oil, cocoa, coffee, tobacco, sugar.

I'm searching for a script for live sliding texts/numbers to put in my own website...
0
Comment
Question by:lucavilla
  • 2
3 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39897102
Is your question about where to find data or how to display it in a ticker form?  One thing to be aware of is there will be restrictions on how you can use 3rd party data.  For instance yahoo http://developer.yahoo.com/finance/company.html has an api but it is only for non commercial.

Diamond prices are online here http://www.idexonline.com/Diamond_Index_Drivers.asp but copy protected.
0
 

Author Comment

by:lucavilla
ID: 39898387
Scott thanks for the interesting info about licenses.

I'm mostly interested in "where to find data"...
and if possible, where to find a licensed script to put in my non-commercial page...
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39898470
You will need to piece together the data you want from different end points and perhaps api's.  The 2nd part is going to place this into a ticker.  I think you need to break out this question onto those 2 parts.

For the first part you can use yahoo finance as I pointed out already.  If you use the console you can search for what you need http://developer.yahoo.com/yql/console/?q=show%20tables&env=store://datatables.org/alltableswithkeys for instance

Metals http://finance.yahoo.com/futures?t=metals will be
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20uob.preciousmetals%20where%20metal%20in%20(%27PAMP%20GOLD%20BARS%27%2C%27UBS%20GOLD%20KINEBARS%27)&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=

You can also use http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22CH14.CBT,HGH14.CMX%22)&env=store://datatables.org/alltableswithkeys

Add to this portion 22CH14.CBT,HGH14.CMX by looking up symbols
http://finance.yahoo.com/futures?t=energy
http://finance.yahoo.com/futures?t=metals
http://finance.yahoo.com/futures?t=grains
http://finance.yahoo.com/futures?t=softs
Example, by looking up the softs tab, coffee is KCH14.NYB

To speed things up, I would suggest grabbing the data you need, saving to a text file on your server.  Perhaps create a cron job/scheduled event to run every 15 minutes that will update the data.

For the 2nd part, there are a lot of tickers to choose from. It is just a matter of feeding it the data you put together.

http://aamirafridi.com/jquery/jquery-marquee-plugin
http://www.aakashweb.com/demos/jquery-easy-ticker/
http://jonmifsud.com/open-source/jquery/jquery-webticker/
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question