Margin Service API - REST
 See the following Representation State Transfer (REST) methods and error codes: Â
Portfolio
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Add Portfolio | /MarginServiceApi/portfolios | POST | 'username' AND 'password' | <?xml version="1.1" encoding="UTF-8" standalone="yes"?>
<ns2:portfolioReq xmlns:ns2="http://cmegroup.com/schema/core/1.2">
<portfolio desc="My Desc" name="My Name" rptCcy="AUD" id="0">
<entities clrMbrFirmId="My Firm" custAcctId="My Account"/>
</portfolio>
</ns2:portfolioReq> |
Get Portfolio | /MarginServiceApi/portfolios/{portfolioId} | GET | 'username' AND 'password' | |
Update Portfolio | /MarginServiceApi/portfolios/{portfolioId} | PUT | 'username' AND 'password' | <?xml version="1.1" encoding="UTF-8" standalone="yes"?>
<ns2:portfolioReq xmlns:ns2="http://cmegroup.com/schema/core/1.2">
<portfolio id="{portfolioId}" desc="My New Desc" name="My New Name" rptCcy="AUD">
<entities clrMbrFirmId="My New Firm" custAcctId="My New Account"/>
</portfolio>
</ns2:portfolioReq> |
Delete Portfolio | /MarginServiceApi/portfolios/{portfolioId} | DELETE | 'username' AND 'password' | |
List All Portfolios | /MarginServiceApi/portfolios/ | GET | 'username' AND 'password' |
Margin
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Request Margin Calculation | /MarginServiceApi/margins | POST | 'username' AND 'password' | <?xml version="1.1" encoding="UTF-8"?>
<core:marginReq xmlns:core="http://cmegroup.com/schema/core/1.2">
<margin portfolioId="{portfolioId}">
<amounts ccy="AUD" conc="0.0" init="0.0" maint="0.0" nonOptVal="0.0" optVal="0.0"/>
</margin>
</core:marginReq> |
Get Margin Status/Result | /MarginServiceApi/margins/{marginId} | GET | 'username' AND 'password' |
Transaction
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Get Transaction | /MarginServiceApi/transactions/{transactionId} | GET | 'username' AND 'password' | |
Delete Transaction | /MarginServiceApi/transactions/{transactionId} | DELETE | 'username' AND 'password' |
Delta Ladders
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Add Transaction | /MarginServiceApi/transactions | POST | 'username' AND 'password' | |
Update Transaction | /MarginServiceApi/transactions/{transactionId} | PUT | 'username' AND 'password' |
Futures
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Add Transaction | /MarginServiceApi/transactions | POST | username' AND 'password' | |
Update Transaction | /MarginServiceApi/transactions/{transactionId} | PUT | username' AND 'password' |
Options
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Add Transaction | /MarginServiceApi/transactions | POST | username' AND 'password' | |
Update Transaction | /MarginServiceApi/transactions/{transactionId} | PUT | username' AND 'password' |
Interest Rate Swaps
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Add Transaction | /MarginServiceApi/transactions | POST | username' AND 'password' | |
Update Transaction | /MarginServiceApi/transactions/{transactionId} | PUT | username' AND 'password' |
Forwards
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Add Transaction | /MarginServiceApi/transactions | POST | username' AND 'password' | |
Update Transaction | /MarginServiceApi/transactions/{transactionId} | PUT | username' AND 'password' |
Multiple Trades
Use Case | Path | Method | Request Headers | Post Data |
---|---|---|---|---|
Add Transaction | /MarginServiceApi/transactions | POST | username' AND 'password' | |
Update Transaction | /MarginServiceApi/transactions/{transactionId} | PUT | username' AND 'password' |
Error Codes
Code | Description | Request | Example Message |
---|---|---|---|
400 | Bad XML syntax or missing content More information will be provided in the error message. | Calculate Margin | |
403 | The user does not have permission to perform calculations on the analytic | Add Transaction | |
404 | The requested portfolio/transaction/margin could not be found. | Get Portfolio | |
Get Margin | |||
500 | The server was not able to process the request or if validation errors exist. More information (if available) will be provided in the error message. | Add Portfolio | |
Add Transaction | |||
Calculate Margin | In the above example, 72013111 represents the transaction id that had the validation error. | ||
Get Margin |
How was your Client Systems Wiki Experience? Submit Feedback
Copyright © 2024 CME Group Inc. All rights reserved.