[R-SIG-Finance] Bloomberg login through R

David Reiner David.Reiner at xrtrading.com
Tue Dec 6 16:45:53 CET 2011


I have a windows task scheduled to run a script to login to Bloomberg at a time before I need to get Bloomberg data.
I suppose you could run the script from within R if you prefer.
(I actually moved on to a C# program, but that is really off-topic.)
As John said, one seems to be able to get data while logged out, but sometimes it will fail, so being logged in is safer.
Here is my script BBLogin.wsf; it is not secure, but we share usage of the BB terminals anyway, so aren't concerned.
If anyone has a better way, please let us know!

<package>
   <job id="vbs">
      <script language="VBScript">
         set WshShell = WScript.CreateObject("WScript.Shell")
         WshShell.AppActivate "1-BLOOMBERG"
         WScript.Sleep 1000
         WshShell.SendKeys "{esc}"
         WScript.Sleep 1000
         WshShell.SendKeys "login~"
         WScript.Sleep 2000
         WshShell.SendKeys "YOURUSERNAME{tab}YOURPASSWORD~"
         WScript.Sleep 1000
      </script>
   </job>
</package>

HTH,
-- David


-----Original Message-----
From: r-sig-finance-bounces at r-project.org [mailto:r-sig-finance-bounces at r-project.org] On Behalf Of John Laing
Sent: Monday, December 05, 2011 10:53 AM
To: Pierre Lapointe
Cc: Ayhan Yüksel (Finans Portföy A.Ş.); r-sig-finance at r-project.org
Subject: Re: [R-SIG-Finance] Bloomberg login through R

This will work to an extent, but is not the intended use. The Bloomberg APIs will continue to work for a time after you log off from the terminal. Eventually the connection will go away.

In response to Ayhan's original question: there is not a way to provide login credentials through R. It is expected that a terminal is already open and connected to Bloomberg, and the API then piggybacks on that session.

John

2011/12/5 Pierre Lapointe <pierrelap at gmail.com>:
> Why don't you try it?
> Type LOFF <GO> on your Bloomberg
> And try to use RBloomberg.
> It works on mine.
> 2011/12/5 Ayhan Yüksel (Finans Portföy A.Ş.) <Ayhan.Yuksel at finansportfoy.com>:
>> Hi,
>>
>>
>>
>> I have a question about gathering data from Bloomberg using Rbloomberg package.
>>
>>
>>
>> If the bloomberg terminal is logged off, is it possible to login to Bloomberg through R?
>>
>>
>>
>> e.g. something like:
>>
>>
>>
>> library(RBloomberg)
>>
>> conn <- blpConnect(username=ABCDE, password=123456)
>>
>>
>>
>> Kind regards,
>>
>> Ayhan Yuksel
>>
>>
>> Bu e-posta'nin icerdigi bilgiler (ekleri dahil olmak uzere) gizlidir. Onayimiz olmaksizin ucuncu kisilere aciklanamaz. Bu mesajin gonderilmek istendigi kisi degilseniz, lutfen mesaji sisteminizden derhal siliniz. Finans Portföy Yönetimi A.S. bu mesajin icerdigi bilgilerin dogrulugu veya eksiksiz oldugu konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne sekilde olursa olsun iceriginden, iletilmesinden, alinmasindan, saklanmasindan sorumlu degildir. Bu mesajin icerigi yazarina ait olup, Finans Portföy Yönetimi A.S.'nin goruslerini icermeyebilir.     The information contained in this e-mail (including any attachments) is confidential. It must not be disclosed to any person without our authority. If you are not the intended recipient, please delete it from your system immediately. Finans Portfoy Yonetimi A.S. makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. Any opinions expressed in this message are those of the author and may not necessarily reflect the opinions of Finans Portfoy Yonetimi A.S.
>>
>>
>>        [[alternative HTML version deleted]]
>>
>>
>> _______________________________________________
>> R-SIG-Finance at 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.
>
> _______________________________________________
> R-SIG-Finance at 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.

_______________________________________________
R-SIG-Finance at 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.


This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof (collectively, "XR Content") are confidential and proprietary to XR Trading, LLC ("XR") and/or its affiliates, and are protected by intellectual property laws.  Without the prior written consent of XR, the XR Content may not (i) be disclosed to any third party or (ii) be reproduced or otherwise used by anyone other than current employees of XR or its affiliates, on behalf of XR or its affiliates.

THE XR CONTENT IS PROVIDED AS IS, WITHOUT REPRESENTATIONS OR WARRANTIES OF ANY KIND.  TO THE MAXIMUM EXTENT PERMISSIBLE UNDER APPLICABLE LAW, XR HEREBY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS AND IMPLIED, RELATING TO THE XR CONTENT, AND NEITHER XR NOR ANY OF ITS AFFILIATES SHALL IN ANY EVENT BE LIABLE FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL AND PUNITIVE DAMAGES, LOSS OF PROFITS AND TRADING LOSSES, RESULTING FROM ANY PERSON'S USE OR RELIANCE UPON, OR INABILITY TO USE, ANY XR CONTENT, EVEN IF XR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES WERE FORESEEABLE.



More information about the R-SIG-Finance mailing list