I am looking for a broker who provides a free trading API for FX. The goal is to develop at-home algorithms in C# (possibly Qt) to run on a fake portfolio, and then later on real money with competitive broker fees.

Would you know some comparison of such APIs?

What do you think of OANDA? Dukascopy? TD Ameritrade?

Here is the list of APIs I have found so far:

  • Delta Trading API
  • FxSpyder
  • AVAFx
  • Dukascopy bank trading API
  • TD Ameritrade
  • FxCM
  • $\begingroup$ free? Would you sit down for months, pay developers a bundle to write a systematic trading architecture, then let any anonymous person on the web use it without even registering their email address or other ID in order to follow up? There is no such interface that you are asking for, simple as that. $\endgroup$ – Matthias Wolf Oct 27 '13 at 7:42
  • 1
    $\begingroup$ ... brokers could provide free API, free possibility to train models on a virtual portfolio, then charge broker fees when trading for real... simple as that ... $\endgroup$ – kiriloff Oct 27 '13 at 8:46
  • $\begingroup$ I think @MattWolf showed good point, brokers don't have interest in supplying API based on fake market infrastructure, because of no income from that. Normally testing is covered by third-party trading platform applications based on data downloaded from broker executed on local client machines. When you want test your strategy you can do internal simulations w/o api and next real simulation w/ api using low capital or find testing system outside your broker infrastructure when based on some well-known protocols. $\endgroup$ – Svisstack Oct 27 '13 at 10:12
  • $\begingroup$ so is your advice to find a simple data feed to start with ? what an API from a broker would provide more is exact replication of market conditions: data frequencies and order latencies, fees, order mechanism... also, development in the API would be to be reused when deciding to trade for eal $\endgroup$ – kiriloff Oct 27 '13 at 11:50
  • 2
    $\begingroup$ Most brokers you mentioned are exclusively targeting the retail crowd with wide spreads, low liquidity, last look, delayed fills and a host of other shennenigans. But I am glad you found the answer to your question yourself $\endgroup$ – Matthias Wolf Oct 27 '13 at 16:39

Take a look at FIX4.4 protocol, accessible from http://www.dukascopy.com/swiss/english/forex/api/fix_api/

Thread about C# libraries: https://stackoverflow.com/questions/4876279/fix-library-for-net

  • $\begingroup$ Thanks! why them and not another one ? what are alternatives ? also, cannot have access to API without sending an email or calling the dukascopy: is it free to use the API, is there free access to virtual portfolio for backtesting ? $\endgroup$ – kiriloff Oct 27 '13 at 2:25

I use MB Trading SDK for automated trading.

It is COM based but easy to integrate with C#.

You can setup a demo account and trade on it for free.


try this http://syscoderblog.blogspot.com.au/2014/05/net-api-for-dukascopy-broker.html

it is a .Net (C# VB) API for dukascopy broker

It has a very nice demo and a monitor utility

  • $\begingroup$ may I ask why my post has been deleted? $\endgroup$ – user8139 May 28 '14 at 1:01
  • $\begingroup$ might be that someone interpreted it as an advertisment or the like. I read the history and your answer seems acceptable however. Thus at least apologies on my part for the perhaps unjust deletion $\endgroup$ – Probilitator May 28 '14 at 5:54
  • $\begingroup$ @user8139 : I deleted your post as it had appeared pure advertisement to me initially. Sorry for the knee-jerk reaction. Undeleted for now. $\endgroup$ – olaker May 28 '14 at 11:54

Here it is, C# API for FX trading in ECN model: https://github.com/mForex/mForex.API

As far as I know, you can create free demo account and subsequently request for API, the only disadvantage is the fact, that real account are in PLN only.


Not the answer you're looking for? Browse other questions tagged or ask your own question.