R/twsExecution.R

`twsExecution` <- 
function(orderId,
         clientId,
         execId,
         time,
         acctNumber,
         exchange,
         side,
         shares,
         price,
         permId,
         liquidation,
         cumQty,
         avgPrice) {

  # special constructor if called with no args
  if(is.null(names(match.call()[-1])))
    return(do.call('twsExecution', rep(list(NULL),13)))

  structure(list(orderId=orderId,
                 clientId=clientId,
                 execId=execId,
                 time=time,
                 acctNumber=acctNumber,
                 exchange=exchange,
                 side=side,
                 shares=shares,
                 price=price,
                 permId=permId,
                 liquidation=liquidation,
                 cumQty=cumQty,
                 avgPrice=avgPrice),
            class="twsExecution")

}
hgodinez/ibrokers documentation built on May 17, 2019, 3:57 p.m.