Page tree
Skip to end of metadata
Go to start of metadata
The calculate margin request performs a margin calculation on an existing portfolio with optional additional transactions.

Description

The request allows the client to calculate the margin of an already existing portfolio which was added to CME CORE (Add Portfolio and Update Portfolio). The client must specify the margin type and must submit the unique CME CORE assigned portfolio identifier in the request URL. The URL may optionally include additional (transient) transactions by value or the transactions to exclude by identifier from the portfolio. Once the Client/ CMF (Clearing Member Firm) has submitted the above, the server will queue up the request for execution after which it is submitted to the risk engine for processing a request identifier and status that are returned. If the portfolio does not exist, referenced transactions do not exist, or there are other errors an error message/code will be returned.   

EntityMargin
ActionCalculate
URL/margins
HTTP MethodPOST
Parameter InputNo
XML InputYes
Multiple OutputNo
SynchronousNo

 

 

 

Request

XPathNameTypeRequiredNotes
/marginReq@reqUserIdRequesting User IDStringNo 
/marginReq/margin@portfolioIdPortfolio IDStringYes 

Response

XPathNameTypeRequiredNotes
/marginRpt@statusStatusAsync StatusYes 
/marginRpt/margin@createTimeCreate TimeDate/TimeYes 
/marginRpt/margin@idIDStringYes 
/marginRpt/margin@portfolioIdPortfolio IDStringYes 
/marginRpt/margin@updateTimeUpdate TimeDate/TimeYes 
/marginRpt/error@codeError MessageStringNo 
/marginRpt/error@msgError MessageStringNo 

Errors

CodeDescription
400Bad XML syntax or missing content. More information will be provided in the error message.
403Returned if the user does not have permission to perform calculations on the portfolio
500The server was not able to process the request. More information (if available) will be provided in the error message.

Examples

Basic

This example requests that a portfolio with ID 123 be margined.  The unique ID of the margin request is returned along with the portfolio identifier.

Calculating Margin for CMEUS

Request
POST {{API_URL}}/margins
<core:marginReq xmlns:core="http://cmegroup.com/schema/core/1.2">
  <margin portfolioId="123" />
</core:marginReq>
Response
<ns2:marginRpt 
    xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="PROCESSING">
    <margin portfolioId="123" id="321"/>
</ns2:marginRpt>
  • No labels