matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
240 stars 69 forks source link

Question about Response Error #77

Closed ramm001 closed 4 years ago

ramm001 commented 4 years ago

I was testing a code that worked for me yesterday, and I came through a "securityError" message from python. When i digged down the cause of this error, I found that the simplest verion of a code that reproduced an error was from the tutorial of pdblp. Thanks in advance for any help

Code

import pdblp
con = pdblp.BCon(debug=True, port=8194, timeout=5000)
con.start()
con.bdh('SPY US Equity', 'PX_LAST','20150629', '20150630')

Output


con = pdblp.BCon(debug=True, port=8194, timeout=5000)
con.start()
con.bdh('SPY US Equity', 'PX_LAST','20150629', '20150630')
pdblp.pdblp:INFO:Event Type: 'SESSION_STATUS'
pdblp.pdblp:INFO:Message Received:
SessionConnectionUp = {
    server = "localhost:8194"
    encryptionStatus = "Clear"
}

pdblp.pdblp:INFO:Event Type: 'SESSION_STATUS'
pdblp.pdblp:INFO:Message Received:
SessionStarted = {
    initialEndpoints[] = {
        initialEndpoints = {
            address = "localhost:8194"
        }
    }
}

pdblp.pdblp:INFO:Event Type: 'SERVICE_STATUS'
pdblp.pdblp:INFO:Message Received:
ServiceOpened = {
    serviceName = "//blp/refdata"
}

pdblp.pdblp:INFO:Event Type: 'SERVICE_STATUS'
pdblp.pdblp:INFO:Message Received:
ServiceOpened = {
    serviceName = "//blp/exrsvc"
}

pdblp.pdblp:INFO:Sending Request:
HistoricalDataRequest = {
    securities[] = {
        "SPY US Equity"
    }
    fields[] = {
        "PX_LAST"
    }
    startDate = "20150629"
    endDate = "20150630"
    overrides[] = {
    }
}

pdblp.pdblp:INFO:Event Type: 'RESPONSE'
pdblp.pdblp:INFO:Message Received:
HistoricalDataResponse = {
    responseError = {
        source = "bbdbh6"
        code = -4002
        category = "LIMIT"
        message = "uuid: 4687155, SN: 455118, sid: 1031728 Workflow review needed. [nid:3145] "
        subcategory = "WORKFLOW_REVIEW_NEEDED"
    }
}

Traceback (most recent call last):

  File "<ipython-input-6-1f32ce1d92df>", line 5, in <module>
    con.bdh('SPY US Equity', 'PX_LAST','20150629', '20150630')

  File "C:\Users\nrojasr\anaconda3\envs\py36\lib\site-packages\pdblp\pdblp.py", line 275, in bdh
    elms, ovrds)

  File "C:\Users\nrojasr\anaconda3\envs\py36\lib\site-packages\pdblp\pdblp.py", line 307, in _bdh_list
    has_security_error = 'securityError' in d['securityData']

KeyError: 'securityData'

Version Information

'0.1.8'

matthewgilbert commented 4 years ago

You've hit your terminal data limit, I would contact Bloomberg about this.

ramm001 commented 4 years ago

Ok... diggin down on internet i found this thread: https://stackoverflow.com/questions/8791271/bloomberg-api-request-limit which I will assume it is closely related to your answer. Thank you!!

P.D: I contacted you a few days ago about other issues regarding ESG. I am a newbie using Bloomberg and your library. Thanks for readily answering my questions.