Margin Service API - ALL-IN-ONE Call

‘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 and Swaptions

  • DL - Delta Ladders

  • Futures and Options

  • FX - Foreign Exchange



Related Content

Related Content



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> Firm ID,Position Account ID,ClearedTradeId,Currency,Effective Date,Maturity Date,Notional,Direction,Fixed Rate,FloatingIndex,FloatingIndexTenor,FixedPayFrequency TestA,1234A,3M USD,USD,09/06/2021,09/06/2031,"10,000,000",P,0.03123,USD-LIBOR-BBA,3M,6M </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>
Sample Request Formats
CSV All In One Request
FIXML All in One Request 
FpML All in One Request
Cross Margin IRS and Futures All In One Request



JSON All In One Request

Risk API JSON or CSV format are the expected SPAN 2 input payload formats. These formats are supported for futures and options only and are also compatible with the deployable margin software program. 

Additional details around building a Risk API format payload can be found here.

Polling For Your Results

Use the Id (e.g.="123456") and use it to poll for your margin results.




How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.