Giter Club home page Giter Club logo

Comments (14)

matthewgilbert avatar matthewgilbert commented on September 13, 2024

Glad you find the project helpful. This might be possible but I'm unsure since I don't believe bsrch is documented in the Developers Guide. I also don't currently have access to a Bloomberg connection so I can't really test this. In theory it would be fairly straightforward if the ExcelGetGridRequest behaves similarly to the HistoricalDataRequest, you could add an ovrd parameter to the function call and then something like

overrides = request.getElement("overrides")
for ovrd_fld, ovrd_val in ovrds:
    ovrd = overrides.appendElement()
    ovrd.setElement("fieldId", ovrd_fld)
    ovrd.setElement("value", ovrd_val)

@MarekOzana thoughts on this?

from pdblp.

MarekOzana avatar MarekOzana commented on September 13, 2024

I am tied with other things right now, let me ask Bloomberg help and come back.

from pdblp.

matthewgilbert avatar matthewgilbert commented on September 13, 2024

Yes it seems like returning all the results is better default behaviour than limiting the returned data. Having not actually used this functionality and not currently having access to BBG I can't implement this change but if someone wants to implement I'm happy to accept a pull request. Otherwise I can look at implementing next time I have access to BBG.

from pdblp.

TSchulz85 avatar TSchulz85 commented on September 13, 2024

So by default, there is a limit of 5000 items, but you can increase the limit by specifying the override of "LIMIT=20000".
I'm happy to test some things via BBG, but unfortunately, my programming skills are limited, thus I would need some instructions what to do.

from pdblp.

matthewgilbert avatar matthewgilbert commented on September 13, 2024

As previously discussed, since this is undocumented this is just a guess, but something like this may work

overrides = request.getElement("overrides")
ovrd = overrides.appendElement()
ovrd.setElement("fieldId", "LIMIT")
ovrd.setElement("value", 20000)

You could add this to the bsrch function in the pdblp.py module after the request is created, i.e. after line 462. I'd play around with the value of 20000 to make sure it's actually having the desired effect. If you are doing this make sure to set the debug flag to True since this can be quite helpful.

from pdblp.

TSchulz85 avatar TSchulz85 commented on September 13, 2024

Basically I get this error back

NotFoundException: Attempt to access unknown sub-element 'overrides' on element 'ExcelGetGridRequest' (0x0006000d)

from pdblp.

matthewgilbert avatar matthewgilbert commented on September 13, 2024

Hmmm, it looks as if unlike other request types, e.g. HistoricalDataRequest and ReferenceDataRequest, overrides are not supported. To the best of my understanding since this is undocumented functionality I'm unsure how to move forward on this.

from pdblp.

matthewgilbert avatar matthewgilbert commented on September 13, 2024

Checking back on this, I don't seem to be able to reproduce this issue. Possibly Bloomberg has changed the behavior of the upsteam ExcelGetGridRequest service. @TSchulz85 are you still encountering this problem? e.g. I don't seem to have an issue with requests limited to 5000 results.

con = pdblp.BCon()   
df = con.bsrch("FI:BONDS")
df.shape
(136392, 1)

from pdblp.

TSchulz85 avatar TSchulz85 commented on September 13, 2024

Hmm, I actually still have the same problem. Any idea what I could modify to make it work?

from pdblp.

matthewgilbert avatar matthewgilbert commented on September 13, 2024

Hmmm, so to be clear when you run the code I posted above you are seeing 5000? e.g.

con = pdblp.BCon()   
df = con.bsrch("FI:BONDS")
df.shape
(5000, 1)

from pdblp.

TSchulz85 avatar TSchulz85 commented on September 13, 2024

Almost exactly:

con = pdblp.BCon()   
con.start()
df = con.bsrch("FI:BONDS")
df.shape
Out[16]: (5000, 1)

from pdblp.

matthewgilbert avatar matthewgilbert commented on September 13, 2024

I'm not exactly sure what is happening. My guess would be that there is some setting associated with a user profile in a BBG terminal that defines the behaviour. In excel I understand that you can use the LIMIT keyword but since this relies on the ExcelGetGridRequest which has no documentation it is a bit unclear how to do this in the Bloomberg Open API. A possible solution would be to ask the BBG help if there is a user profile setting you could change. Alternatively you could ask what the corresponding override for their Bloomberg Open API is for the excel call =BSRCH("FI:BONDS","LIMIT=20000")

from pdblp.

prd1 avatar prd1 commented on September 13, 2024

Has anyone ever figured out how to use ExcelGetGridRequest? BBG support no help.

from pdblp.

gioxc88 avatar gioxc88 commented on September 13, 2024

same problem

from pdblp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.