Fund Admin – Retrieving a customer portfolio
T24 supports three types of portfolio:
A Customer Portfolio is a portfolio belonging to a customer of the Bank that may be managed by the Bank on the customer’s behalf. To quickly pull a customer Portfolio, Portfolio, make a GET request using your preferred client to the Holdings Portfolios API including the Customer’s PortfolioID.
Once you return the .json from the Holdings/Portfolio request, you will be able to view all Customer Holdings.
As you can see below, our client, Robert Branson, has multiple assets in his Portfolio.To make use of the data, you’ll need to parse some key fields into your app or web-page.
“instrumentName” is the name of the asset in the Portfolio
“priceCurrency” refers to the currency used to purchase the asset.
“position” refers to the amount of the asset owned
“valueInReferenceCurrency” lists the total value of the investment
In a situation like this, with multiple assets in a Portfolio, you will need to craft some code that makes use of a loop. We would recommend that you make use of a JSON library (of which there are many), which will not only process the data returned from your API call but also output it into a human-readable format.
In the code samples below, you will see examples of Python and Java code which make use of helper libraries, to display the JSON return. Use these samples as a starting point for integrating the API call into your app/web-page.