Risk API

Risk API

This topic lists Risk API specifications relevant to: 

  • Futures and Options trade/position and portfolio definition

  • Outputs relevant to Futures and Options for SPAN

  • CME Group's new Futures and Options Margin Model, SPAN 2


Contents

Revision History

 

Date

Version

Description

Date

Version

Description

10/09/2017

0.01

Initial Version

3/05/2018

0.02

Updated Inputs and Outputs
Added Technical Integration Notes
Added Portfolio Structure/Omnibus details
Added Positions in Delivery Details

5/31/2018

0.03

Updated Input and Outputs
Updated Technical Integration Notes

7/16/2018

1.00

Updated Input and Outputs
Updated JSON message – Input and Outputs
Updated Portfolio Use Cases
Added appendix

9/10/2018

1.1

Updated Portfolio Data Model Notes
Added new .json message – Input and Outputs

3/22/2019

1.2

Updated Input and Output
Updated .json input and output message samples

6/28/2019

1.3

Updated Portfolio Data Model
Updated Portfolio .json Message Sample
Updated Margin Results Data Model
Updated Margin Results .json Message Sample

7/16/2019

1.4

Updated Portfolio Data Model
Updated Portfolio .json Message Sample
Updated Margin Results Data Model
Updated Margin Results .json Message Sample

9/10/2019

1.5

Updated Portfolio Data Model
Updated Margin Results Data Model
Updated Margin Results .json Message Sample
Updated Appendix

12/9/2019

1.6

Updated Portfolio Data Model

2/21/2020

2.0

Updated to the following sections:

  • Portfolio Data Model

  • Outputs

  • Margin Result Structure Explained

  • Margin Results Data Model

  • Margin Result .json message sample

3/13/2020

2.1

Updates to the following sections:

  • Inputs section

  • Portfolio Data Model

  • ERD Request Data Model

  • Portfolio Request Use Cases

  • Margin Results Data Model

  • ERD Response Data Model

4/10/2020

2.2

Addition of Appendix highlight major SPAN vs. SPAN2 Risk API changes
Updates to the following sections:

  • Portfolio Data Model

  • Margin Results Data Model

  • ERD Response Data Model

6/5/2020

2.3

Updates to Margin Results Data Model

8/3/2020

2.4

Updates to Margin Results Data Model

  • Removed vumComponent field from ComponentAmts

  • Added customerAccountType field to CCP level

  • Added data rules to availableNetOptionValue

  • Added data rules to ValuationAmts category
    Updated ERD Response Data Model to align

8/25/2021

2.5

Updates to Margin results Data Model

11/22/21

2.6

Added note about Implied Offset only reporting at Pod Level

5/9/2022

2.7

Cross Model Offset attribute added back in to CCP level response

Added context related to the Account Over-ride related to subaccount types.

 

Risk API Integration

The Risk API reflects the data structure for integration with two of our margin services as defined below. CME Group will make additional functional and non-functional requirements available to users integrating with the Java API at: Margin Software.

Margin API: A CME Hosted REST Web-Service API. Users will leverage REST methods for PUT, POST, GET and DELETE to margin portfolios. Users will send CME JSON messages through https web service as defined in this document following the workflows outlined in CME Group's Margin Service API documentation.

Java API: A CME Deployed Library for interaction with CME Group's Margin Models. Users will directly integrate their systems with the CME .jar by building Java portfolio objects and processing margin results objects.

Inputs

Inputs for a futures and options portfolio will contain the following data definitions for the Risk Portfolio Message. The Risk Portfolio Message structure will be organized by categories and further detailed through a subset of attributes within each category.

Portfolio Data Model

Category

Attribute

Description

json field names and examples

Presence

Data Type

Data Rules

Category

Attribute

Description

json field names and examples

Presence

Data Type

Data Rules

Header

RequestID

User generated Request ID for margin request

requestId
"INPUT_abc123456789"

Optional

string

 

 

Version

Version of risk API

Version
"1.0"

Optional

decimal

Users should specifiy the version of the Risk API they are using

 

Sent Time

User generated system create time for message

sentTime"2018-03-01T17:43:09.422Z"

Optional

dateTime

 

Point In Time

Business Date

Business date of margin run

businessDt"2018-02-28"

Required

date

Date format expressed as: YYYY-MM-DD

 

Cycle Code

Defined description to distinguish between different point in time

cycleCode
"EOD"

Optional

string

Acceptable values are: AM, EARLY, ITD, or EOD

 

Run Number

Run Number field will increment if used multiple times within a specific CycleCode

runNumber"1"

Optional

integer

 

 

Time

Populated with the current timestamp when the market data file gets created

time
"17:43:09"

Optional

time

 

Portfolio

id

User-defined ID for the portfolio, margin results at portfolio level will correspond to this id

id"PORTFOLIO_1"

Conditional

string

Optional for non-omnibus portfolios
A unique key should be used to identify each portfolio in a request payload

 

Currency

User Defined Portfoio Currency.

currency"USD"

Required

string

See Appendix for complete list of acceptable values

 

Customer Account Type

Account Type considerations impacting the margin ratio

customerAccountType"HEDGE"

Required

string

Users set the default account type for the portfolio through this attribute

Acceptable values are MEMBER, HEDGE, SPECULATOR, HEIGHTENED*, NON_HEIGHTENED*.

Omnibus accounts can only be HEDGE, SPEC, HEIGHTENED*, or NON_HEIGHTENED*.

*(Note: Values Heightened and Non_Heightened are not yet supported. The values SPECULATOR and HEDGE are implied as HEIGHTENED and NON_HEIGHTENED , respectively.)

 

Omnibus Indicator

Omnibus Indicator

omnibusInd"NO"

Optional

string

Acceptable values are YES or No; Defaults to NO

 

Parent Portfolio ID

ID of the parent portfolio

parentPortfolioId"1.0"

Optional

string

Used for omnibus child portfolios
This field is the linkage between parent and child omnibus relationship

 

Memo

Free form field which can be used to pass through any information to the response message

Memo

Optional

string

Used to pass additional portfolio referential data between the margin request and margin response

Entities

Clearing Firm ID

User defined Clearing firm alphanumeric Id

firmId"001"

Required

string

 

 

Account ID

User defined account alphanumeric ID

accountId
"Account1"

Required

string

 

 

Account Name

User defined name for account

accountName"John Doe"

Optional

string

 

 

Origin Type

Used to designate the manner in which transactions, postions, and funds are segregated as required by requlators

originType
"CUST"

Required

string

Acceptable values are: HOUS, CUST, CUSTOMER, HOUSE
Users can only supply one of the listed values; otherwise error message

 

Fund Segregation Type

Fund segregation type

segregationType"CSEG"

Optional

string

Acceptable values are CSEG, CNSEG, COTC, NSEG, SECURED

Positions

Customer Account Type

Account Type considerations impacting the margin ratio

customerAccountType"MEMBER"

Optional

string

Acceptable values are MEMBER, HEDGE, SPECULATOR, HEIGHTENED*, NON_HEIGHTENED*.

Omnibus accounts can only be HEDGE, SPEC, HEIGHTENED*, or NON_HEIGHTENED*.

*(Note: Values Heightened and Non_Heightened are not yet supported. The values SPECULATOR and HEDGE are implied as HEIGHTENED and NON_HEIGHTENED , respectively.)Users can override the default customer account type that was supplied at the Portfolio level. Acount Override is applied at the Pod, not position, level. If multiple over-rides are present within the same Pod, the deployable software will first prioritize MEMBER type for the Pod if any positions are MEMBER, then prioritize HEDGE, and finally SPECULATOR.

 

Net Position

Net quantity is expressed as either positive (long) and negative (short)

netQty"1.0"

Conditional

decimal (can be negative)

Required if portfolio AccountType is not Omnibus
Acceptable values can only be integers

 

Naked Long Quantity

Buy quantity for naked margin treatment (see omnibus/PID notes)

nakedLongQty"1.0"

Conditional

decimal (cannot be negative)

Only allowable for Omnibus account types, but never required
Acceptable values can only be integers

 

Naked Short Quantity

Sell Quantity for naked margin treatment (See omnibus/PID notes)

nakedShortQty"1.0"

Conditional

decimal (cannot be negative)

Only allowable for Omnibus account types, but never required
Acceptable values can only be integers

Instrument

Clearing Organization Id

User defined clearing organization

clearingOrganizationId
"CME"

Required

string

 

 

Exchange ID

Name of Exchange in which the contracts are listed

exchangeId"CBT"

Required

string

For CME Group Exchanges, acceptable values are CME, CBT, NYMEX, COMEX, NYM, CMX

 

Product Code

CME Clearing House Product Code

productCode"17"

Required

string

 

 

Product Type

Name of the product type

productType"FUT"

Required

string

Acceptable values are FUT, OOF, OOP, OOC, FWD

 

Contract Period Code

Maturity Date of Product

periodCode"201809"
"20180920"
"201809W1"

Required

string

Example values are: YYYYMM, YYYYMMDD, YYYYMMW1, YYYYMMW2, YYYYMMW3, YYYYMMW4,
YYYYMMW5

 

Put/Call Indicator

Whether the option trade is a PUT or CALL

putCallInd"C"

Conditional

string

Required if ProductType = OOF, OOC, OOP
Acceptable values are P or C

 

Strike

Strike Price for options

strike"80.00"

Conditional




How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.