IB-API provides a Ruby-Gem ready for use in ruby projects.
Setup a new project
$ mkdir ~/workspace/trading_project && cd ~/workspace/trading_project
$ git init # Version Control
$ cp ../ib-api/.gitignore . # use the same directives than ib-api
$ bundle init # create Gemfile
Edit the Gemfile
and add the following
$ vi Gemfile
gem "ib-api"
and finally
$ bundle install
Now, every script using
require 'bundler/setup'
require 'ib-api'
can access the services of IB-Ruby.
IB-Examples
The IB-Examples repository contains a variety of sample scripts.
A local Console
Copy the /bin
-directory of ib-api
to your project-directory and modify the console
-script to your needs. Details: Interactive Console
(Last update: Jul 2, 2024)