# Create and fill the request for the historical data RefDataService = session.getService("//blp/refdata") If not session.openService("//blp/refdata"): # Open service to get historical data from Print "Connecting to %s:%s" % (options.host, options.port) Help="server name or IP (default: %default)", Parser = OptionParser(description="Retrieve reference data.") Thanks in advance, and I hope this can be of help to anyone using Pandas for finance. I believe I'll need to modify mostly around the 'while(True)' loop toward the end of the 'main()' function, but everything I've tried so far has had issues. Apparently the user who asked the question was able to easily modify that code to work with the new API, but I'm used to having my hand held in R, and this is my first endeavor with Python.Ĭould some benevolent user show me how to get this data into Pandas? There is an example in the Python API (available here: ) called SimpleHistoryExample.py that I've been working with that I've included below. The referenced code in the accepted answer for that question is for the old API, however, and it doesn't work for the new open API. I can get the output in the command prompt just fine, so that's not an issue. I recently started using Python so I could interact with the Bloomberg API, and I'm having some trouble storing the data into a Pandas dataframe (or a panel).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |