[R-SIG-Finance] IBrokers and fill Price

soren wilkening me at censix.com
Mon May 7 13:46:50 CEST 2012


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.



More information about the R-SIG-Finance mailing list