Using the Ibrokers account I know how to place a trade with one ticker which , in the example below I place a trade with "DAL"
library(IBrokers)
tws=twsConnect(clientId = 1,host = "localhost", port = 7497 )
contract=twsEquity(symbol = "DAL", exch = "SMART" )
order=twsOrder(action = "BUY", totalQuantity ="10", tif = "OPG" )
placeOrder(twsconn = tws, Contract = contract, Order = order)
However I am interested in trading multiple tickers at once for example how can I place an order to buy "DAL" and "AAL". How can I put multiple orders into IBrokers in R?
I doubt your code even works now. To place another order just place another order. Note that they must have separate ids and the ids have to increase every order.
I don't think that code will work. The defaults for order look to be
LMTwith a price of 0. You may want to tryorderType = "MKT". Check the documentation for IBrokers.I would suggest using a different API, it doesn't look like you have used the R package much so it's not a big deal to switch. It probably won't work for much longer. I think it is unsupported and the API has changed since the last update.