matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
241 stars 68 forks source link

Bulk Ref on Stock Dividend #65

Open Vivianhe116 opened 5 years ago

Vivianhe116 commented 5 years ago

Code Sample, a copy-pastable example if possible

override = {("DVD_HIST_ALL","Y"),("EndCol",2)} con.bulkref(Ticker = ['SRG IM Equity'],Field = ['DVD_HIST_ALL'], ovrds = override)


#### Problem description

Hi 

I am trying to use pdblp blkref function to get history of dividend (Ex-Date and Amount) for one equity. It seems the ovrd part cannot be any numerical input. The function in Excel works as below: BDS('SRG IM Equity',"DVD_HIST_ALL","Headers","Y","EndCol=2"), but the python scripts above gives me error here: 

secData = security_data_dict['securityData']
TypeError: string indices must be integers

Could you please help to explain what I am missing here? Thanks
matthewgilbert commented 5 years ago

The python API and the excel API are not the same. For differences between the two the best place to look is in the documentation which you can get on Bloobmerg from WAPI <GO> or by talking to the Bloomberg help desk via HELP HELP in the terminal.