Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make up my mind and choose a broker, however much of my choice depends on the trading API offered. I'm definitely not interested in FIX solutions and I'd very much like a .NET implementation of the client interface.

So far I've looked at MBTrading (poorly implemented, not compatible with modern software stacks), IB (complicated, not .NET, requires their TWS software to be running as a proxy), Thinkorswim (little documentation, not .NET).

I also have some experience with Lime Brokerage's API, which is very nice indeed, however I'm afraid the operation I intend on starting might not meet their minimums.

Are there any good alternatives?

Of course an API is worthless without an efficient broker, so speed of execution and a decent fee structure would be appreciated.

Thanks in advance.


locked by chrisaycock May 24 '13 at 16:55

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

Why the aversion to FIX? – NPE Aug 1 '11 at 10:06
@aix: too many resources would end up going in boilerplate code, I'm the only coder and I'd like to minimize the time before I start trading. Besides FIX comes in different versions and that makes for additional problems, in my opinion. Let's say it feels like overkill for what I'm trying to achieve. – em70 Aug 1 '11 at 10:51
I have looked around as well and have not found any good alternatives to the ones you've mentioned. – Tal Fishman Aug 1 '11 at 12:31
Do any of these offer a full one stop solution? Live data APIs, trading APIs, and even a demo environment? That sure would cut down on the coding time and learning curve. – user3576 Jan 9 '13 at 23:27
Have you looked a cAlgo witch is part of cTrader. It's not an api but has back test functionality that I found useful when I started – user1810626 Jan 10 '13 at 14:39
up vote 13 down vote accepted

Interactive Brokers does have a .NET API, albeit a free (as in speach) one written by Karl Schulze, not IB themselves.


It's written in C# (and IMHO well written). I've examined both it and the Java API and find the .NET version more to my liking. That's probably just because I'm more familiar with .NET than I am with Java.

You're right about TWS, the API talks to a TWS or IB Gateway instance. As far as I can tell, IB Gateway is produced for no other reason than to allow API clients to execute.

The IB API may indeed by overly complicated compared to other APIs -- I've read as much elsewhere. But it's the first trading API I've worked with personally, so I can't say for sure.

+1 but I still don't like the idea of having a gateway (overhead!) Besides, I'm looking for an official implementation, whereas available, for this way if support is needed or things go wrong I can get the required assistance... – em70 Aug 3 '11 at 18:16
Also, you could use the ActiveX API from IB. It integrates fully into C# (including events, code completion in VS, etc.) and works very well. But the other remarks are also true, namely: 1.) it's not the easiest API to learn, and everything is event-based, which is good but more complex then sync calls. 2.) there's no way around TWS/Gateway, and the main problem here is that you need to log into TWS/Gateway once per day. Though there are some workarounds/hacks around that. – Christoph Glur Feb 24 '12 at 14:16
For support on API see: linkedin.com/groups/… – Pam Apr 15 '13 at 9:11

JunoTrade claims to have a streaming .NET API -- http://www.junotrade.com/index.php/junotradeapi

Pinncle Trading - http://www.pcmtrading.com/technology/api.html (supports C# according to the last item).

TD Ameritrade @ codeplex (unoffical)


TD Ameritrade has a streaming API available at their TD AMERITRADE API Support Portal. It is implemented as a web service so you can choose whatever language you'd like. They have examples in many languages, including .NET. My first exploration into automating my trading through TD Ameritrade has been using Java on Windows but I'm switching to C++ on Unix -- fortunately, much of my logic, and the API, will remain he same.


LMAX Exchange has a nicely written .NET API which is free and can be used to in demo environment. However, note that LMAX is mostly a FX platform with few CFDs on equities and commodities.

If I wasn't in the US, I would be all over LMAX. – Arron Nov 27 '12 at 22:59
Thanks, I am aware of LMAX but the question targeted equities directly, not CFDs. I agree about the fact that their API is quite decent, at least on paper and for small investors anyway. – em70 Dec 1 '12 at 21:49

I would suggested you have a look @ Interactive Brokers, they seem to have a very decent API and reasonable fee structure.


Thanks but please refer to my comments about IB... – em70 Aug 1 '11 at 10:51

FXCM's new ForexConnect API offers a C# version (in addition to C++ and Java; they also support all of Linux/Win/Mac/Android/iOS, though the C# version is Windows only, android is java-only and iOS is Objective-C/C++ only).

I find the online samples can be a mix of latest and old version code; however the SDK download contains a Samples directory with lots and lots of examples, so start there. The C++ API is very similar to the C# one. (In fact, the C# API seemed more natural than the C++ one; my guess is they started with C# and then ported it to C++.)


I'm a little surprised that no one has mentioned Fidelity (Wealth-Lab Pro, using C#):



I realize that this has now been extended to retail trading, however for certain types of hedge funds, this is more than good enough. If you're running/testing your own Index, the Index-Lab extension is a cheap way to test things out.

If you want to test some auto-trades and don't require millisecond timing, it's a cheap way to play with various schemes.


protected by chrisaycock Mar 13 '13 at 18:26

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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