Firstly, let me say that the Gain Capital API is free. However, having said that, we all still want free things to be good. Gain Capital's API is good, but it could be better. Here are some quirks in the API which you might like to know about.
- Trading through their API is not allowed in their mini account. This issue has been raised many times in their forum, and if it is a smart company, it will change this policy in the near future.
- API trading in their demo account behaves slightly differently to API trading in their live account. This one, combined with the fact API trading is not allowed in a mini account, means some testing has to be done while trading in 100K accounts. This is not acceptable.
- Further, they change stuff without prior notice. Suddenly code that worked before no longer does.
- Instead of paying/deducting interest, they go back and adjust the entry price of your trade. I think it's a bizarre form of bookkeeping.
- They wipe your trading history everyday at 5PM New York time (or something like that). If you closed a trade at 4:59PM, and ran TS at 5:01PM, that trade would not show up in the downloads.
- When downloading historical data (which, for Gain Capital, means back as far as 7 days), you have to wait a bit between subsequent requests for this data. One request downloads one currency's data. So, if you want 2 currencies' historical data, you download one, then wait a bit, then download the other. (N.b. this applies only to downloading their historical data - not to their real-time feed).
Now, the question is, how long is "a little bit"? They don't specify it anywhere. In TS, "a little bit" has been taken to mean 1 minute.
- They provide only tick data, and interval data (open, high, low, close) has to be created manually. Fortunately, TS does this for you.
But, this means you will always be storing tick data, which will make your database huge. Allow 1Gb per currency per year.
The good part is, as I said, it's free. The Oanda API costs US$600 to obtain, and then US$600 every month (but is discounted if you use it a lot).
The other good part is that Gain Capital has gigabytes-worth of historical data, going back to the year 2000, available for download. And, you can load these text files into Thinking Stuff so you can backtest your trading systems over many years. Detailed instructions here.