I apologize ahead of time for the blurb.? One time happening out of respect for the list.? But since someone asked ...
This is the Interactive Brokers Reactive Engine, aka IBKRE.?
Found here:
It has a couple of examples here:
There is a brief, rough draft "tutorial" (with a bunch of typos), on how to use IBKRE.? Check it out!! :
Scroll down and at least read the description of the first code example.
Here is another example for some code invoking market data, getting con ids, option chains via Sec Def Parameters, etc found here:
Given a list of stocks and exchanges, get the con-id for each stock, for each stock/exchange combo get the possible strikes (the option chains via the infamous Sec Def Params API), and finally to verify the option chains invokes contract details for filter the possible option chain from Sef Def Params to the actual valid available options. Oh and all while this is going on it is also getting market data for open, close, last, volume, implied volatilities or whatever.
This is A LOT of API calls.? The key point of this example is to show how IBKRE is performing all of this stuff concurrently, all at the same time.? It will run through 100s even 1000s of option chains in a reasonable period of time (constrained by IBK's API rate limits).? CAVEAT: This example has an "api rate limiter" in the code that has a bug as I was in the middle of changing to another approach.?
About Racket:
While it is Lisp, it is in Racket (a variant) and not Common Lisp or Scheme.? Frankly it is probably one of the best languages out there.? It has been around for a long time and has a very stable core of maintainers, many of them professors, grad students, academics, hardcore developers.? One of the core leaders won the Turing Award from CS (the Nobel Prize of CS) a few years back partly for Racket. It is very stable, maintained and active.? It is not a one man fly-by-night hobby language by any means.
You can read all about Racket here:
Racket Highlights:
- AMAZINGLY well documented. See
- Native compilation like C or Java granting decent performance.
- High level like Python or Ruby.
- Cross platform.? Runs on Mac, Linux, Windows, ARM (Raspberry Pi).
- Pretty decent GUI set for graphical programs that runs cross platform as well.? i.e. Your graphics gui programs, plots etc will run on Mac, Linux and Windows.
- Bug reports are addressed very quickly with pretty much immediate turn around.
- Robust plotting library for graphs and charts.
- Batteries included core of libraries found here:
About the IBKRE Library.
My first iteration took a standard approach to concurrency using async code, futures, thread queues, CML constructs, condition variables etc.? And while it worked OK I found I was spending too much time dealing with machinery and not enough time with my stock trading logic. The IBKRE is a Actor based approach that personally I think has been the perfect fit for working with the IBK API and is MUCH easier to use.
Library Caveats:
- Alpha / Early Beta code.
- Some aspects of the library have not seen widespread code use so may have an issue here or there.
- I have deliberately NOT added any of the code for order placement at this time.? (Soon)? I did not want someone placing orders and having it go wrong for them on my karma balance until things were shaken down.
I do use it all the time and someone can expect a quick fix for any bug etc.