alpha-xone / xbbg

An intuitive Bloomberg API
https://xbbg.readthedocs.io/
Apache License 2.0
244 stars 51 forks source link

Connection Checking Object #79

Closed RickyLiu-Tarobo closed 1 year ago

RickyLiu-Tarobo commented 1 year ago

Hello,

I wonder if there is any function to check connection status and establish the object passing to the further process like using function bdh or bds.

I have tried using blp.conn.connect_bbg() and blp.conn.bbg_session(), and it indeed does do the checking purpose and it return the Session object.

However, I have no idea how to return an object which can be like a bridge link between Bloomberg API and the local computer and help me do the getting data.

Appreciate!

alpha-xone commented 1 year ago

xbbg tries to hide connections and let ppl makes queries directly. In case you need the connection object explicitly, you can use package blp written by Matthew.

Behind the scene, Bloomberg API tries to connect periodically by default. So most of the time it's ok even if you disconnect from time to time.

RickyLiu-Tarobo commented 1 year ago

Got it. Thanks a lot