Serving the Quantitative Finance Community

 
User avatar
Panoramix
Topic Author
Posts: 2
Joined: March 20th, 2008, 4:13 pm

Bloomberg Api's basic problem

March 30th, 2012, 9:16 am

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
 
User avatar
MikeJuniperhill
Posts: 4
Joined: February 7th, 2004, 11:57 am

Bloomberg Api's basic problem

March 30th, 2012, 10:37 am

VBA editor (ALT+F11) - Tools - References - Bloomberg API COM 3.x Type Library (select reference)Does this solve that problem?-Mike
 
User avatar
Panoramix
Topic Author
Posts: 2
Joined: March 20th, 2008, 4:13 pm

Bloomberg Api's basic problem

March 30th, 2012, 12:45 pm

It is working perfectly. Thanks a lot for your suggestion.Pano
 
User avatar
tags
Posts: 3159
Joined: February 21st, 2010, 12:58 pm

Re: Bloomberg Api's basic problem

July 3rd, 2022, 7:17 pm

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.
 
User avatar
bearish
Posts: 5180
Joined: February 3rd, 2011, 2:19 pm

Re: Bloomberg Api's basic problem

July 3rd, 2022, 11:51 pm

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.
 
User avatar
tags
Posts: 3159
Joined: February 21st, 2010, 12:58 pm

Re: Bloomberg Api's basic problem

July 4th, 2022, 9:18 am

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).
 
User avatar
bearish
Posts: 5180
Joined: February 3rd, 2011, 2:19 pm

Re: Bloomberg Api's basic problem

July 4th, 2022, 5:21 pm

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.
 
User avatar
tags
Posts: 3159
Joined: February 21st, 2010, 12:58 pm

Re: Bloomberg Api's basic problem

August 7th, 2022, 8:59 am

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.
 
User avatar
bearish
Posts: 5180
Joined: February 3rd, 2011, 2:19 pm

Re: Bloomberg Api's basic problem

August 7th, 2022, 5:11 pm

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.
 
User avatar
tags
Posts: 3159
Joined: February 21st, 2010, 12:58 pm

Re: Bloomberg Api's basic problem

August 7th, 2022, 8:40 pm

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.