Margin Service API - Portfolio - Get

The get portfolio request returns a portfolio from the CME CORE database by its identifier.




EntityPortfolio
ActionGet
URL/portfolios/{id}
HTTP MethodGET
Parameter InputYes
XML InputNo
Multiple OutputNo
SynchronousYes

Description

The request allows the Client to get or retrieve the contents of a portfolio which has been added to CME CORE (Add Portfolio and Update Portfolio). The client must submit the unique CME CORE-assigned portfolio identifier in the URL request. If no portfolio is found with the identifier, an error is returned. an error is also returned when the user is not authorized to delete the portfolio. If the portfolio is found, it is returned. Only portfolios are returned, does not include transactions or other data.   

Request

ParameterNameTypeRequiredNotes
reqUserIdRequesting User IDStringNo

Response

XPathNameTypeRequiredNotes
/portfolioRpt/error@codeError CodeStringNo
/portfolioRpt/error@msgError MessageStringNo
/portfolioRpt/portfolio@createTimeCreate TimeDate/TimeYes
/portfolioRpt/portfolio@descDescriptionStringNo
/portfolioRpt/portfolio@idPortfolio IDStringYes
/portfolioRpt/portfolio@nameNameString No
/portfolioRpt/portfolio@rptCcyReporting CurrencyString No
/portfolioRpt/portfolio@updateTimeUpdate TimeDate/Time Yes
/portfolioRpt/portfolio/entities@clrMbrFirmIdClearing Member Firm IDString Yes
/portfolioRpt/portfolio/entities@custAcctIdCustomer Account IDString Yes

Errors

CodeDescription
403Returned if the user does not have permission to access the specified portfolio.
404Returned if the requested portfolio could not be found.
500The server was not able to process the request. More information (if available) will be provided in the error message.

Examples

Valid

A portfolio with ID 12 exists in the CORE database.

Request
GET /portfolios/12
Response
<portfolioRpt status="SUCCESS">
  <portfolio id="12" name="My Name" desc="My Desc" rptCcy="USD" createTime="2012-12-20 13:12:01" updateTime="2012-12-20 13:14:22">
    <entities clrMbrFirmId="ABC" custAcctId="123" /> 
  </portfolio>
</portfolioRpt>
Invalid
Request

The request is invalid because no portfolio with ID 12 exists.

GET /portfolios/12
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:portfolioRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="ERROR">
    <error msg="Portfolio ID [1521306] was not found." code="404"/>
</ns2:portfolioRpt>



How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.