How do you collect the feed from a stock exchange?

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
Callan S.
Posts: 2042
Joined: Sun Jan 24, 2010 5:43 am

How do you collect the feed from a stock exchange?

Post by Callan S. »

Halls made a stocks game awhile back. I'm wondering how you collect the feed with a language like PHP or such like, so as to be able to write a program to further analyse the numbers?

Mostly in regard to the Australian stock exchange.
tourmaline
Posts: 34
Joined: Thu Mar 20, 2014 9:43 pm

Re: How do you collect the feed from a stock exchange?

Post by tourmaline »

I'd like to know where you you can get access to a stock market feed without paying the hundreds to thousands of dollars a month.

I've used MT4 trading software to gather historical data for analysis, but anything realtime I have not found anything free, or even reasonably affordable.
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: How do you collect the feed from a stock exchange?

Post by hallsofvallhalla »

I used the Yahoo Stock API. I believed it has all been brought under the finance API. I believe it is "near real time" not truly real time. But for a game it works great. I also might have the source code somewhere.

https://code.google.com/p/yahoo-finance ... inanceAPIs

http://www.blogbyben.com/2009/01/truly- ... k-api.html

http://www.gummy-stuff.org/Yahoo-data.htm

http://www.jarloo.com/get-near-real-tim ... o-finance/

I found my old version of the money game and put it back up to show the stock part working

http://thegamesguildstudios.com/moneygame/index.php
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: How do you collect the feed from a stock exchange?

Post by hallsofvallhalla »

User avatar
Callan S.
Posts: 2042
Joined: Sun Jan 24, 2010 5:43 am

Re: How do you collect the feed from a stock exchange?

Post by Callan S. »

Cool! Thanks Halls! I will look into that source code! :)
User avatar
vitinho444
Posts: 2819
Joined: Mon Mar 21, 2011 4:54 pm

Re: How do you collect the feed from a stock exchange?

Post by vitinho444 »

I watched a tutorials some time ago, by the guy TheNewBoston, he made a stock analyzer, that gets all the history from the stock market you want, and whatever stock item you want, like GOOG for Google Nasdaq i guess. He also teaches you how to use that information, and analyze it, to see the UP's and DOWN's of the price and trade value.

Here's the link: http://thenewboston.org/list.php?cat=48

Good luck ;)
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: How do you collect the feed from a stock exchange?

Post by Jackolantern »

As Halls' code demonstrates, it isn't that hard to get near real-time stock data. The tricky part is in the analysis; making sense of all those piles of data and turning it into to something useful and actionable. If you can demonstrate that your analysis can give an edge over others who don't have your analysis, you can make a fortune.
The indelible lord of tl;dr
User avatar
vitinho444
Posts: 2819
Joined: Mon Mar 21, 2011 4:54 pm

Re: How do you collect the feed from a stock exchange?

Post by vitinho444 »

Jackolantern wrote:As Halls' code demonstrates, it isn't that hard to get near real-time stock data. The tricky part is in the analysis; making sense of all those piles of data and turning it into to something useful and actionable. If you can demonstrate that your analysis can give an edge over others who don't have your analysis, you can make a fortune.
Well Jacko if stock market analysis were easy, everyone would be rich ahaha :)

TheNewBoston's tutorial helps to gather 10 years history on a stock and use basic analysis on that history to check how much it went up, and what percentage, and how much it went down, and what percentage.

But it's a really cool project to do :)
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Callan S.
Posts: 2042
Joined: Sun Jan 24, 2010 5:43 am

Re: How do you collect the feed from a stock exchange?

Post by Callan S. »

Wow, I managed to figure out which part of the code was doing the call and it works in wamp...

Very nifty!
User avatar
Callan S.
Posts: 2042
Joined: Sun Jan 24, 2010 5:43 am

Re: How do you collect the feed from a stock exchange?

Post by Callan S. »

Hmm, their historical quotes feed seems to have changed from what they have listed or something - it's not working.

Edit: Wait, the example they go through seems not to work, nor the download link at the bottom - but the very first example (with it's badly formated link status) does work...weird...

Edit 2: Actually maybe my fault - I had the thing running three times and the original code calls the data into $symbol - which has double quotes around it. And maybe that was screwing it up.
Post Reply

Return to “General Development”