I am not sure wether I should post this question here or on stack overflow, but I'll give it a shot anyway.

I am trying to get my portfolio from PORT in bloomberg. Basically I am trying to automate a process where the prtofolio is extracted and then emailed. The issue is that i do not have an internal file with the different positions and sizes, it is only on Bloomberg. So I cannot rebuil the protfolio. Formatting and emailing is not an issue but I do not see how to get data from PORT. I first checked through excel unsuccessfully then I tried with the python API vut the documentation is quite limited so I could not find what I was looking for. Any help would be appreciated


  • $\begingroup$ btw I am not very experimented with bloomberg. i am used to programming but not so much with bloomberg $\endgroup$
    – A.david
    Feb 16 '18 at 9:36
  • $\begingroup$ As far as I know, you can only extract it manually from the PORT holdings screen. Probably worth confirming with Bloomberg help desk. I'd be interested to know the answer you get. $\endgroup$
    – assylias
    Feb 16 '18 at 9:56
  • $\begingroup$ great thanks. I'll try to confirm with them and let you know. It is definitely something that should be added to API. I'll probably suggest it ob github. I am sure some one more gifted than me will find a solution $\endgroup$
    – A.david
    Feb 16 '18 at 10:00

Not sure if this response is useful for OP after 2 years. But in case anyone is searching for solution:

refDataService = session.getService("//blp/refdata")
request = refDataService.createRequest("PortfolioDataRequest")
request.append("securities", "UXXXXXXXX-XX Client")
request.append("fields", "PORTFOLIO_DATA")

The createRequest() should use the parameter "PortfolioDataRequest". For more see documentation of C++ BLPAPI: The Python API is just a wrapper.


I do not use the Python API, but I am sure you can retrieve PORT data via the API. In R, with package Rblpapi, you could say

getPortfolio("<Portfolio ID>", "PORTFOLIO_DATA")

and receive the portfolio as a data frame. The <Portfolio ID> you see in PRTU; you may need to append the word client.

  • $\begingroup$ Great thank you very much. I just saw your answer. Maybe I will use R then. $\endgroup$
    – A.david
    Feb 19 '18 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.