Margin Service API - Portfolio - Delete
Entity | Portfolio |
Action | Delete |
URL | /portfolios/{id} |
HTTP Method | DELETE |
Parameter Input | Yes |
XML Input | No |
Multiple Output | No |
Synchronous | Yes |
Description
The request allows the Client to send in a request to delete the specified portfolio which was added and margined in CME CORE (Add Portfolio, Update Portfolio and Margin Portfolio). The Client must submit a unique CME CORE assigned internal portfolio identifier in the request URL. If no portfolio is found matching the identifier, an error is returned. An error is also returned if the user isn't authorized to delete the portfolio. Otherwise the server deletes the portfolio and all associated data (transactions, margin, etc.).
Request
Parameter | Name | Type | Required | Notes |
---|---|---|---|---|
reqUserId | Requesting User ID | String | No |
Response
XPath | Name | Type | Required | Notes |
---|---|---|---|---|
/portfolioRpt@status | Request Status | Sync Status | Yes | |
/portfolioRpt/error@code | Error Code | String | No | |
/portfolioRpt/error@msg | Error Message | String | No | |
/portfolioRpt/portfolio@id | Portfolio ID | String | Yes | |
/portfolioRpt/portfolio@status | Entity Status | Entity Status | Yes |
Errors
Code | Description |
---|---|
403 | Returned if the user does not have permission to delete 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 123
exists in the CORE database.
Request
DELETE /portfolios/123
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:portfolioRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="SUCCESS"> <portfolio id="152126915"> <entities/> </portfolio> </ns2:portfolioRpt>
Invalid
Request
A portfolio with ID 123
does not exist in the CORE database.
DELETE /portfolios/123
Response
<ns2:portfolioRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="ERROR"> <error msg="Portfolio ID [123] was not found." code="404"/> </ns2:portfolioRpt>
How was your Client Systems Wiki Experience? Submit Feedback
Copyright © 2024 CME Group Inc. All rights reserved.