How to fetch stock price from Australia Stock Exchange [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last year.
Improve this questionHow can I fetch a stock's price from the Australian Stock Exchange (ASX): www.asx.com.au/
Actually our te开发者_开发百科am is working on a corporate site which would be listed soon at Australian Stock Exchange. I need to display details about the stock (including the price) on the home page. How can I do this?
Do stock exchanges provide data feeds? If so, how do I access these feeds?
ASX must have an API. But there seem to be some options such as RSS Feeds. Live feeds are not free, free feeds are 20minutes delayed.
I think that talking to ASX is going to be the way to go. They'll certainly provide you with real time information, but at a price.
Yahoo Finance offer a delayed service (15 mins) on ASX listed companies. You could also fetch it with a screen scrape of google finance (also delayed). Since you are not yet listed it may take a while before either pick up your symbol. I believe both get their data from csinitiative which is a pay-for service. I'm not sure what programming language you are using but the Yahoo service certainly has many libraries already built in python/ruby/java.
Getting data from Yahoo is straight forward.
Here's a link for MSFT: http://ichart.yahoo.com/table.csv?s=MSFT
To get data for the ASX add .AX to the end of the code, eg
http://ichart.yahoo.com/table.csv?s=MPL.AX
I've written an article about about acquiring and graphing stock market data:
https://www.codeproject.com/Articles/1069489/Highstock-plus-Data-Forge-plus-Yahoo
Adding an ".AX" at the end of each of stocks enabled me to get the data:
stock_list = ["ANZ.AX", "WBC.AX", "CBA.AX", "QAN.AX", "WOW.AX"]
精彩评论