Skip to content

Live updating dataframe #9

@KKel414

Description

@KKel414

Hello, I have the following code that I am using to stream data, and hopefully create a live updating plot in R.

Can you please guide me on how I can export the wrap$context$historical field into a R dataframe that is steadily updated as the streamed data comes through?

library(rib)

tickers <- c("AAPL", "GOOG")

wrap <- IBWrapSimple$new()
ic   <- IBClient$new(wrap)

ic$connect(port=7497, clientId=5)

for(i in 1:length(tickers))
  ic$reqHistoricalData(i, IBContract(tickers[i]), endDateTime = "", durationStr = "1 M", barSizeSetting = "1 day", useRTH = "1", 
                       whatToShow = "TRADES", keepUpToDate = TRUE, formatDate = "1")

repeat
  ic$checkMsg()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions