powered by
This function uses the Bloomberg API to stream live market data
subscribe(securities, fields, fun, options = NULL, identity = defaultAuthentication(), con = defaultConnection())
This function always returns NULL.
A character vector with security symbols in Bloomberg notation.
A character vector with Bloomberg query fields.
An R function to be called on the subscription data.
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.
An optional identity object as created by a blpAuthenticate call, and retrived via the internal function defaultAuthentication.
blpAuthenticate
defaultAuthentication
A connection object as created by a blpConnect call, and retrieved via the internal function defaultConnection.
blpConnect
defaultConnection
Whit Armstrong
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.
https://bloomberg.github.io/blpapi-docs/cpp/3.8/
if (FALSE) { subscribe(securities=c("TYZ5 Comdty","/cusip/912810RE0@BGN"), fields=c("LAST_PRICE","BID","ASK"), fun=function(x) print(str(x$data))) }
Run the code above in your browser using DataLab