Price Feed APIs

RandomOne

Junior member
Messages
24
Likes
1
Any recommendations for a free reliable forex price feed API such that you can get tick by tick data into a Java or C++ application?

Main consideration is reliability as it will need to be available whenever the market is trading, i.e. Friday night to Sunday night. Also needs to be fairly accurate and timely, although a couple of pips offset or a few seconds delay is not really a problem as it will only be used for a general custom indicator.

Couldn't find anything obvious posted recently on forums by searching.

I believe that FXCM for instance offers both Java and C++, although you have to open and account and deposit money first.
 
There are typically three solutions to this:

If your desktop platform has a DDE interface you should be able to connect to it. ThinkOrSwim uses that method to let you live connect to spreadsheet software such as Excel. I would think you can adapt this to your JAVA or c++ code on a Windows machine.

If your broker will give you a FIX ( Financial Information eXchange) protocol account, then there are several JAVA APIs that you can use. Check out Source Forge for free, open source code. I had a PHP implementation that I was going to use with ThinkOrSwim, but they stopped granting these accounts while they figure out the rules as a consequence of their merger with TD Ameritrade. My contact was pessimistic about the future availability of these accounts to retail traders.

The less desirable, but none-the-less quite effective, approach is to "screen scrape" the data by having your script make an HTML request from your favorite online data source and parsing the results. The big downside is that the data is sometimes up to 20 minutes old.
 
Last edited:
Been running since 21/12/2010 and TrueFX seems reliable so far with no more gaps than say the data from Gain.

Thanks for all replies.

I am using System.Net.WebClient & .DownloadString() to screen scrape...any ideas on the difference between processing for a time chart vs. a tick chart? Thanks
 
I am using System.Net.WebClient & .DownloadString() to screen scrape...any ideas on the difference between processing for a time chart vs. a tick chart? Thanks

I use the older MFC classes CInternetSession / CHttpConnection and ReadString method as I am more familiar with them, but I suspect they wrap the same API calls as the more up to date .NET framework (maybe I will get around to learning more about it one day).

Technically I would not describe the TrueFX interface at least as screen scraping as this is more like a data feed designed for this purpose rather than say a html page primarily designed for display in a browser.

Not quite sure what the question is, are you intending to display the data in a chart and are pondering the differences between regular time data and data as it changes?
 
Not quite sure what the question is, are you intending to display the data in a chart and are pondering the differences between regular time data and data as it changes?

Thanks for the reply, yes, that's pretty much it, I'm trying to figure out at what interval to query the site...milliseconds?
 
I query every second using a windows timer event, but I could use the same process to query at a much higher rate. I would expect 10ms should work provided that you don't have any single method/function that blocks the message processing loop for any substantial period. If you look at the data you can see how often it changes on average (they have old data for download).

Hope this helps.
 
I query every second using a windows timer event, but I could use the same process to query at a much higher rate. I would expect 10ms should work provided that you don't have any single method/function that blocks the message processing loop for any substantial period. If you look at the data you can see how often it changes on average (they have old data for download).

Hope this helps.

Ok, thank you
 
I'm searching for a good forex feed as well.
During my research I've noticed, however, that TrueFX's looks substantially (hundreds of milliseconds) slower than Dukascopy's, which I already find quite slow.
Taking latency into account, however, since I'm based in the EU (and Dukascopy is based in Switzerland) while the TrueFX feed is streamed from California, I think it can still be a good option for US-based traders.
From what I could gather, CQG takes quotes from FXCM, which - again - doesn't seem superfast.
Does anyone have good suggestions?
 
Top