Response
XPath | Name | Type | Required | Notes |
---|---|---|---|---|
/optimizerRpt@status | Status | Async Status | Yes | |
/optimizerRpt/error@code | Error Code | String | No | |
/optimizerRpt/error@msg | Error Message | String | No | |
/optimizerRpt/margin@asOfTime | As-of Time | Date/Time | No | |
/optimizerRpt/margin@createTime | Create Time | Date/Time | Yes | |
/optimizerRpt/margin@id | ID | String | Yes | |
/optimizerRpt/margin@portfolioId | Portfolio ID | String | Yes | |
/optimizerRpt/margin@settleQual | Settlement Qualifer | Settlement Qualifer | No | |
/optimizerRpt/margin@settleInd | Settlement Indicator | Settlement Indicator | No | |
/optimizerRpt/margin@updateTime | Update Time | Date/Time | Yes | |
/optimizerRpt/margin/amounts@ccy | Amount Currency | Currency | Yes | |
/optimizerRpt/margin/amounts@ccyRate | Currency Exchange Rate | Decimal | No | Exchange rate used to convert base currency to USDE |
/optimizerRpt/margin/amounts@conc | Concentration Margin Amount | Decimal | No | Concentration/liquidity margin requirement |
/optimizerRpt/margin/amounts@init | Initial Margin Amount | Decimal | Yes | Initial margin requirement (Base + Concentration/liquidity + Skew) |
/optimizerRpt/margin/amounts@maint | Maintenance Margin Amount | Decimal | Yes | Maintenance margin requirement (Base + Concentration/liquidity + Skew) |
/optimizerRpt/margin/amounts@optVal | Option Value Amount | Decimal | Yes | Net Options Value (Long Options Value - Short Options Value). This only applies to portfolios with options. Negative if net short, positive if net long. |
/optimizerRpt/margin/amounts/portfolio@futCurrAmt | Futures margin current portfolio | Decimal | Yes | SPAN®margin for the current allocation of futures in the SEG account |
/optimizerRpt/margin/amounts/portfolio@futPreAmt | Futures margin baseline portfolio | Decimal | Yes | SPAN®margin for all futures (OTC and SEG futures) in account |
/optimizerRpt/margin/amounts/portfolio@futPostAmt | Futures margin post-optimized portfolio | Decimal | Yes | SPAN®margin for SEG futures allocation identified by the Optimizer |
/optimizerRpt/margin/amounts/portfolio@otcCurrAmt | OTC margin current portfolio | Decimal | Yes | OTC IRS margin for the current allocation of IRS+OTC futures in the account |
/optimizerRpt/margin/amounts/portfolio@otcPreAmt | OTC margin baseline portfolio | Decimal | Yes | OTC IRS margin for IRS positions only |
/optimizerRpt/margin/amounts/portfolio@otcPostAmt | OTC margin post-optimized portfolio | Decimal | Yes | OTC IRS margin for IRS + OTC futures identified by the Optimizer |
/optimizerRpt/transation@portfolioId | Portfolio ID | String | Yes | |
/optimizerRpt/transation@type | Transaction Type | String | Yes | |
/optimizerRpt/transation@id | ID | String | Yes | |
/optimizerRpt/transation/payload@encoding | Encoding | String | Yes | |
/optimizerRpt/transation/payload@format | Format | String | Yes | |
/optimizerRpt/transation/payload/string | Payload String | FIXML Message Payload | No | Returned Optimizer offset and onset trade capture reports, FIXML format. |
Examples
This assumes that margin request for portfolio has already been submitted. The id used (2345 should be the CME CORE generated unique id returned in response to a Margin Calculate request.
Like some list requests, Optimize Get response includes FIXML transactions which represent the onset and offset trades the Optimizer uses to describe which futures should move to or from the OTC IRS account to achieve margin offsets. Note the Optimizer Get response uses "TrdTyp = 22" to describe futures in the OTC IRS account.
Optimize Request
GET /MarginServiceApi/1.6/optimize/1234567
Response - Portfolio Optimized
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:optimizerRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="SUCCESS"> <margin portfolioId="12345678" id="1234567" createTime="2019-11-21T19:56:42+00:00" updateTime="2019-11-21T19:56:45+00:00"> <amounts conc="3531.75158986107" init="1033754.24448408" maint="1037285.99607394" optVal="48125"> <portfolio futCurrAmt="230415" futPreAmt="260000" futPostAmt="1300" otcCurrAmt="623627.825051428" otcPreAmt="1547449.14988385" otcPostAmt="1035985.99607394" diffAmt="770163.15380991"/> </amounts> </margin> <transaction portfolioId="12345678" type="TRADE" id="1234567"> <payload encoding="STRING" format="FIXML"> <string><?xml version="1.0" encoding="UTF-8" standalone="yes"?><FIXML xmlns="www.cmegroup.com/fixml50/1" v="5.0 SP2" xv="109" cv="CME.0001" s="20090815"><TrdCaptRpt LastQty="100" SettlCcy="USD"><Instrmt ID="21" Src="H" SecTyp="FUT" MMY="201912" MatDt="2019-12-19" Exch="CBT"/><RptSide Side="2" InptDev="API"><Pty ID="TEST" R="4"/><Pty ID="CME" R="21"/><Pty ID="1234" R="24"><Sub ID="2" Typ="26"/></Pty></RptSide></TrdCaptRpt></FIXML></string> </payload> </transaction> <transaction portfolioId="12345678" type="TRADE" id="1234568"> <payload encoding="STRING" format="FIXML"> <string><?xml version="1.0" encoding="UTF-8" standalone="yes"?><FIXML xmlns="www.cmegroup.com/fixml50/1" v="5.0 SP2" xv="109" cv="CME.0001" s="20090815"><TrdCaptRpt TrdTyp="22" LastQty="100" SettlCcy="USD"><Instrmt ID="21" Src="H" SecTyp="FUT" MMY="201912" MatDt="2019-12-19" Exch="CBT"/><RptSide Side="1" InptDev="API"><Pty ID="TEST" R="4"/><Pty ID="CME" R="21"/><Pty ID="1234" R="24"><Sub ID="2" Typ="26"/></Pty></RptSide></TrdCaptRpt></FIXML></string> </payload> </transaction> <transaction portfolioId="12345678" type="TRADE" id="1234569"> <payload encoding="STRING" format="FIXML"> <string><?xml version="1.0" encoding="UTF-8" standalone="yes"?><FIXML xmlns="www.cmegroup.com/fixml50/1" v="5.0 SP2" xv="109" cv="CME.0001" s="20090815"><TrdCaptRpt LastQty="99" SettlCcy="USD"><Instrmt ID="21" Src="H" SecTyp="FUT" MMY="201912" MatDt="2019-12-19" Exch="CBT"/><RptSide Side="2" InptDev="API"><Pty ID="TEST" R="4"/><Pty ID="CME" R="21"/><Pty ID="1234" R="24"><Sub ID="2" Typ="26"/></Pty></RptSide></TrdCaptRpt></FIXML></string> </payload> </transaction> <transaction portfolioId="12345678" type="TRADE" id="1234570"> <payload encoding="STRING" format="FIXML"> <string><?xml version="1.0" encoding="UTF-8" standalone="yes"?><FIXML xmlns="www.cmegroup.com/fixml50/1" v="5.0 SP2" xv="109" cv="CME.0001" s="20090815"><TrdCaptRpt TrdTyp="22" LastQty="99" SettlCcy="USD"><Instrmt ID="21" Src="H" SecTyp="FUT" MMY="201912" MatDt="2019-12-19" Exch="CBT"/><RptSide Side="1" InptDev="API"><Pty ID="TEST" R="4"/><Pty ID="CME" R="21"/><Pty ID="1234" R="24"><Sub ID="2" Typ="26"/></Pty></RptSide></TrdCaptRpt></FIXML></string> </payload> </transaction> </ns2:optimizerRpt>
Response - Portfolio Could not be Optimized
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:optimizerRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="SUCCESS"> <margin portfolioId="12345679" id="1234568" createTime="2019-11-25T17:31:41+00:00" updateTime="2019-11-25T17:31:44+00:00"> <amounts conc="0" init="271810.135066162" maint="271810.135066162"> <portfolio futCurrAmt="0" futPreAmt="5200" futPostAmt="0" otcCurrAmt="271810.135066162" otcPreAmt="284884.360044503" otcPostAmt="271810.135066162" diffAmt="18274.224978341"/> </amounts> </margin> </ns2:optimizerRpt>
Errors
Code | Description |
---|---|
403 | Returned if the user does not have permission to access the specified optimize response. |
404 | Returned if the requested optimizer calculation 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. |