Sudip,

Based on John's answer, this could give you the most recent bid. Try to
change "BEST_BID" for "BEST_BID1_SZ" on your system.

from.time <-format(Sys.time(),"%Y-%m-%d %H:%M:%OS3")
to.time <-format(Sys.time()+1,"%Y-%m-%d %H:%M:%OS3") #One second later

bar(conn, "TYH4 COMB Comdty", "BEST_BID",from.time,to.time,"1")
#                                           time     open     high      low
   close numEvents volume
#2013-12-12T16:15:00.000 2013-12-12T16:15:00.000 124.1562 124.1562 124.1406
124.1406       769 591844


On Thu, Dec 12, 2013 at 3:54 PM, John Laing <john.laing@gmail.com> wrote:

> Not so much preventing access... not applicable to ref data implies that
> it is applicable to something else. The API dev guide references BEST_BID
> in context of bar data, so I tried that:
>
> > bar(conn, "TYH4 Comdty", "BEST_BID", "2013-12-12 14:30:00.000",
> "2013-12-12 14:31:00.000", "30")
>                                            time     open     high      low
>    close numEvents  volume
> 2013-12-12T14:30:00.000 2013-12-12T14:30:00.000 124.2656 124.2656 124.2344
> 124.2344      1347 1663070
>
> Maybe this will also work for BEST_BID1_SZ.
>
>
> On Thu, Dec 12, 2013 at 3:32 PM, Whit Armstrong <armstrong.whit@gmail.com>wrote:
>
>> I think this has something to do w/ bbg preventing access.
>>
>> I can view the live best_bid1_sz in Excel as well, but in R:
>>
>>
>> ReferenceDataResponse = {
>>     securityData[] = {
>>         securityData = {
>>             security = "TYH4 Comdty"
>>             eidData[] = {
>>             }
>>             fieldExceptions[] = {
>>                 fieldExceptions = {
>>                     fieldId = "BEST_BID1_SZ"
>>                     errorInfo = {
>>                         source = "986::bbdbl26"
>>                         code = 9
>>                         category = "BAD_FLD"
>>                         message = "Field not applicable to security"
>>                         subcategory = "NOT_APPLICABLE_TO_REF_DATA"
>>
>>
>> -Whit
>>
>>
>>
>> On Thu, Dec 12, 2013 at 3:15 PM, Pierre Lapointe <pierrelap@gmail.com>wrote:
>>
>>> I'm am not authorized to see "BEST_BID1_SZ" either.
>>>
>>> However, in Excel, I have access to both "px_last" and "BEST_BID". In R,
>>> I
>>> can only get "px_last".
>>>
>>> The problem is with "BEST_BID" or "BEST_BID1_SZ"
>>>
>>> > bdp(conn, "TYH4 COMB Comdty", "px_last")
>>>                                  px_last
>>> TYH4 COMB Comdty 124.2969
>>>
>>> > bdp(conn, "TYH4 COMB Comdty", "BEST_BID")
>>>                                  BEST_BID
>>> TYH4 COMB Comdty     <NA>
>>>
>>>
>>> On Thu, Dec 12, 2013 at 2:55 PM, John Laing <john.laing@gmail.com>
>>> wrote:
>>>
>>> > Sudip,
>>> >
>>> > I get #N/A Authorization when I try this in Excel, so unfortunately
>>> I'm not
>>> > much help in troubleshooting this. I'm not familiar with this field but
>>> > based on the error I'm guessing it has to do with your exchange
>>> > authorization. Are you seeing this with other fields that might be more
>>> > publicly accessible?
>>> >
>>> > -John
>>> >
>>> >
>>> > On Thu, Dec 12, 2013 at 2:27 PM, Sudip Ray-Chaudhuri <
>>> sudip.rc@gmail.com
>>> > >wrote:
>>> >
>>> > > Hi all,
>>> > >
>>> > > I am trying to get the BEST_BID1_SZ data for a given security. I have
>>> > Rbbg
>>> > > installed and everything set up, including Bloomberg Desktop. I am
>>> able
>>> > to
>>> > > obtain the same data using Excel. Here is the code and the output:
>>> > >
>>> > > > bdp(conn, "TYA Comdty", "BEST_BID1_SZ")
>>> > >            BEST_BID1_SZ
>>> > > TYA Comdty         <NA>
>>> > >
>>> > > Any idea why I can't get this data in R?
>>> > >
>>> > > Thanks
>>> > >
>>> > >         [[alternative HTML version deleted]]
>>> > >
>>> > > _______________________________________________
>>> > > R-SIG-Finance@r-project.org mailing list
>>> > > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> > > -- Subscriber-posting only. If you want to post, subscribe first.
>>> > > -- Also note that this is not the r-help list where general R
>>> questions
>>> > > should go.
>>> > >
>>> >
>>> >         [[alternative HTML version deleted]]
>>> >
>>> > _______________________________________________
>>> > R-SIG-Finance@r-project.org mailing list
>>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> > -- Subscriber-posting only. If you want to post, subscribe first.
>>> > -- Also note that this is not the r-help list where general R questions
>>> > should go.
>>> >
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-SIG-Finance@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions
>>> should go.
>>>
>>
>>
>

	[[alternative HTML version deleted]]

