Archive for the 'ATS' Category

Berkeley DB C# Bindings

Berkeley DB is an excellent Transactional Data Store. Historically it has had a strong C and Java following, but with the recent 4.8 release, they have added C# bindings, finally opening up Berkeley DB to C#.

This is a non-relational database, which is well suited for things like raw tick data, where you are not querying them by values, but instead by an indexed time and symbol field.

To give you an idea of why this is important, take a look at their white paper from 2006 on performance. In a transacted environment they achieved 125,486 single record writes per second. With modern 2009 hardware, and multiple CPU / Solid State Disk systems, this could readily record every single tick coming off of the NYSE and NASDAQ (multiple million per second).

Check them out at Oracle Berkeley DB. I’m in the process of testing this out for our historical logging, and am very impressed so far, even on commodity hardware.

Interactive Brokers 9.30 Beta API Release

Whew – two releases in a row, I had not been checking IB’s site to see when they released a new API, but apparently they just did, so here is an update. In addition to the usual IB changes, which are documented here, I included some changes submitted by RLaumeyer to make creating contracts easier. Right now there is only an Option class and an Equity class, please submit classes you have created, and I will fold them in. The same goes for any other user changes, submit them, and I will try to incorporate them.

Please download release 9.3.0.3 here.

*.*.*2 Bug Fix Release

Interactive Broker’s specification for "m_right" is

String m_right

Specifies a Put or Call. Valid values are: P, PUT, C, CALL.

 

I chose to make the RightType enumeration translate to "PUT" and "CALL". A bug report from the yahoo forums illustrated that this is no longer true, and that "P" and "C" are the only accepted values.

Please download the bug fix versions

9.2.0.2 and 9.1.0.2

Both also available under utilities.

Interactive Brokers 9.20 Beta C# Client

I have completed the changes necessary for the 9.20 Interactive Brokers API. The new C# client release is version 9.2.0.1 (creative versioning scheme, I know).

Changes

The beta API adds support for five second bars (similar API to the request historical bars), adds two new tick types, Shortable and Last Timestamp, adds a new current timestamp method, and updates the order status event to add a whyHeld field. The release notes are available from Interactive Brokers here.

I have updated the online documentation to the 9.20 release at http://ibhelp.dinosaurtech.com.

I have also included a Visual Basic sample with this release. The C# client module is fully CLR compliant, and can be accessed from any language.

Download

So without further ado, download the latest release here.

Please submit any issues on the forums.

Interactive Brokers C# Client

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

Please note that I will maintain the latest on my utilities page.