Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription feature #88

Merged
merged 14 commits into from Nov 9, 2015
Merged

Subscription feature #88

merged 14 commits into from Nov 9, 2015

Conversation

@armstrtw
Copy link
Contributor

@armstrtw armstrtw commented Nov 9, 2015

add subscribe function.

passes R CMD check.

}
\examples{
\dontrun{
subscribe(securities=c("/ticker/TYZ5 Comdty","/cusip/912810RE0@BGN"),

This comment has been minimized.

@eddelbuettel

eddelbuettel Nov 9, 2015
Member

Never seen this notation before. Is that described somewhere in the copious Bloomberg docs?

This comment has been minimized.

@armstrtw

armstrtw Nov 9, 2015
Author Contributor

from blpapi_subscriptionlist.h

you think I should add some of this documentation to the man page?

// STRUCTURE OF SUBSCRIPTION STRING
// ---------------------------------
// The simplest form of a subscription string is a fully qualified
// subscription string, which has the following structure:
//
// "//blp/mktdata/ticker/IBM US Equity?fields=BID,ASK&interval=2"
// -----------/------/-----------/------------------------/
// | | | |
// Service Prefix Instrument Suffix

This comment has been minimized.

@eddelbuettel

eddelbuettel Nov 9, 2015
Member

Yes -- I think that would not hurt.

This comment has been minimized.

@armstrtw

armstrtw Nov 9, 2015
Author Contributor

github knows your intentions before you do... spooky.

This comment has been minimized.

@armstrtw

armstrtw Nov 9, 2015
Author Contributor

you think a straightup copy/paste/reformat from the c++ header would be ok?

This comment has been minimized.

@eddelbuettel

eddelbuettel Nov 9, 2015
Member

Could Bloomberg be offended if we copied? If there is something online, a URL may do. Else a reference to the header?

This comment has been minimized.

@armstrtw

armstrtw Nov 9, 2015
Author Contributor

that's a good point. I think I can produce a link.

@@ -0,0 +1,230 @@
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// subscribe.cpp -- "Bloomberg Data Point" query function for the BLP API

This comment has been minimized.

@eddelbuettel

eddelbuettel Nov 9, 2015
Member

Looks like the RHS needs an update :)

This comment has been minimized.

@armstrtw

armstrtw Nov 9, 2015
Author Contributor

RHS?

I'll fix the file. it's an artifact of copying from bdp.cpp.

This comment has been minimized.

@eddelbuettel

eddelbuettel Nov 9, 2015
Member

(RHS == right-hand side)
And thanks.

This comment has been minimized.

@armstrtw

armstrtw Nov 9, 2015
Author Contributor

so, how do I refresh the PR? cancel it and submit a new one?

@johnlaing
Copy link
Contributor

@johnlaing johnlaing commented Nov 9, 2015

I don't know that we need to tie an exposition of this notation to this particular feature. AFAIK, this structure is common across the entire API. E.g.:

jlaing@xenon:~$ R
> require(Rblpapi)
Loading required package: Rblpapi
> blpConnect(host="app", port=8194)
> bdp("/ticker/TYZ5 Comdty", "PX_LAST")
                    PX_LAST
/ticker/TYZ5 Comdty     126
@armstrtw
Copy link
Contributor Author

@armstrtw armstrtw commented Nov 9, 2015

how does this sit with everyone:
##' @details
##' 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 at the following link:
##' http://static.bloomberglabs.com/api/cpp/doc/3.8/blpapi__subscriptionlist_8h_source.html

@eddelbuettel
Copy link
Member

@eddelbuettel eddelbuettel commented Nov 9, 2015

@johnlaing Yes, thanks, once Whit showed the reference to the header I suspected something like that.

@armstrtw Is it also possible to drop the leading /ticker, ie could one subsribe to IBM US Equity or any odd future?

The link looks fine. That is a nice balance between a brief synopsis and further reference.

@armstrtw
Copy link
Contributor Author

@armstrtw armstrtw commented Nov 9, 2015

yes, I think the ticker can be dropped from the TY example. let me check.

@armstrtw
Copy link
Contributor Author

@armstrtw armstrtw commented Nov 9, 2015

yes, it works without the '/ticker' prefix. I updated the futures example. I left the cusip example in there for variety.

eddelbuettel added a commit that referenced this pull request Nov 9, 2015
Subscription feature
@eddelbuettel eddelbuettel merged commit b928ac7 into Rblp:master Nov 9, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@armstrtw
Copy link
Contributor Author

@armstrtw armstrtw commented Nov 9, 2015

Thanks. do you normally version bump for a new feature? or just leave it as a separate commit?

@eddelbuettel
Copy link
Member

@eddelbuettel eddelbuettel commented Nov 9, 2015

Yes, a fourth digit +1 may be on order as are ChangeLog and NEWS entries.

And once we have that we can probably think about 0.3.2 and CRAN, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.