Closed walterkissling closed 3 years ago
In case anyone is interested, the fix is to create a new function, much like BDP, but replace:
request = service.createRequest('ReferenceDataRequest')
with
request = service.createRequest('PortfolioDataRequest')
Thanks for update. In this case we may need to create another bd
function to connect to this portfolio request.
added one parameter to solve this temporarily. could you check out if it works: https://github.com/alpha-xone/xbbg/blob/e5c4e43d8697eca16389926e5ccf130a12c8b896/xbbg/blp.py#L56
Can install below beta to try out: pip install xbbg==0.7.1b3
Thanks! Yes it works fine.
Great
Hello guys, I know this is an old thread but I really need some help. I am trying to retrieve all the data of a portfolio and I keep getting {} as response.
This is what I am running:
`def getPortfolio():
portfolio = request.args.get('portfolio')
result = blp.bds(tickers=["U302412345-20", flds=['PORTFOLIO_DATA'], use_port=True) result_object = result.to_json[orient = 'columns']
return result_object `
If anyone could give me a light. There's equities, cash, and some other things in that portfolio ID I am calling.
Thanks.
What kind of portfolio is that / ticker is that ? On Feb 17, 2023 at 11:32 PM -0500, itsfreddyrb @.***>, wrote:
Hello guys, I know this is an old thread but I really need some help. I am trying to retrieve all the data of a portfolio and I keep getting {} as response. This is what I am running:
def getPortfolio(): portfolio = request.args.get('portfolio') result = blp.bds(tickers=["U302412345-20", flds=['PORTFOLIO_DATA'], use_port=True) result_object = result.to_json[orient = 'columns'] return result_object
If anyone could give me a light. There's equities, cash, and some other things in that portfolio ID I am calling. Thanks. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
That's the portfolio ID. What am I supposed to pass? Thanks.
Oh I just didn’t even know this was possible, kinda neat On Feb 18, 2023 at 7:40 PM -0500, itsfreddyrb @.***>, wrote:
That's the portfolio ID. What am I supposed to pass? Thanks. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Yes, it would be neater if I knew how to do it 😂😂😂
Haha, I hear you.  I guess first question is, how do you do in the excel API? Same way you have it in the code ? On Feb 19, 2023 at 11:10 AM -0500, itsfreddyrb @.***>, wrote:
Yes, it would be neater if I knew how to do it 😂😂😂 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Yep, doing exactly that. But I'm getting { } and that's it.
Is there anything in Result before calling to json ? On Feb 19, 2023 at 12:12 PM -0500, itsfreddyrb @.***>, wrote:
Yep, doing exactly that. But I'm getting { } and that's it. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Nope, nadda..
Anyone has any idea? @alpha-xone ?
Don't know if you figured it out already but I think what's missing is you need to append the world "Client" at the end of the portfolio id. So in your example it would be "U302412345-20 Client".
Hello, I am able to pull portfolio information for a custom portfolio in Excel and in xbbg using BDP only. When I try to pull data using BDS nothing is returned.
The code I am using is:
blp.bds('<PORT ID> Client','PORTFOLIO_DATA')
And the results is just "__". If I use the same formula in Excel it works fine.
Anyone having the same issue?