Subscribe to streaming market data
This function uses the Bloomberg API to stream live market data
subscribe(securities, fields, fun, options = NULL, identity = defaultAuthentication(), con = defaultConnection())
securities |
A character vector with security symbols in Bloomberg notation. |
fields |
A character vector with Bloomberg query fields. |
fun |
An R function to be called on the subscription data. |
options |
An optional named character vector with option values. Each field must have both a name (designating the option being set) as well as a value. |
identity |
An optional identity object as created by a
|
con |
A connection object as created by a |
The subscribe function allows one to subscribe to streaming market quotes.
Full detials of the subscription string can be found in the header file blpapi_subscriptionlist.h.
This function always returns NULL.
Whit Armstrong
## Not run: subscribe(securities=c("TYZ5 Comdty","/cusip/912810RE0@BGN"), fields=c("LAST_PRICE","BID","ASK"), fun=function(x) print(str(x$data))) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.