Using R and IBrokers, what is the function to call to get the bid and ask prices of given stock symbol?

117 Views Asked by At

I have not much else to add other than the title. I simply need the name of the function.

1

There are 1 best solutions below

0
brian On

Are you familiar with the documentation? Check pg 18.

https://cran.r-project.org/web/packages/IBrokers/IBrokers.pdf

tws <- twsConnect()
contract <- twsEquity("QQQQ","SMART","ISLAND")
reqMktData(tws, contract)

Look at pg 8 to see how to handle incoming data.