R/twsExecution.R

Defines functions `twsExecution`

`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")

}
algoquant/IBrokers2 documentation built on Dec. 4, 2019, 12:04 p.m.