Margin Service API - Portfolio - Get
The get portfolio request returns a portfolio from the CME CORE database by its identifier.
Entity | Portfolio |
Action | Get |
URL | /portfolios/{id} |
HTTP Method | GET |
Parameter Input | Yes |
XML Input | No |
Multiple Output | No |
Synchronous | Yes |
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
Parameter | Name | Type | Required | Notes |
---|---|---|---|---|
reqUserId | Requesting User ID | String | No |
Response
XPath | Name | Type | Required | Notes |
---|---|---|---|---|
/portfolioRpt/error@code | Error Code | String | No | |
/portfolioRpt/error@msg | Error Message | String | No | |
/portfolioRpt/portfolio@createTime | Create Time | Date/Time | Yes | |
/portfolioRpt/portfolio@desc | Description | String | No | |
/portfolioRpt/portfolio@id | Portfolio ID | String | Yes | |
/portfolioRpt/portfolio@name | Name | String | No | |
/portfolioRpt/portfolio@rptCcy | Reporting Currency | String | No | |
/portfolioRpt/portfolio@updateTime | Update Time | Date/Time | Yes | |
/portfolioRpt/portfolio/entities@clrMbrFirmId | Clearing Member Firm ID | String | Yes | |
/portfolioRpt/portfolio/entities@custAcctId | Customer Account ID | String | Yes |
Errors
Code | Description |
---|---|
403 | Returned if the user does not have permission to access the specified portfolio. |
404 | Returned if the requested portfolio could not be found. |
500 | The 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.