1

SO,

I am hoping for some clarity on how the Python API works when you are not logged in. I have a Bberg Anywhere account and have some scripts I'd like to run in the morning before I start my day. Do I need to be logged in? If not, do I need to input any username/password credentials to a Sessions object?

Looking for any assistance on this... it would be greatly appreciated.

antonio_zeus
  • 477
  • 2
  • 11
  • 21
  • as long as you don't login elsewhere other than your work PC, the scripts are good to run – Alpha Nov 25 '20 at 03:20
  • You can check this question if it answers your question: https://stackoverflow.com/questions/43515327/bloomberg-anywhere-and-blpapi – Cagri Nov 25 '20 at 18:58
  • do you know within the Python API if you can create a connected session (with your username and password) just in case? – antonio_zeus Dec 02 '20 at 03:13

2 Answers2

3

BLPAPI does work for a few days after the last login to Bloomberg anywhere. This is specifically so that you can run scripts after your Terminal login expires. I think it's 3 days to cover the case of scripts running over the weekend when you leave for the week on Friday.

Logging into Bloomberg anywhere on another PC or even enabling real time data on a mobile device will cause your scripts to stop working.

ytoledano
  • 3,003
  • 2
  • 24
  • 39
  • helpful! do you know within the Python API if you can create a connected session (with your username and password) just in case? – antonio_zeus Dec 02 '20 at 03:13
  • 1
    This is explicitly not possible with DAPI (Desktop API). You need to have the Terminal running. That's what controls the "session" – ytoledano Dec 02 '20 at 11:48
0

You can't pass just username and password from your code, but you can get around that altogether using Server API ("SAPI"). You would just point your code to the SAPI server. Just run the SAPI function on the terminal for more information. Also https://www.bloomberg.com/professional/product/server-api/

NikT
  • 1,590
  • 2
  • 16
  • 29