- Joined
- 26 March 2014
- Posts
- 20,156
- Reactions
- 12,806
Hi all,
I'm sure this must have been done by some/many of you.
I can write code in Visual Basic, Perl , Python etc at an amateur level and I want to access the ASX website and grab the current price of a stock(s) and display it in a desktop window (windows 10), doing this at intervals while the program is running.
Can anyone give me a few pointers to the easiest way to do this ?
That's a bit strange for a car racing game
Is it possible to get these data feed, for free?
from yahoo_finance import Share
import time
stock = input("Enter ASX ticker: ")
yahoo_ticker = Share(stock.upper() + ".AX")
while True:
yahoo_ticker.refresh()
print("Current price:", yahoo_ticker.get_price(), end='\r')
time.sleep(1200)
Does it HAVE to be from the ASX website? I just wrote this, it will ask you for the ticker and get the current price from yahoo finance, then will refresh every 20 minutes. Very simple.
Code:from yahoo_finance import Share import time stock = input("Enter ASX ticker: ") yahoo_ticker = Share(stock.upper() + ".AX") while True: yahoo_ticker.refresh() print("Current price:", yahoo_ticker.get_price(), end='\r') time.sleep(1200)
Using Python 3.
Obviously you need the yahoo_finance module(pip install yahoo_finance). From there you could look into putting it in a GUI if you really want the "it's own window" thing.
yahoo's not accurate for mid and small caps
For what symbols? You mean even just for a single price grab like this, or you referring to historical data? Checking some now and they're all accurate so far.
I write all my programs in the old Excel Macro language, Office 97's XLM.Pixel, can you share here please?
If Yahoo live quotes were reliable, that would be awesome. I've always thought of them as crap, but I'll try tomorrow with Amiquote, since it's just a click away.
DDE Server for AmiBroker
I'm trying to build an IG DDE server (to connect to AmiBroker). I can connect to IG, and have a PrettyTools server, but I'm stuck ... I really need some sample code. Anyone any experience of building a DDE server using the Streaming API?
So I have noticed too. (Likewise the website that provides long history on company dividends.)If Yahoo live quotes were reliable, that would be awesome. I've always thought of them as crap, but I'll try tomorrow with Amiquote, since it's just a click away.
Good question. Certainly for historical data there are holes and wrong quotes and missing chunks of data everywhere. For live quotes I don't know.
If you want live / non delayed data, shell out for E*Trade Pro (or ANZ Investing Pro or whatever they call it nowadays) - which is free if you do a few trades a month anyway. It comes with an Excel add-in that will give live quotes, trades etc fed directly into an Excel spreadsheet in something getting close to "real-time" (at the retail level anyway). Can include option data as well if you want. Anyway it's easy really easy to use.
ANZ offer 2 trading platforms: WebIRESS and "Pro" which used to be called E*Trade Pro and cost $79.95 a month.
Maybe it's now called ANZ Pro.
URL= https://shareinvesting.anz.com/TradingTools/ActiveTraders/Default.aspx?Tab=pnlPro&area=news
Cool. Thanks. I didn't expect ANZ to have a trader-based platform.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?