What data source could I use for my stock market program?

26,606

Solution 1

As of Nov 2014, these links are dead.

Solution 2

Assuming the rules in the UK are the same as in the US, you basically have 3-tiered choices.

You can hack together a lame feed from things like Google or Yahoo but you absolutely are not getting every tick, if that is what you are after.

A step up from the obvious internet sources are some of the online brokers. Their data is more reliable and timely but obviously you need an account and they have to offer some kind of API. Check into something like InteractiveBrokers.com. They are mostly java centric but offer a Window's based C++ DLL as well. Several other brokers offer similar APIs but IB is excellent in that it covers a multitude of exchanges including, I believe, London. They also make it relatively easy to transfer currencies if that is a concern.

Lastly you have to go to commercial brokers. You can find them easily enough with a search but be prepared to pay a couple of hundred dollars per month minimum.

I think Mark's suggestion of QT is a good way to go for a GUI. Java tends to be adequate for putting up a grid of running quotes but tends to fail in the charting area, IMO.

Solution 3

You said you wanted "live" market charts. If you mean real-time, you will never get that for free. All the data you see on google etc is delayed, usually at least 15 minutes, and they don't get every tick.

Solution 4

If a delay is not a problem and if you are only interested in daily data, you can easily get historical data for free via simple HTTP request using this historical data API.

Share:
26,606
Nick Bolton
Author by

Nick Bolton

Hello, I'm the CEO of Symless, the company behind Synergy, software that lets you share one mouse and keyboard between multiple computers.

Updated on July 09, 2022

Comments

  • Nick Bolton
    Nick Bolton almost 2 years

    I would like to make a free open-source C++ application for both Linux and Windows which will create live stock market charts (i.e. they're refreshed frequently).

    Please could you give me some pointers on these issues:

    • What should I use as the data source? Are there free services I can implement? I would like to use the same or similar information as companies like Google.
    • I'm not sure what GUI toolkit would be best to use, is there one which has charting built in, or would I need to use a specialized library for this?

    Some things to note:

    • This is my first attempt at both cross-platform C++ development, and a GUI application for Linux.
    • I'm based in the UK, so I'd like to use data sources that provide information for the London stock exchange (LON) as well as NASDAQ, etc.
  • runako
    runako about 15 years
    Note: You probably are not allowed to resell stock data without a separate license. The data are owned by the exchanges, even though Google, YHOO, etc. make them available via APIs.
  • Antoni
    Antoni about 15 years
    From the Google Finance API : "Note that this API interacts only with users' portfolio data; the Finance Portfolio Data API doesn't provide access to stock quotes or other real-world financial data hosted by Google Finance."
  • Petr Peller
    Petr Peller over 9 years
    Google Finance API does not exist anymore, the Yahoo link is just for News RSS feed and the last link throws error 500.