subscribe | R Documentation |
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
https://bloomberg.github.io/blpapi-docs/cpp/3.8/
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.