Page tree
Skip to end of metadata
Go to start of metadata

‘ALL-IN-ONE’ margin call is an all-inclusive margin calculation request that allows a user to specify transactions and/or a portfolio id that was created using an earlier call. This call is limited to one portfolio at a time. This features allows a single asynchronous request to build a portfolio, add transactions, and request margin calculation.   

See the following topics on this page:

Supported Asset Classes

ALL-IN-ONE margin call supports all assets classes, including:

  • IRS - Interest Rate Swaps
  • IRS - Swaptions
  • DL - Delta Ladders
  • F&O - Futures and Options
  • FX - Foreign Exchange

Enabling ALL-IN-ONE Margin Call

To enable this feature, use the API version 1.1 schema or above or above and complete the following steps:

CME Margin

  1. Append a “?complete = true”  request parameter to the margin request, such as  /MarginServiceApi/margins?complete=true
  2. Include either transactions or a portfolio id in the ‘marginReq’ xml
Sample Request Message
POST /MarginServiceApi/margins?complete=true
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:marginReq xmlns:ns2="http://cmegroup.com/schema/core/1.2">
<margin>
<transactions>
<transaction type="TRADE">
<payload format="CSV" encoding="STRING">
<string>
Product,Direction,Clearing Firm,Account Number,Contract,Maturity,Notional,Coupon,Currency
CDS,B,123,TEST123,2I65BYBX2,201912,"1,000,000",100,USD
CDS,S,234,TEST234,CG13,201912,"1,850,000",100,USD
CDS,B,456,TEST456,CG15,201712,"1,500,000",100,USD
</string>
</payload>
</transaction>
</transactions>
</margin>
</ns2:marginReq>
Sample Response Message
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:marginRpt 
    xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="PROCESSING">
    <margin portfolioId="1234" id="123456"/>
</ns2:marginRpt>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:marginReq xmlns:ns2="http://cmegroup.com/schema/core/1.2">
<margin>
<transactions>
<transaction type="TRADE">
<payload format="CSV" encoding="STRING">
<string>
Firm ID,Account ID,Product Type ,Currency,Effective Date,Maturity Date,Notional,Direction,Fixed Rate
TEST,1234,Vanilla,AUD,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,CAD,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,CHF,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,CZK,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,DKK,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,EUR,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,GBP,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,HKD,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,HUF,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,JPY,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,MXN,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,NOK,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,NZD,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,PLN,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,SEK,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,SGD,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,USD,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,ZAR,6/3/2015,6/3/2017,10000000,R,0.05
</string>
</payload>
</transaction>
</transactions>
</margin>
</ns2:marginReq>

FIXML All in One Request 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:marginReq xmlns:ns2="http://cmegroup.com/schema/core/1.2" xmlns:ns4="http://www.fpml.org/FpML-5/confirmation" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#" xmlns:ns5="http://www.cmegroup.com/otc-clearing/confirmation" xmlns:ns6="www.cmegroup.com/fixml50/1">
    <margin>
        <transactions>
            <transaction type="TRADE">
                <payload encoding="STRING" format="FIXML"><string><![CDATA[<FIXML xmlns="www.cmegroup.com/fixml50/1" v="5.0 SP2" xv="109" cv="CME.0001" s="20090815">
<TrdCaptRpt LastQty="1000000"><Instrmt ID="IT21" Src="H" SecTyp="CDS" MMY="201906" RstrctTyp="MM" Snrty="SR" CpnRt="0.01"/><RptSide Side="2" InptDev="API">
<Pty ID="234" R="4"/>
<Pty ID="TEST234" R="24"/>
</RptSide>
</TrdCaptRpt>
</FIXML>]]></string>
                </payload>
            </transaction>
        </transactions>
    </margin>
</ns2:marginReq>
FpML All in One Request
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:marginReq xmlns:ns2="http://cmegroup.com/schema/core/1.2" xmlns:ns4="http://www.fpml.org/FpML-5/confirmation" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#" xmlns:ns5="http://www.cmegroup.com/otc-clearing/confirmation" xmlns:ns6="www.cmegroup.com/fixml50/1">
    <margin>
        <transactions>
            <transaction type="TRADE">
                <payload encoding="STRING" format="FPML"><string>
<![CDATA[<ns3:FpML xmlns="http://www.fpml.org/FpML-5/confirmation" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#"
          xmlns:ns3="http://www.cmegroup.com/otc-clearing/confirmation">
    <clearingConfirmed>
        <trade>
            <tradeHeader>
                <partyTradeIdentifier>
                    <partyReference href="clearing_service"/>
                    <tradeId tradeIdScheme="cme_trade_id"/>
                    <tradeId tradeIdScheme="remaining_trade_id"/>
                    <tradeId tradeIdScheme="platform_trade_id"/>
                    <tradeId tradeIdScheme="block_trade_id"/>
                    <tradeId tradeIdScheme="client_trade_id"/>
                </partyTradeIdentifier>
                <partyTradeInformation>
                    <partyReference href="clearing_firm"/>
                    <accountReference href="account1"/>
                    <relatedParty>
                        <partyReference href="trade_source"/>
                        <role>InputSource</role>
                    </relatedParty>
                    <category categoryScheme="cme_origin_code"/>
                </partyTradeInformation>
                <tradeDate>2011-09-06</tradeDate>
            </tradeHeader>
            <swap>
                <swapStream id="fixedLeg">
                    <payerPartyReference href="clearing_firm"/>
                    <payerAccountReference href="account1"/>
                    <receiverPartyReference href="clearing_service"/>
                    <calculationPeriodDates id="fixedLegCalcPeriodDates">
                        <effectiveDate>
                            <unadjustedDate>2011-09-06</unadjustedDate>
                            <dateAdjustments>
                                <businessDayConvention>NONE</businessDayConvention>
                            </dateAdjustments>
                            <adjustedDate>2011-09-06</adjustedDate>
                        </effectiveDate>
                        <terminationDate>
                            <unadjustedDate>2021-09-06</unadjustedDate>
                            <dateAdjustments>
                                <businessDayConvention>MODFOLLOWING</businessDayConvention>
                                <businessCenters>
                                    <businessCenter>BRBD</businessCenter>
                                    <businessCenter>USNY</businessCenter>
                                </businessCenters>
                            </dateAdjustments>
                            <adjustedDate>2021-09-06</adjustedDate>
                        </terminationDate>
                        <calculationPeriodDatesAdjustments>
                            <businessDayConvention>MODFOLLOWING</businessDayConvention>
                            <businessCenters>
                                <businessCenter>BRBD</businessCenter>
                                <businessCenter>USNY</businessCenter>
                            </businessCenters>
                        </calculationPeriodDatesAdjustments>
                        <calculationPeriodFrequency>
                            <periodMultiplier>1</periodMultiplier>
                            <period>T</period>
                            <rollConvention>NONE</rollConvention>
                        </calculationPeriodFrequency>
                    </calculationPeriodDates>
                    <paymentDates>
                        <calculationPeriodDatesReference href="fixedLegCalcPeriodDates"/>
                        <paymentFrequency>
                            <periodMultiplier>1</periodMultiplier>
                            <period>T</period>
                        </paymentFrequency>
                        <payRelativeTo>CalculationPeriodEndDate</payRelativeTo>
                        <paymentDatesAdjustments>
                            <businessDayConvention>MODFOLLOWING</businessDayConvention>
                            <businessCenters>
                                <businessCenter>USNY</businessCenter>
                                <businessCenter>BRBD</businessCenter>
                            </businessCenters>
                        </paymentDatesAdjustments>
                    </paymentDates>
                    <calculationPeriodAmount>
                        <calculation>
                            <notionalSchedule>
                                <notionalStepSchedule>
                                    <currency>BRL</currency>
                                </notionalStepSchedule>
                            </notionalSchedule>
                            <futureValueNotional>
                                <amount>12345</amount>
                            </futureValueNotional>
                            <fixedRateSchedule>
                                <initialValue>0.03123</initialValue>
                            </fixedRateSchedule>
                            <dayCountFraction>BUS/252.FIXED</dayCountFraction>
                            <compoundingMethod>None</compoundingMethod>
                        </calculation>
                    </calculationPeriodAmount>
                    <cashflows>
                        <cashflowsMatchParameters>true</cashflowsMatchParameters>
                    </cashflows>
                </swapStream>
                <swapStream id="floatLeg">
                    <payerPartyReference href="clearing_service"/>
                   <receiverPartyReference href="clearing_firm"/>
                    <receiverAccountReference href="account1"/>
                    <calculationPeriodDates id="floatLegCalcPeriodDates">
                        <effectiveDate>
                            <unadjustedDate>2011-09-06</unadjustedDate>
                            <dateAdjustments>
                                <businessDayConvention>NONE</businessDayConvention>
                            </dateAdjustments>
                            <adjustedDate>2011-09-06</adjustedDate>
                        </effectiveDate>
                        <terminationDate>
                            <unadjustedDate>2021-09-06</unadjustedDate>
                            <dateAdjustments>
                                <businessDayConvention>MODFOLLOWING</businessDayConvention>
                                <businessCenters>
                                    <businessCenter>BRBD</businessCenter>
                                    <businessCenter>USNY</businessCenter>
                                </businessCenters>
                            </dateAdjustments>
                            <adjustedDate>2021-09-06</adjustedDate>
                        </terminationDate>
                        <calculationPeriodDatesAdjustments>
                            <businessDayConvention>MODFOLLOWING</businessDayConvention>
                            <businessCenters>
                                <businessCenter>BRBD</businessCenter>
                                <businessCenter>USNY</businessCenter>
                            </businessCenters>
                        </calculationPeriodDatesAdjustments>
                        <calculationPeriodFrequency>
                            <periodMultiplier>1</periodMultiplier>
                            <period>T</period>
                            <rollConvention>NONE</rollConvention>
                        </calculationPeriodFrequency>
                    </calculationPeriodDates>
                   <paymentDates>
                        <calculationPeriodDatesReference href="floatLegCalcPeriodDates"/>
                        <paymentFrequency>
                            <periodMultiplier>1</periodMultiplier>
                            <period>T</period>
                        </paymentFrequency>
                        <payRelativeTo>CalculationPeriodEndDate</payRelativeTo>
                        <paymentDatesAdjustments>
                            <businessDayConvention>MODFOLLOWING</businessDayConvention>
                            <businessCenters>
                                <businessCenter>BRBD</businessCenter>
                                <businessCenter>USNY</businessCenter>
                            </businessCenters>
                        </paymentDatesAdjustments>
                    </paymentDates>
                    <resetDates id="floatLegResetDates">
                        <calculationPeriodDatesReference href="floatLegCalcPeriodDates"/>
                        <resetRelativeTo>CalculationPeriodStartDate</resetRelativeTo>
                        <fixingDates>
                            <periodMultiplier>-2</periodMultiplier>
                            <period>D</period>
                            <dayType>Business</dayType>
                            <businessDayConvention>MODFOLLOWING</businessDayConvention>
                            <businessCenters>
                                <businessCenter>BRBD</businessCenter>
                                <businessCenter>USNY</businessCenter>
                            </businessCenters>
                            <dateRelativeTo href="floatLegResetDates"/>
                        </fixingDates>
                        <resetFrequency>
                            <periodMultiplier>1</periodMultiplier>
                            <period>D</period>
                        </resetFrequency>
                        <resetDatesAdjustments>
                            <businessDayConvention>MODFOLLOWING</businessDayConvention>
                            <businessCenters>
                                <businessCenter>BRBD</businessCenter>
                                <businessCenter>USNY</businessCenter>
                            </businessCenters>
                        </resetDatesAdjustments>
                    </resetDates>
                    <calculationPeriodAmount>
                        <calculation>
                            <notionalSchedule>
                                <notionalStepSchedule>
                                    <currency>BRL</currency>
                                </notionalStepSchedule>
                            </notionalSchedule>
                            <floatingRateCalculation>
                                <floatingRateIndex>BRL-CDI</floatingRateIndex>
                                <indexTenor>
                                    <periodMultiplier>1</periodMultiplier>
                                    <period>D</period>
                                </indexTenor>
                            </floatingRateCalculation>
                            <dayCountFraction>BUS/252.FIXED</dayCountFraction>
                            <compoundingMethod>None</compoundingMethod>
                        </calculation>
                    </calculationPeriodAmount>
                    <cashflows>
                        <cashflowsMatchParameters>true</cashflowsMatchParameters>
                    </cashflows>
                </swapStream>
            </swap>
        </trade>
        <party id="clearing_firm">
            <partyId partyIdScheme="clearing_member_firms">Test</partyId>
        </party>
        <party id="clearing_service">
            <partyId/>
        </party>
        <party id="trade_source">
            <partyId/>
        </party>
        <account id="account1">
            <accountId accountIdScheme="clearing_firm_accounts">1234</accountId>
            <servicingParty href="clearing_firm"/>
        </account>
    </clearingConfirmed>
</ns3:FpML>]]>
</string>
                </payload>
            </transaction>
        </transactions>
    </margin>
</ns2:marginReq>

Cross Margin IRS and Futures
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:marginReq xmlns:ns2="http://cmegroup.com/schema/core/1.2">
<margin>
<transactions>
<transaction type="TRADE">
                              <payload encoding="STRING" format="CSV"><string>Firm ID,Account ID,Product Type ,Currency,Effective Date,Maturity Date,Notional,Direction,Fixed Rate
TEST,1234,Vanilla,AUD,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,CAD,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,CHF,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,CZK,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,DKK,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,EUR,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,GBP,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,HKD,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,HUF,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,JPY,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,MXN,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,NOK,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,NZD,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,PLN,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,SEK,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,SGD,6/3/2015,6/3/2017,10000000,R,0.05
TEST,1234,Vanilla,USD,6/3/2015,6/3/2017,10000000,P,0.05
TEST,1234,Vanilla,ZAR,6/3/2015,6/3/2017,10000000,R,0.05</string>
                              </payload>
               </transaction>
               <transaction type="TRADE">
                              <payload encoding="STRING" format="CSV"><string>Firm Id,Acct Id,Exchange,Ticker Symbol,Product Name,CC Code,Period Code,Put / Call,Strike,Underlying Period Code,Net Positions,Margin Type
Test,123,CME,GEZ9,,ED,201912,,,,1000,OTC
Test,123,CBT,ZFM6,,25,201606,,,,10,OTC
                        </string>
                              </payload>
               </transaction>
</transactions>
</margin>
</ns2:marginReq>

 

Polling For Your Results

Use the Id (id="123456" in this case) and use it to poll for your margin results.

  • No labels