Broker Trading APIs with .NET Support
Summary
The document collects historical suggestions for traders seeking broker APIs usable from .NET or C#. It describes Interactive Brokers’ API as requiring TWS or IB Gateway, while noting a community-written C# client. Other replies mention web-service or streaming interfaces associated with TD Ameritrade, JunoTrade, Pinnacle Trading, LMAX, FXCM, and Fidelity’s Wealth-Lab tools. The discussion also raises practical selection criteria: execution speed, fees, documentation, platform dependencies, supported markets, and minimum account or business requirements.
These are user reports and suggestions, not a systematic comparison or independent assessment. Several named products and links may have changed since the discussion, and the replies provide limited evidence about current availability, reliability, latency, or costs. The list is best read as a set of historical leads and evaluation dimensions; traders should verify present API access, supported order types, platform requirements, and commercial terms directly before choosing a broker.
Key ideas
- The discussion lists brokers and tools that respondents reported as supporting .NET or C# interfaces.
- Interactive Brokers’ interface was described as communicating through TWS or IB Gateway, with a community-written C# client also mentioned.
- The replies cite streaming and web-service approaches, which may allow different programming languages to connect.
- Broker choice also depends on execution speed, fees, documentation, platform dependencies, and business minimums.
- The suggestions are historical reports and do not establish present-day availability or performance.
Tags
Full text
# Which brokers offer a .NET stock trading API? # Which brokers offer a .NET stock trading API? 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. ## Answer by mike (score 13, accepted) https://quant.stackexchange.com/a/1574 Interactive Brokers does have a .NET API, albeit a free (as in speach) one written by Karl Schulze, not IB themselves. http://www.dinosaurtech.com/utilities/ 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. ## Answer by Jerry (score 6) https://quant.stackexchange.com/a/1581 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) ## Answer by John Carse (score 5) https://quant.stackexchange.com/a/1589 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. ## Answer by Alexey Kalmykov (score 4) https://quant.stackexchange.com/a/4634 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. ## Answer by jordan.baucke (score 2) https://quant.stackexchange.com/a/1556 I would suggested you have a look @ Interactive Brokers, they seem to have a very decent API and reasonable fee structure. http://www.interactivebrokers.com/en/p.php?f=programInterface ## Answer by Darren Cook (score 0) https://quant.stackexchange.com/a/2983 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++.) ## Answer by bill_080 (score 0) https://quant.stackexchange.com/a/7490 I'm a little surprised that no one has mentioned Fidelity (Wealth-Lab Pro, using C#): https://www.fidelity.com/trading/advanced-trading-tools/strategy-testing/overview https://www.fidelity.com/trading/advanced-trading-tools/strategy-testing/faqs 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.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.