View source: R/reqMktDataType.R
reqMktDataType | R Documentation |
Set the market data type with TWS
reqMktDataType(conn, mktDataType = 3)
conn |
a valid |
mktDataType |
market data type code |
This function sets the market data type that will be returned by
TWS when reqMktData
is called.
Real-time: Live data is streamed back in real time. Market data subscriptions are required to receive live market data.
Frozen: Market data is the last data recorded at market close. Frozen data requires TWS/IBG v.962 or higher and the same market data subscriptions necessary for real time streaming data.
Delayed: Market data 15-20 minutes behind real-time (depending on the exchange). Automatically use delayed data if user does not have a real-time subscription. Ignored if real-time data is available.
Delayed-frozen: Requests delayed "frozen" data for users without market data subscriptions.
NULL
(invisibly)
Joshua M. Ulrich
Interactive Brokers API: https://interactivebrokers.github.io/tws-api/index.html
twsConnect
,
reqMktData
## Not run: tws <- twsConnect() contract <- twsEquity("QQQQ","SMART","ISLAND") # set market data type to 'delayed' reqMktDataType(tws, 3) reqMktData(tws, contract) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.