691175002 / BLPInterface

Python Bloomberg API and Pandas Wrapper
49 stars 28 forks source link

for bulkRequest type element overrides fail #2

Open ccnicoc opened 5 years ago

ccnicoc commented 5 years ago

you should use something along these lines:

    for k, v in elements.items():
        if type(v) == datetime:
            v = v.strftime('%Y%m%d')
        overrides = request.getElement("overrides")
        override1 = overrides.appendElement()
        override1.setElement("fieldId", k)
        override1.setElement("value", v)