Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
167 stars 75 forks source link

error retrieving data when using a B-pipe server (works with local host via DAPI ) #168

Open JasonAQS opened 8 years ago

JasonAQS commented 8 years ago

just started playing with RBLPAPI package, it works great with Bloomberg's DAPI using the local host. blpconnect() rtData <- bdp("ESM6 Index","PX_LAST")

When I tried the same script using B-pipe, it seems to connect fine: blpconnect("64.184.xxx.xx",8194L) # 64.184.xxx.xx is the ip address for the b-pipe server but the bdp function returns an error: rtData <- bdp("ESM6 Index","PX_LAST")

Error: Choice sub-element not found for 'SecurityData'

The strange thing is that from the same workstation, I can retrieve the same data from B-pipe via Excel add-in or Bloomberg's API demo executable. Any thoughts on what may cause this problem?

JasonAQS commented 8 years ago

Update: downloaded the Rblpapi-master from GitHub to look at C++ source code. Now the problem is clear, it's due to authorization. B-pipe requires authorization (via Identity) per request, and the current Rblpapi package's authenticate.cpp doesn't quite support B-pipe's requirements yet. I've added another function (authenticate_impl2) to support B-pipe using token -- getting very close to make it work, I can see the token created, authorization is successful, and an Identity is returned. However, when passing the Identity pointer to subsequent BDP calls (B-pipe requires sending the Identity every request), it doesn't work (most of times it returns INVALID_USER, a few times it hangs). Anyone has a working example of B-pipe authentication in C++? Appreciate it!

ladida771 commented 8 years ago

I have exactly the same problem. Did you make any progress on this? Would you mind sharing your function authenticate_impl2?

michaelcristofi commented 7 years ago

Any updates here? Struggling with the same issue...

randomee commented 5 years ago

This is quite old, but I believe is now solved with @alfredkanzler 's B-PIPE application-name code.

There are still functions w/o support for identity objects, but that's a separate issue. #284

Guessing this is ok to close?

eddelbuettel commented 5 years ago

Yes, I'd think this can be closed.

@JasonAQS @ladida771 @michaelcristofi If you could try the current CRAN version....

Thanks again to @alfredkanzler for adding this.