I have spent quite some time tirelessly porting the Interactive Brokers Java Socket Interface to C#. My initial port corresponds to the TWS API version 9.10, and shortly I will release a version which corresponds to the TWS API Beta 9.20.
Why did you do this?
I’m sure many of you are wondering why I would spend so much time on this, when Interactive Brokers now makes a .net version available through their J# compiler. The reasons are many, but mainly the J# component breaks a lot of C# design rules, and is poorly documented. My port places the documentation inline, so Visual Studio will bring up the messages, and so you are not working with cryptic const values.

Support / Stability
I plan to simultaneously support two C# clients, corresponding to the latest release of the TWS API as well as the TWS Beta API. My assembly versions will match the TWS API with an additional revision to correspond to my changes. For example, this initial release’s version is 9.1.0.1 corresponding to TWS API 9.10 and my release version 1. Please note that this is release version 1. I am considering this an alpha release as I have mechanically ported and cleaned up a lot of the code, but have not thoroughly tested every function yet.
License
The source is free for you to use in any application you like. I ask, but do not require, you to give me credit and a link back if you like it. I also ask, but do not require that if you improve the library, or find any problems that you send me your changes / problem report, so I can continue to make this better. I want to be clear that I do not hold any liability or responsibility for any use / content of this code.
Documentation
I have published MSDN style documentation from generated from the library at http://ibdoc.dinosaurtech.com. This documentation was populated from Interactive Broker’s User Guide, and notes from the IB Yahoo Forum and was generated using Microsoft Sandcastle with DocProject. I will continue to revise it on feedback from users, and as I find room for improvement.
Forum
I have created a forum, where I would like to collect problem reports / feature requests at http://www.dinosaurtech.com/forums/ and ask that any users register and provide feedback there. I will try to be very responsive, and incorporate your feedback.
Credits
This library is a port of the Interactive Brokers Java library, so of course I would like to credit the interactive broker’s developers for their API. I also used code from an article by Javier Compos "Description Enum TypeConverter" in order to transform the ugly consts to pretty enumerations with overridden ToString() functions.
Downloads
- Version 9.1.0.1 Library – July 8, 2007 – Alpha – Corresponds to IB API 9.10
- Documentation
Please note that I will maintain the latest on my utilities page.
http://www.dinosaurtech.com/uploads/2007/07/krsatsibnet-9101.zip
Um, where is this?
Sorry about that! I just corrected the article’s link, but it is located at http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9101.zip
Thanks!
-Karl
I sent you the source – did you get it?
Strange – I didn’t get it – try sending to email hidden; JavaScript is required, thanks!
-Karl
nPLot code sent twice to email hidden; JavaScript is required – you have a spam block on your smtp server or client? No attachment sent – just a link.
Well, this seems to work: http://www.marketmeat.com/tools/nplot/fartchart.zip
So I’ll leave it up for a day or so and then take it down.
Wow,
Too bad this wasn’t available a few months ago, before I finished my ATS rewrite based on the J# .NET component. Quick q for you – what are some specific disadvantages of the J# component? I know you mentioned it breaking some c# rules but anything else? Just wanted to consider if I should switch over…
GREAT JOB. Thanks a lot.
I am trying to download docs but it seems
“Download Compiled Help” link is broken.
Could you fix that please?
Regards,
Sam.
hi, i want to use .NET brokers for connect to an access table, could it help me?, im learning .NET with C#
Thanks
I have a problen when i run this program and it gives error “Socket unhandled “:he target machine actively refused” could any one can help me regarding this problem
Hello – that is just saying the client cannot access TWS. Do you have TWS running with the socket client support enabled?
yes i got the soloution..thank u sorry for late reply
Im going to use your sweet API for my algo trading class, if thats alright with you. Ill give you your due props. One thing, do you have a sample line of code that connects an instance of the Contract class to an Option? Something like this:
m_Contract = gcnew Contract( 71178557, “IBMBB”, Krs::Ats::IBNet::SecurityType::Option, “2010/02″, 110.0, Krs::Ats::IBNet::RightType::Call, “100″, “SMART”, “USD”, “IBMBB”, “SMART”, Krs::Ats::IBNet::SecurityIdType::CUSIP, “” );
But, this doesnt work, and Im not sure if I need to get the CUSIP or is there some other way?
Thanks!
Hi,
The link to the documentation is broken (http://ibdoc.dinosaurtech.com).
Can you give the right link?
Hi,
Would it be possible to provide the correct link to the documentation.
Thanks
you sir are a genius and a saviour.
I will check out your libraries and hopefully use these in the upcoming project. If I can help you in the future maintaining these I’d be happy to.
I will get back to you once the project is under way.
Nice one
Simon
Hi,
I want to place a order and update order..What is the exect code.Any one help me..Its in c#.. thank you ..