Collection of working scripts using the Interactive Brokers TWS API through IB-Ruby
New: Correlation Example Use Polar DataFrames to calculate the correlation between two assets or different timeframes of a single asset.
Its super easy to setup IB-Ruby in a Lxc-Container.
- Require an Demo Account
- Clone IB-Container and install one container on your hardware.
- Enter the container (use
lxc open _container-name_
) - ib-examples is included
enjoy.
Alternatively
- clone this repository
- run the install-script in /setup
For interactive experiments, console
and gateway
scripts are included in the bin-directory
There are three categories
-
Contract
Scripts that deal with IB::Contracts.
Fetch Contract-Details, associated Options, Option-Chains, Market Price, Scanner and historical Data -
Order
Scripts that demonstrate different trading methods.
Limit-Order, Bracket-, Combo-, and Butterfly-Orders
Preview (what if), modify and cancel orders -
Account
Gather Information about the account itself
List Balances and portfolio-positions -
Experimental Jupyter Notebooks are included