Margin Service API - Use Cases

Margin Service API - Use Cases

 

Use Case 1. Creating a New Portfolio

Margin Service API Flow

Requests

Description 

Requests

Description 

Create Portfolio

  • Client submits required attributes for a portfolio

  • Server validates request, including checks for uniqueness (name is unique)

  • If the request is valid, an internal identifier and status are returned

  • If the request is invalid, a status and error message/error code are returned

  • Does not include transactions (trades)

Alter Transactions

  • Allows transactions to be uploaded in bulk (multiple transactions in a single request)

  • Supports a "mixed mode" allowing transactions to be created, updated, and deleted

  • A valid portfolio identifier must be specified

  • All transactions must be in a single portfolio

  • Transactions being created must be specified with all the required attributes.

  • Transactions being updated must have the attributes being updated and the system internal identifier

  • Transactions being deleted must have the internal identifier of the transaction

  • The sever will return a request identifier

Workflow 

 

Use Case 2. Calculating Margin on an Existing Portfolio

Margin Service API Flow

Requests

Description 

Requests

Description 

Calculate Margin

  • Client submits margin type (full, incremental)

  • Client must submit portfolio identifier

  • Client may submit additional (transient) transactions by value

  • Client may submit transactions to exclude by identifier from the portfolio

  • Client may submit additional portfolio by reference

  • Client may submit transaction IDs by reference (allowed for their user)

  • The server will queue up the request for execution

  • If the portfolio does not exist, referenced transactions do not exist, or there are other errors an error message/code will be returned

  • If the request is valid, then after the request is submitted to the risk engine for processing a request identifier and status are returned.

Get Calculate Margin Result

  • Client submits margin request identifier

  • Server returns the identifier, status, error (if applicable), and result (if available)

Workflow

Use Case 3. Calculating Margin on an Existing Portfolio with Additions/Subtractions

Margin Service API Flow

Requests

Description 

Requests

Description 

Alter Transactions

  • Allows transactions to be uploaded in bulk (multiple transactions in a single request)

  • Supports a "mixed mode" allowing transactions to be created, updated, and deleted

  • A valid portfolio identifier must be specified

  • All transactions must be in a single portfolio

  • Transactions being created must be specified with all the required attributes

  • Transactions being updated must have the attributes being updated and the system internal identifier

  • Transactions being deleted must have the internal identifier of the transaction

  • The sever will return a request identifier

Calculate Margin

  • Client submits margin type (full, incremental)

  • Client must submit portfolio identifier

  • Client may submit additional (transient) transactions by value

  • Client may submit transactions to exclude by identifier from the portfolio

  • Client may submit additional portfolio by reference

  • Client may submit transaction IDs by reference (allowed for their user)

  • The server will queue up the request for execution

  • If the portfolio does not exist, referenced transactions do not exist, or there are other errors an error message/code will be returned

  • If the request is valid, then after the request is submitted to the risk engine for processing a request identifier and status are returned

Get Alter Transactions Result

  • The client submits an identifier from the alter transactions request

  • The server returns the overall status of the request, and results for all transactions if all have completed processing.

  • The server will return an identifier (if available), status, and error message/error code (if applicable)

Get Calculate Margin Result

  • Client submits margin request identifier

  • Server returns the identifier, status, error (if applicable), and result (if available)




How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.