[R-SIG-Finance] IBrokers and fill Price

Mark Harrison harrisonmark1 at gmail.com
Tue May 8 20:49:17 CEST 2012


Soren -

Thanks for the response.  I am not sure I have a good handle on the
'eWrapper' or what I should be doing with it so any more help there
would be appreciated.

Having said that I have been looking at code and trying reqExecutions.
 Is the reqExecutions supposed to return anything?  The IBrokers
reference seems to imply reqExecutions is not going to return
anything.  Is this a case of needing to run the below followed by a
twsCALLBACK?

# reqExecutions test

tmpExFilter <- twsExecutionFilter(clientId = '2', , symbol = symbol,
exchange = "NYMEX")
reqExecutions(tws, reqId = id, ExecutionFilter = tmpExFilter)

On Mon, May 7, 2012 at 6:46 AM, soren wilkening <me at censix.com> wrote:
> For getting the actual fill price you should use
>
> reqExecutions()
>
> instead of
>
> reqOpenOrders()
>
> I am even surprised to hear that for a MKT order, there is price information
> containted in the result of the reqOpenOrders() !
>
> I am not anywhere near my R code right now but as a first step, you should
> look at the sourcecode of the
>
> eWrapper()
>
> function/object. One of its purposes is to read events that come back from
> the API and put the data containted in them (i.e. the execution price) into
> a format that you can use. But the unmodified eWrapper will, by default only
> 'cat' the data to the console. I cannot verify this now but i think even
> reqOpenOrders() may use an 'eWrapper' object to produce the output that you
> have attached below. Just look at the source of reqOpenOrders by typing
> 'reqOpenOrders' at the R prompt, without the brackets.
>
> hth
>
> Soren
>
> http://censix.com
>
> -----
> http://censix.com
> --
> View this message in context: http://r.789695.n4.nabble.com/IBrokers-and-fill-Price-tp4613710p4614595.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



More information about the R-SIG-Finance mailing list