Page 1 of 1

Bloomberg Api's basic problem

Posted: March 30th, 2012, 9:16 am
by Panoramix
Hi everybody.I have a problem related to Bloomberg's API. I have a excel 2003 sp3 version on a window machine, i installed all the components contained in the Desktop API, but i still have some problem recalling this object: Private session as blpapicomLib.session. Here is the error:"Compile Error: User-defined type not defined"Where do you think i am wrong?Thanks for your support and helpPano

Bloomberg Api's basic problem

Posted: March 30th, 2012, 10:37 am
by MikeJuniperhill
VBA editor (ALT+F11) - Tools - References - Bloomberg API COM 3.x Type Library (select reference)Does this solve that problem?-Mike

Bloomberg Api's basic problem

Posted: March 30th, 2012, 12:45 pm
by Panoramix
It is working perfectly. Thanks a lot for your suggestion.Pano

Re: Bloomberg Api's basic problem

Posted: July 3rd, 2022, 7:17 pm
by tags
I wish to pull data from the BBG terminal using the python API.
I need to progammatically check that I'm logged in to the Terminal, and if I'm not not, I need to get logged in programmatically.
Is this even possible?
Any hint/advice on this is much appreciated.
Thank you.

Re: Bloomberg Api's basic problem

Posted: July 3rd, 2022, 11:51 pm
by bearish
I wish to pull data from the BBG terminal using the python API.
I need to progammatically check that I'm logged in to the Terminal, and if I'm not not, I need to get logged in programmatically.
Is this even possible?
Any hint/advice on this is much appreciated.
Thank you.
I’m pretty sure you cannot log in to the terminal programmatically. You can of course pull data in other ways, but it will most likely cost you.

Re: Bloomberg Api's basic problem

Posted: July 4th, 2022, 9:18 am
by tags
I wish to pull data from the BBG terminal using the python API.
I need to progammatically check that I'm logged in to the Terminal, and if I'm not not, I need to get logged in programmatically.
Is this even possible?
Any hint/advice on this is much appreciated.
Thank you.
I’m pretty sure you cannot log in to the terminal programmatically. You can of course pull data in other ways, but it will most likely cost you.
thank you bearish. this was what i thought but prefered to check with you guys.  i wsnt to pull GFS/ECMWF weather forecasts x4 a day. So a quick way to do this would be via the BBG API (modifying code of the pdblp python library). The issue I have though is that my BBG terminal unlogs me automatically overnight. I asked several times over the years to BBG support why, but never got a clear answer).

Re: Bloomberg Api's basic problem

Posted: July 4th, 2022, 5:21 pm
by bearish
I hate to say this, but my best (semi-informed) guess would be that this is the exact reason for the nightly logout: to thwart excessive automated data downloads via the terminal. In the minds of Mike and Tom Secunda and other such people behind the architecture, the terminal is for interactive use and the ability to download data from it a direct extension of that mode. They support passive downloads and feeds via B-PIPE and such. Mind you, I’m neither defending nor supporting them, this very problem is causing all manners of headaches for my group.

Re: Bloomberg Api's basic problem

Posted: August 7th, 2022, 8:59 am
by tags
By chance friends do you know how to get "commodity curves" via the BBG API. E.g. to get the futures curves of Brent I would hit <COA Comdty><CCRV><ENTER> in the Terminal and then I can pick up date(s) for which I want that curve. I want to get that curve programmtically either python or C++. Any point much appreciated, Thank you.

Re: Bloomberg Api's basic problem

Posted: August 7th, 2022, 5:11 pm
by bearish
By chance friends do you know how to get "commodity curves" via the BBG API. E.g. to get the futures curves of Brent I would hit <COA Comdty><CCRV><ENTER> in the Terminal and then I can pick up date(s) for which I want that curve. I want to get that curve programmtically either python or C++. Any point much appreciated, Thank you.
I think the easiest way is to generate (or download) the list of tickers that constitute the curve and use a call like bdh on each ticker with the relevant date(s) and a field like px_last. The active contract object doesn’t seem to have a lot of properties exposed via the API.

Re: Bloomberg Api's basic problem

Posted: August 7th, 2022, 8:40 pm
by tags
By chance friends do you know how to get "commodity curves" via the BBG API. E.g. to get the futures curves of Brent I would hit <COA Comdty><CCRV><ENTER> in the Terminal and then I can pick up date(s) for which I want that curve. I want to get that curve programmtically either python or C++. Any point much appreciated, Thank you.
I think the easiest way is to generate (or download) the list of tickers that constitute the curve and use a call like bdh on each ticker with the relevant date(s) and a field like px_last. The active contract object doesn’t seem to have a lot of properties exposed via the API.


Thank you bearish. I read through their documentation as I was expecting some ready-to-use solution, but couldn't find anything relevant, and what you're suggesting actually is quite simple, and ligthwise in terms of calls to the API. Hence I will go for it. I will also download the field FUT_GEN_CUR_TICKER to help me with the labelling of the xaxis. Thanks for your advice.