Page tree
Skip to end of metadata
Go to start of metadata
The add portfolio request deletes an existing portfolio and its associated content in the CME CORE database.

 

 

EntityPortfolio
ActionDelete
URL/portfolios/{id}
HTTP MethodDELETE
Parameter InputYes
XML InputNo
Multiple OutputNo
SynchronousYes

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

ParameterNameTypeRequiredNotes
reqUserIdRequesting User IDStringNo 

Response

XPathNameTypeRequiredNotes
/portfolioRpt@statusRequest StatusSync StatusYes 
/portfolioRpt/error@codeError CodeStringNo 
/portfolioRpt/error@msgError MessageStringNo 
/portfolioRpt/portfolio@idPortfolio IDStringYes 
/portfolioRpt/portfolio@statusEntity StatusEntity StatusYes 

Errors

CodeDescription
403Returned if the user does not have permission to delete 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 123 exists in the CORE database.

Request
DELETE /portfolios/123
Response
<portfolioRpt status="SUCCESS">
  <portfolio id="123" status="DELETED" />
</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>
  • No labels