lbilli / rib

An R implementation of Interactive Brokers API
GNU General Public License v3.0
34 stars 7 forks source link

Basic data request doesn't work anymore after some last rib source code modifications #21

Open jpuser2 opened 1 year ago

jpuser2 commented 1 year ago

My test script

image

Result in the console

image

Thank you in advance for helping on this

lbilli commented 1 year ago

The code uses IBWrap directly, which is just a base class whose methods don't do anything except print a warning.

In general you want to define your own callbacks wrapper as a new class derived from IBWrap and implement your customized functionality.

IBWrapSimple is an example of such a derived class. It used to be inside the package but now it has been moved to the examples/ folder.

To use it as is, just put a copy of IBWrapSimple.R in your local folder and include it in your R session, i.e. replace:

wrap <- IBWrap$new()

with something like

include("IBWrapSimple.R")
wrap <- IBWrapSimple$new()

Eventually, you want to modify the functions in IBWrapSimple.R to suit your needs.