Margin Optimization Service Over API User Guide

Margin Optimization Service Over API User Guide

This topic provides guidance for firms participating in the CME Group portfolio margin of interest rate swaps/futures program to migrate to a CME-hosted Optimization model.

This topic covers high level impacts to assist users in understanding and scheduling system changes.

Contents

Revision History

Version Number

Date Released

Description of Changes

Version Number

Date Released

Description of Changes

1.0

March 28, 2025

Initial version of this topic published to the Client Systems Wiki:

  • API URL

  • Error Handling

Updated Sections:

  • Updated title of document

  • User Entitlements and Onboarding

  • User Interface

  • Operational Timeline

Version released in conjunction with testing.

1.1

April 10, 2025

Updated Section:

  • User Interface - Hosted Optimizer User Workflow Examples

  • Error Handling

1.2

June 18, 2025

Updated Section:

  • User Interface - Hosted Optimization User Workflow Diagram

  • User Interface - Hosted Optimizer User Workflow Examples

  • Error Handling

Added Section:

  • Testing Expectations

Portfolio Margin Program and Optimizer Service

The portfolio margin program is designed to provide margin efficiencies across a single legal entity by identifying listed interest rate products which can offset cleared swap IRS market risk. The program aims to reduce the combined risk of the segregated and cleared swaps account.

Running the Optimizer software is the mechanism clearing firms use to optimize portfolio risk. Prior to 2025, all participating Clearing Members used the CME Group Optimizer software installed in their infrastructure. Optimizer software evaluates the ideal allocation of interest rate futures and options to transfer between segregated and OTC accounts to provide margin efficiencies. As an output, Optimizer generates transfers, each having two sides (buy and sell) which are booked at CME Group using standard Clearing Firm message queue setup.

Additional program details are available in Portfolio Margining for OTC Interest Rate Swaps.

Hosted Optimization

To alleviate operational burdens and improve efficiency, in 2025 CME Group is offering a new optimization mechanism which is hosted on CME Group infrastructure and available to users exclusively over the CME CORE API Service. This new service will continue to leverage the capabilities available in the Optimizer software, but is available over the CME CORE API, a web-based API accessible over the internet.

Impacted Systems and Processes

The following changes are relevant to Clearing Members who choose to participate in the Portfolio Margin program.

System or Process

Changes in Scope?

Impact Details

System or Process

Changes in Scope?

Impact Details

Interface

Y

  • Decommission Optimizer software.

  • API interface mandatory for portfolio margin program participation in 2025. API interface details below.

Operational Workflow

Y

  • Users migrate from integrating with optimization software hosted on their infrastructure to an API where the optimization capabilities are hosted by CME.

  • Users can continue to process Optimization during their EOD process with upgrades to connect with new CORE endpoints to achieve Optimization. API interface workflow details below.

Input Files

Y

  • Positions and Configuration data continue to be required, but passed in an XML-wrapped request to hosted optimizer endpoints. Users should modify any processes which store or parse Optimizer software inputs to pass these to the hosted Optimization API.

  • Market data and IRS account data are no longer required and firms can decommission their file pull requests and storage mechanisms for those files. Input examples are below.

Data File Publication (from CME)

Y

  • Users are no longer required to pull down any data file from CME as part of the optimization process.

  • CME may decommission the secure FTP publication of some Optimizer input files following the successful migration of all users to hosted Optimizer service. This would be communicated via normal clearing advisory means.

Output Files

Y

  • FIXML transfer and estimated savings data will be produced and users will interact with these via new optimize reports endpoints. Users should modify any processes which store or parse Optimizer software outputs and modify these to read results from the hosted Optimization API.

  • Further, users may either leverage the optimizer API to accept or reject the optimization proposal and have CME Group update the clearing system.  Alternatively, users can process the transfer records the same way they have historically to update the clearing system. 

  • The data format is changing to align with the API structure. Output report examples are below.

Post-trade Activities and Reports

N

  • Operational post-trade activities like exercise and assignment and deliveries are not impacted by the hosted Optimization service.

  • Reporting, like position change (PCS) and customer gross margin (CGM) are not impacted by the hosted Optimization service.

EOD Clearing timeline

N

User Entitlements and Onboarding

Hosted Optimization requires new entitlements to ensure only authorized users are able to interact with cleared Optimization workflows. Authorization occurs at the user, firm and margin account level. Users will need to set up a service account with an API ID that will be entitled to the new workflow.

Service Account Creation and Entitlement Process

  1. Create an Account (If Applicable): If you don’t already have an account, please register.

  2. Generate an API ID: Go to My Profile > My Account > APIs, then create and claim an API ID under Auth Type=”Basic Auth”.

    1. The API ID used for the Margin Optimization Service must be dedicated solely to the new workflow. Users with an existing API ID should create a new one for this purpose.

  3. Submit the Request Form: Complete the request form available here and enter your newly created API ID. Ensure you click ‘Submit’ to initiate the entitlement workflow at CME Group.

  4. Verification Process: The Enterprise Application and System Entitlements (“EASE”) team will contact the CME ClearPort Verification Officer designated for your firm to confirm access authorization for clearing data usage in the service.

  5. Onboarding Completion: Upon successful verification, the CME Group post trade services team will reach out to finalize the onboarding process. As part of this process, they will ensure the API ID is entitled to the CORE API, which is a mandatory general authorization step.

Non-authorized users will receive an authorized error with the code 401 or 403 if attempting to interact with Optimization workflows. See Error Handling.

When testing, please note authentication and entitlement follows the same Basic Auth pattern as the CME CORE existing API, which is described in Margin Service API - Authentication and Entitlement.

API URL

The Optimization service will utilize the CME CORE post trade URLs. 

Test Environment:

https://posttrade.api.uat.cmegroup.com/MarginServiceApi/

Please contact the CME post trade service team regarding the production environment URL after completion of testing.

Service endpoints are described in the User Interface section.

Testing Expectations

  • UT environment testing (expected testing: functional):

    • Testing may be available for a limited set of available dates and cycles. Users can interact with the ‘status’ endpoint, described below, which provides detail on which dates and cycles are available for Optimization. Users may experience errors when submitting requests for dates and cycles that are not available.

    • The UT environment is not a production copy. This is important because the service performs account validation from UT environment data and will flag accounts as invalid that are not set up in the test environment or have no IRS trades in the test environment. It is recommended that users build their positions data with test accounts matching CME Group test accounts. If that is not possible, please work with posttradeservices@cmegroup.com to ensure there are accounts enabled in the UT environment that match production identifiers and, as needed, contain IRS trades to limit account validation errors. Please request a maximum of five new test accounts.

    • The UT environment is not expected to be used for number matching against the deployable Optimizer software in production. Please see production environment testing below.

    • The UT environment is expected to be the sole environment for testing the ‘accept transfers’ endpoint (see below), since this workflow pushes live transfer records to the clearing system. All other upstream workflows prior to the transfers endpoint can also be tested in production, see production environment testing below.

  • Production environment testing (expected testing: number matching):

    • Users can interact with the production environment for testing by simply eliminating the ‘accept transfers’ endpoint portion of the workflow - all upstream endpoints can be used for informational or testing purposes and do not impact cleared trades. This is consistent with legacy testing of the deployable Optimizer software where it was recommended to test with a combination of test and production inputs, depending on the use case and scope of release.

    • The production environment should be used for number matching against the deployable Optimizer software. UT environment data is independently produced and not validated against production, making it an unsuitable alternative. If number matching is only allowable in the UT environment, please validate against the UT environment IRSMR3 margin report or a run of deployable Optimizer with only test environment data to ensure consistency.

Expected Inputs

Input File Name - Current State Workflow (Optimizer Software)

Business Description

Input - Future State Workflow (Hosted Optimizer service)

Required, Optional or Deprecated in Hosted Optimizer Service

Default Behavior, if Optional

Input File Name - Current State Workflow (Optimizer Software)

Business Description

Input - Future State Workflow (Hosted Optimizer service)

Required, Optional or Deprecated in Hosted Optimizer Service

Default Behavior, if Optional

configuration.json

Optimizer Configuration File

Configuration JSON payload

See Optimizer Request Example.

Optional

Default Configuration will be applied.

Positions.csv

Positions CSV file
Contains F&O positions in users' F&O (SEG) or Portfolio Margin (PM) account.

Positions CSV payload

See Optimizer Request Example.

Please note a header is required in this payload in the API request.

Required

 

IRSPNL . . . *

IRS PNL File

N/A

Deprecated*

 

cust.spn*

SPAN(R) Risk Parameter file

N/A

Deprecated*

 

cme.optimizer**

Optimizer Market Data Archive (ZIP file)

N/A

Deprecated**

 

IRSGammaLadder**

IRS Gamma Ladder

N/A

Deprecated**

 

IRSVegaLadder**

IRS Vega Ladder

N/A

Deprecated**

 

IRSSkewSensitivity**

IRS Skew Sensitivity

N/A

Deprecated**

 

IRSTimeValue**

IRS Time Value

N/A

Deprecated**

 

IRSDL . . .*

IRS Delta Ladder File

N/A

Deprecated*

 

*These files will continue to be produced but are not required to be passed as inputs to the hosted Optimizer service.

**These files are no longer produced by CME Group.

Clearing Members are expected to continue producing the Optimizer’s input Positions.csv and Configuration.json files and to maintain the state of portfolios in their books and records. No format changes are expected for these file payloads, please see example request messages.

Aside from Positions payload(s) and configuration data, Clearing firms are not expected to supply any other Optimizer inputs (i.e. marketdata_optimizer_cme, IRSDL, IRSPNL). Firms that are currently consuming these files can discontinue consuming these files when live with the new service.

Expected Outputs

Output File Name - Current State Workflow (Optimizer Software)

Business Description

Output - Future State Workflow (Hosted Optimizer Service)

Output File Name - Current State Workflow (Optimizer Software)

Business Description

Output - Future State Workflow (Hosted Optimizer Service)

Total Savings Estimateyyyymmdd_x.csv

Estimated savings report.

Describes margin before and after Optimization.

Estimated Savings Report Request Endpoint described below - output in FIXML format.

MarginSummaryyyyymmdd_x.csv

Margin Summary report

Contains details found in Total Savings Estimate and additional optimized state margin results.

See Estimated Savings Report, which is enhanced with more data.

FundingImpactyyyymmdd_x.csv

Funding Impact report.

Describes change in funding based on margin difference, which is also available in the total savings estimate.

Not available.

OptimizeLogyyyymmdd_x.csv

Optimizer log file.

Describes program operations and debugging details as well as errors.

No log file available, API errors can be retrieved at other points in the workflow. See Error Handling.

fixmlTransfersyyyymmdd_x.txt

FIXML format transfer records file.

Used by firms to send transfers to CME Group via message queue.

FIXML Transfer Report Request Endpoint (see below).

csvTransfersyyyymmdd_x.csv

CSV format transfer records file.

Not available. 

Firms should instead use the FIXML Transfer Report Request Endpoint (see below).

User Interface

The existing CME CORE API service has been expanded to support the hosted optimization process. The test URL can be found in the API URL section above. In conjunction with CME Group and wider industry standards only secure communication channels are used. 

The following new API endpoints support hosted Optimization:

Endpoint

Request Type

Business Description/Use Case

Notes

Endpoint

Request Type

Business Description/Use Case

Notes

{margin api URL}/optimize?complete=true 

POST

User initiates Optimizer request.

Contains portfolio and configuration payloads.

 

See samples below.

Please note this is not to be confused with the existing (margin API URL)/MarginServiceApi/optimize endpoint, which processes hypothetical optimization calculation requests.

{margin api URL}/optimize/reports/fixmltransfers/(optimize id)

GET

FIXML transfer report

Retrieves FIXML transfers report for a given Optimize ID when Optimization is complete.

Users are expected to retry if the response is in ‘processing’ state.

 

See samples below.

 

{margin api URL}/optimize/reports/estimatedsavingsreport/(optimize id)

GET

Estimated Savings Report Endpoint

Retrieves estimated savings report for a given Optimize ID when Optimization is complete.

Users are expected to retry if the response is in ‘processing’ state.

See samples below.

 

{margin api URL}/optimize/reports/accepttransfers/(optimize id)

GET

Transfer Request Endpoint (Optional)

Submits a transfer request to the Front End Clearing system.

 

See samples below.

Results in live transfers in CME Clearing, see Testing Expectations above.

{margin api URL}/optimize/status

GET

Status endpoint (Optional)

Returns the available date and cycle for which optimization request can be submitted. In production, the date and cycle will become top day when upstream data dependencies are satisfied and the Optimization window has opened for a given business date; see Operational Timeline below.

See samples below.

 

Hosted Optimization User Workflow Diagram

Hosted Optimization User Workflow Examples

  1. Submit Optimize Request

Request Endpoint

POST {{API_URL}}/optimize?complete=true

Sample Request

Sample Response

The report contains:

  • The Optimizer id (id in the 'portfolio' block). 

    • Note: this id has a one-to-one relationship with the user input payload, not the Optimized account. There can be many accounts in a single Optimize request payload or one, depending on the users’ preference.

    • In the example below the ID is this string: 123456e1-12b3-123z-a0cf-12ee3ee5e56d

  • The FIXML trade capture for all positions in the payload.

  • Position-level errors, for instance validation errors.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:portfolioRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="SUCCESS"> <portfolio id="123456e1-12b3-123z-a0cf-12ee3ee5e56d"> <cycle date="2025-03-27" code="EOD"/> <entities clrMbrFirmId="123" pbAcctId="Test123"/> <transactions> <transaction id="900000"> <payload encoding="STRING" format="FIXML"> <string>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;FIXML xmlns="www.cmegroup.com/fixml50/1" v="5.0 SP2" xv="109" cv="CME.0001" s="20090815"&gt;&lt;TrdCaptRpt LastQty="50" SettlCcy="USD"&gt;&lt;Instrmt ID="SR3" Src="H" SecTyp="FUT" MMY="202512" Exch="CME"/&gt;&lt;RptSide Side="2" InptDev="API"&gt;&lt;Pty ID="123" R="4"/&gt;&lt;Pty ID="CME" R="21"/&gt;&lt;Pty ID="Test123" R="24"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;/Pty&gt;&lt;/RptSide&gt;&lt;/TrdCaptRpt&gt;&lt;/FIXML&gt;</string> </payload> </transaction> <transaction id="900001"> <payload encoding="STRING" format="FIXML"> <string>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;FIXML xmlns="www.cmegroup.com/fixml50/1" v="5.0 SP2" xv="109" cv="CME.0001" s="20090815"&gt;&lt;TrdCaptRpt LastQty="3000" SettlCcy="USD"&gt;&lt;Instrmt ID="SR3" Src="H" SecTyp="OOF" MMY="202512" StrkPx="95.0" PutCall="1" Exch="CME"/&gt;&lt;Undly Src="H" SecTyp="FUT" MMY="202512"/&gt;&lt;RptSide Side="1" InptDev="API"&gt;&lt;Pty ID="123" R="4"/&gt;&lt;Pty ID="CME" R="21"/&gt;&lt;Pty ID="Test123" R="24"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;/Pty&gt;&lt;/RptSide&gt;&lt;/TrdCaptRpt&gt;&lt;/FIXML&gt;</string> </payload> </transaction> </transactions> </portfolio> </ns2:portfolioRpt>
  1. Optimized Reports

As part of the hosted optimizer service, two reports represent the most commonly used deployed Optimizer software reports.

All Optimizer reports are requested via GET messages to report endpoints containing the Optimize ID provided in the Optimize POST response above.

Report 1: FIXML Transfer Report Request Endpoint

Sample Request

GET {{API_URL}}/optimize/reports/fixmltransfers/(optimize id)

Sample Response

The report contains a header with the following information: 

  • Cycle date and cycle type

  • Transfer records in FIXML format.

    • All transfer messages will be single-sided to comply with standard CME Clearing transfer message processing.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:portfolioRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="SUCCESS"> <portfolio> <cycle date="2025-05-14" code="XXX"/> <entities clrMbrFirmId="123" pbAcctId="Test123"/> <transactions> <transaction> <payload encoding="STRING" format="FIXML"> <string>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;FIXML xmlns="www.cmegroup.com/fixml50/1" cv="CME.0001" s="20090815" v="5.0 SP2" xv="109"&gt;&lt;TrdCaptRpt LastQty="3000" MLegRptTyp="1" MsgEvtSrc="API" OrigTrdDt="2025-03-28" RptID="900001" RptTyp="0" SettlCcy="USD" TransTyp="0" TrdDt="2025-03-28" TrdHandlInst="5" TrdID="900001" TrdTyp="3" TxnTm="2025-04-09 13:03:46.143969903"&gt;&lt;Hdr SID="123" SSub="CME" Snt="2025-04-09 13:03:46.143969903" TID="123" TSub="CME"/&gt;&lt;Instrmt Exch="CME" ID="SR3" MMY="202512" PutCall="1" SecTyp="OOF" Src="H" StrkPx="95.0"/&gt;&lt;Undly MMY="202512" SecTyp="FUT" Src="H"/&gt;&lt;RptSide ClOrdID="PM001" CustCpcty="4" InptDev="API" OrdTyp="M" SesId="RTH" SesSub="X" Side="2"&gt;&lt;Pty ID="123" R="1"/&gt;&lt;Pty ID="CME" R="21"/&gt;&lt;Pty ID="CME" R="22"/&gt;&lt;Pty ID="1234" R="24"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;/Pty&gt;&lt;Pty ID="123" R="17"/&gt;&lt;Pty ID="1234" R="48"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;Sub ID="4" Typ="4000"/&gt;&lt;/Pty&gt;&lt;Pty ID="CME" R="22"/&gt;&lt;/RptSide&gt;&lt;/TrdCaptRpt&gt;&lt;/FIXML&gt;</string> </payload> </transaction> <transaction> <payload encoding="STRING" format="FIXML"> <string>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;FIXML xmlns="www.cmegroup.com/fixml50/1" cv="CME.0001" s="20090815" v="5.0 SP2" xv="109"&gt;&lt;TrdCaptRpt LastQty="50" MLegRptTyp="1" MsgEvtSrc="API" OrigTrdDt="2000-01-01" RptID="900000" RptTyp="0" SettlCcy="USD" TransTyp="0" TrdDt="2000-01-01" TrdHandlInst="5" TrdID="900000" TrdTyp="3" TxnTm="2025-04-09 13:03:46.143969903"&gt;&lt;Hdr SID="123" SSub="CME" Snt="2025-04-09 13:03:46.143969903" TID="123" TSub="CME"/&gt;&lt;Instrmt Exch="CME" ID="SR3" MMY="202512" SecTyp="FUT" Src="H"/&gt;&lt;RptSide ClOrdID="PM001" CustCpcty="4" InptDev="API" OrdTyp="M" SesId="RTH" SesSub="X" Side="2"&gt;&lt;Pty ID="123" R="1"/&gt;&lt;Pty ID="CME" R="21"/&gt;&lt;Pty ID="CME" R="22"/&gt;&lt;Pty ID="1234" R="24"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;/Pty&gt;&lt;Pty ID="123" R="17"/&gt;&lt;Pty ID="1234" R="48"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;Sub ID="4" Typ="4000"/&gt;&lt;/Pty&gt;&lt;Pty ID="CME" R="22"/&gt;&lt;/RptSide&gt;&lt;/TrdCaptRpt&gt;&lt;/FIXML&gt;</string> </payload> </transaction> </transactions> </portfolio> </ns2:portfolioRpt>

 

Report 2: Estimated Savings Report Request Endpoint

Sample Request

GET {{API_URL}}/optimize/reports/estimatedsavingsreport/(optimize id)

Sample Response

The report contains:

  • Three margin states for each portfolio, expressed for both the F&O account and the IRS account:

    • Pre-optimization state (all F&O positions in SEG).

    • Current state: before position netting.

    • Post-Optimization state.

  • Change in margin (savings), in dollar and percentage terms.

  • Margin account IDs (PbAcctId) for all optimized accounts

  • Clearing firm ID (clrMbrFirmId)

Mapping table of Optimizer software Estimated Savings Report to API estimated savings report.

Note additional fields are present as compared to the csv version of the report and it is also, therefore, a suitable replacement for the Margin Summary csv report.

Field in Optimizer Software Estimated Savings Report

Mapped Field in Estimated Savings Report API Result

Business Description of Field

Field in Optimizer Software Estimated Savings Report

Mapped Field in Estimated Savings Report API Result

Business Description of Field

N/A

FutCurrAmt

F&O account (SEG) margin computed on the current state before position netting.

SPAN Before

FutPreAmt

F&O account (SEG) margin computed pre-optimization (all positions in SPAN).

SPAN After

FutPostAmt

F&O account (SEG) margin computed post-optimization.

N/A

OtcCurrAmt

OTC account margin computed on the current state (with existing F&O offsets).

Var Before

OtcPreAmt

OTC account margin computed pre-optimization (no F&O offsets).

Var After

OtcPostAmt

OTC account margin computed post-optimization.

Total Dollar Savings

DiffAmt

DiffAmt = TotalPreAmt - TotalPostAmt

N/A

FutNovCurrAmt

F&O account (SEG) net option value on the current state before position netting.

N/A

FutNovPreAmt

F&O account (SEG) net option value computed pre-optimization (all positions in SPAN).

N/A

FutNovPostAmt

F&O account (SEG) net option value computed post-optimization.

N/A

OctNovCurrAmt

OTC account net option value computed on the current state (with existing F&O offsets).

N/A

OctNovPreAmt

OTC account net option value computed pre-optimization (no F&O offsets).

N/A

OctNovPostAmt

OTC account net option value computed post-optimization.

Total Before

TotalPreAmt

TotalPreAmt = FutPreAmt + OtcPreAmt

Total After

TotalPostAmt

TotalPostAmt = FutPostAmt + OctNovPostAmt

Total Percent Savings

DiffPct

Percentage difference between TotalPreAmt and TotalPostAmt

 

Sample Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:marginRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2"> <cycle date="2025-05-14" code="EOD"/> <margin portfolioId="123456e1-12b3-123z-a0cf-12ee3ee5e56d"> <entities clrMbrFirmId="123" pbAcctId="Test123"/> <amounts ccy="USD" init="471497443.52723697" maint="471497443.52723697"> <portfolio futCurrAmt="-5665000" futPreAmt="-5665000" futPostAmt="0" otcCurrAmt="475415991.04194366" otcPreAmt="475415991.04194366" otcPostAmt="471497443.52723697" diffAmt="1746452.48529331" futNovCurrAmt="8531250" futNovPreAmt="8531250" futNovPostAmt="0" otcNovCurrAmt="0" otcNovPreAmt="0" otcNovPostAmt="439844.82012504" totalPreAmt="469750991.04194366" totalPostAmt="471497443.52723697" diffPct="0.37"/> </amounts> </margin> </ns2:marginRpt>

 

  1. Submit Transfer Request

Users can optionally choose to submit a request to a transfers endpoint. When triggered, the Hosted Optimization platform will submit the transfer records to Front End Clearing system.

Sample Request

GET {{API_URL}}/optimize/reports/accepttransfers/(optimize id)

Sample Response

The report contains a header with the following information: 

  • Cycle date and cycle type

  • Transfer records in FIXML format.

    • All transfer messages will be single-sided to comply with standard CME Clearing transfer message processing.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:portfolioRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="SUCCESS"> <portfolio id="123456e1-12b3-123z-a0cf-12ee3ee5e56d"> <cycle date="2025-05-14" code="EOD"/> <entities clrMbrFirmId="123" pbAcctId="Test123"/> <transactions> <transaction> <payload encoding="STRING" format="FIXML"> <string>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;FIXML xmlns="www.cmegroup.com/fixml50/1" cv="CME.0001" s="20090815" v="5.0 SP2" xv="109"&gt;&lt;TrdCaptRpt LastPx="0" LastQty="3000" MLegRptTyp="1" MsgEvtSrc="API" OrigTrdDt="2025-03-28" RptID="900001" RptTyp="0" SettlCcy="USD" TransTyp="0" TrdDt="2025-03-28" TrdHandlInst="5" TrdID="900001" TrdTyp="3" TxnTm="2025-06-11 22:38:01.581627243"&gt;&lt;Hdr SID="123" SSub="CME" Snt="2025-06-11 22:38:01.581627243" TID="123" TSub="CME"/&gt;&lt;Instrmt Exch="CME" ID="SR3" MMY="202512" PutCall="1" PxQteCcy="USD" SecTyp="OOF" Src="H" StrkPx="95.0"/&gt;&lt;Undly ID="SR3" MMY="202512" SecTyp="FUT" Src="H"/&gt;&lt;RptSide ClOrdID="PM001" CustCpcty="4" InptDev="API" OrdTyp="M" SesId="RTH" SesSub="X" Side="2"&gt;&lt;Pty ID="123" R="1"/&gt;&lt;Pty ID="CME" R="21"/&gt;&lt;Pty ID="CME" R="22"/&gt;&lt;Pty ID="123" R="24"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;/Pty&gt;&lt;Pty ID="123" R="17"/&gt;&lt;Pty ID="009HSESQ" R="48"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;Sub ID="4" Typ="4000"/&gt;&lt;/Pty&gt;&lt;Pty ID="CME" R="22"/&gt;&lt;/RptSide&gt;&lt;/TrdCaptRpt&gt;&lt;/FIXML&gt;</string> </payload> </transaction> <transaction> <payload encoding="STRING" format="FIXML"> <string>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;FIXML xmlns="www.cmegroup.com/fixml50/1" cv="CME.0001" s="20090815" v="5.0 SP2" xv="109"&gt;&lt;TrdCaptRpt LastPx="95.93" LastQty="50" MLegRptTyp="1" MsgEvtSrc="API" OrigTrdDt="2025-03-28" RptID="900000" RptTyp="0" SettlCcy="USD" TransTyp="0" TrdDt="2025-03-28" TrdHandlInst="5" TrdID="900000" TrdTyp="3" TxnTm="2025-06-11 22:38:01.581627243"&gt;&lt;Hdr SID="123" SSub="CME" Snt="2025-06-11 22:38:01.581627243" TID="123" TSub="CME"/&gt;&lt;Instrmt Exch="CME" ID="SR3" MMY="202509" PxQteCcy="USD" SecTyp="FUT" Src="H"/&gt;&lt;RptSide ClOrdID="PM001" CustCpcty="4" InptDev="API" OrdTyp="M" SesId="RTH" SesSub="X" Side="2"&gt;&lt;Pty ID="123" R="1"/&gt;&lt;Pty ID="CME" R="21"/&gt;&lt;Pty ID="CME" R="22"/&gt;&lt;Pty ID="123" R="24"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;/Pty&gt;&lt;Pty ID="123" R="17"/&gt;&lt;Pty ID="009HSESQ" R="48"&gt;&lt;Sub ID="1" Typ="26"/&gt;&lt;Sub ID="4" Typ="4000"/&gt;&lt;/Pty&gt;&lt;Pty ID="CME" R="22"/&gt;&lt;/RptSide&gt;&lt;/TrdCaptRpt&gt;&lt;/FIXML&gt;</string> </payload> </transaction> </transactions> </portfolio> </ns2:portfolioRpt>

 

  1. Status Request

This endpoint checks for the available date and cycle for which user can submit optimization request.

Sample Request

GET {{API_URL}}/optimize/status

Sample Response

The response contains the following information all the available cycles:

  • Code

  • Date

[ { "cycleCode": "EOD", "cycleDate": "2025-05-14" } ]

 

Error Handling

The Optimization workflow is asynchronous and can result in errors in response to user requests at all three steps of the workflow (shown in 7.1 above).

Here are examples of errors for all user requests:

Errors - Optimize All-in-One Request

All below errors can be observed in response to the Optimizer all-in-one endpoint above.

Error Code and/or Text

Business Description

Severity/Level

User Remediation Steps

Error Code and/or Text

Business Description

Severity/Level

User Remediation Steps

400

Invalid Invalid Product Details !Only Valid Positions will be Optimized

 

Invalid or Expired trades in the payload

Informational

Remove invalid or expired trades from the request payload, else, only valid contracts are included in the Optimized result.

400

“No CmfId found for PbAccountId : [your acct number].”

The supplied PBAccountId does not match an account in the requested environment for the entitled clearing firm ID.

Informational

Check the positions input for incorrect PbAccountIds.

Note test environment accounts do not match production environment accounts.

400

No Valid Position found for Optimization.

 

There are no valid positions in the input file.

Fatal

Check the positions inputs for invalid trades or incorrect PbAccountIds.

401

Unauthorized

Authorization and Entitlement Issue

Fatal

Users should obtain access to the CORE API and/or obtain access to the appropriate clearing member firm ID in the request. See User Entitlements and Onboarding

404

not found

There is a problem with the destination URL

Fatal

Review and update the destination URL.

Please note the use of schema numbers in the destination URL is not supported for this workflow.

500

internal server error

Error Detail: “Failed to execute the RegularExpressionProtection StepDefinition RegEx-protection. Reason”

Authorization Issue

Fatal

The CORE API requires Basic Authorization which is described here: Margin Service API - Authentication and Entitlement

The specified URL cannot be found

The application may be experiencing a maintenance window

Fatal

Please check back after the maintenance window. Maintenance windows are not expected to interfere with production EOD processing but can impact the test environment, standard maintenance windows are scheduled on Wednesdays in test.

Errors - Report Requests

The following table describes errors that may be encountered while interacting with report GET endpoints.

Endpoint

Error

Business Description

Severity

User Remediation Steps

Endpoint

Error

Business Description

Severity

User Remediation Steps

FIXML Transfer Report and
Estimated Savings Report Request Endpoints

202

Error Message: “Optimization is still in progress”

User request has been received but is not completed.

Informational

Proceed to GET call and retry until results are received.

FIXML Transfer Report and
Estimated Savings Report Request Endpoints

404

Error Message: “Optimization result not found”

 

Optimize ID is incorrect or not found

Informational

Insert the correct Optimize ID and try again

Errors - Transfers Endpoint

The following table describes errors that may be encountered while interacting with the Transfer endpoint.

Endpoint

Error

Business Description

Severity

User Remediation Steps

Endpoint

Error

Business Description

Severity

User Remediation Steps

Transfer request endpoint

200

Error Message:

“Window for booking optimization transfers is closed”

Clearing transfers window is closed

Informational

The transfers window is closed, it will open up the next business day. Please reach out to post trade client services team if you need assistance with manual transfers.

Transfer request endpoint

No error - see business description

Though not presented as an error in the workflow, it is possible, as it was in the deployable Optimizer software, to book a transfer to a default position account if the SEGAccountID, PMAccountID do not match a registered position account in Clearing. This is normal and expected behavior and almost always true for SEGAccountID.

N/A

If user does not want this situation to occur, please ensure the SegAccountID and PMAccountID in the positions.csv input matches a position account in Clearing.

Operational Timeline

The below timeline highlights the expected period for nightly optimization via the hosted Optimizer service.

The days users can expect optimization include all U.S. calendar days excluding weekends and January 1 holiday.

  • Clearing firms can choose whether to Optimize on all other U.S. holidays, similar to the existing process, and should note running on a U.S. holiday will utilize T-1 risk data.

Firms can manage logic to manage the variability related to the closing of the EOD optimization window by reading nightly extension data from the CME Group Clearview portal or following extension emails from clearing operations teams.

Expected daily optimization timeline, no delays:

no-delays.png

 

Expected daily optimization timeline, with upstream delays:

upstream-delays.png

 

Expected daily optimization timeline, with firm extensions:

firm-extension.png

 




How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.