Margin Service API - Portfolio - Add
Entity | Portfolio |
Action | Add |
URL | /portfolios |
HTTP Method | POST |
Parameter Input | No |
XML Input | Yes |
Multiple Output | No |
Synchronous | Yes |
Description
This request allows the Client to add or create a new portfolio in CME CORE. The Client must here submit the required attributes (specified below) for a new portfolio following which the server validates the request. Every transaction must be submitted separately. If the request is invalid, the server returns a status and an error message/code and if the request is valid, an internal identifier for the request along with the status are returned.
Request
XPath | Name | Type | Required | Notes |
---|---|---|---|---|
/portfolioReq@reqUserId | Requesting User ID | String | No | |
/portfolioReq/portfolio@desc | Description | String | No | |
/portfolioReq/portfolio@name | Name | String | No | |
/portfolioReq/portfolio@rptCcy | Reporting Currency | Currency | No | Defaults to USD |
/portfolioReq/portfolio/entities@clrMbrFirmId | Clearing Member Firm ID | String | No | |
/portfolioReq/portfolio/entities@custAcctId | Customer Account ID | String | No |
Note: If No Clearing Member Firm ID and Customer Account ID is supplied, these fields will be supplied with default values.
Clearing Member Firm ID will default to 'Test' and Customer Account ID will default to '1234'
Response
XPath | Name | Type | Required | Notes |
---|---|---|---|---|
/portfolioRpt/error@code | Error Code | String | No | |
/portfolioRpt/error@msg | Error Message | String | No | |
/portfolioRpt/portfolio@createTime | Create Time | Date/Time | Yes | |
/portfolioRpt/portfolio@desc | Description | String | No | |
/portfolioRpt/portfolio@id | Portfolio ID | String | Yes | |
/portfolioRpt/portfolio@name | Name | String | No | |
/portfolioRpt/portfolio@rptCcy | Reporting Currency | Currency | Yes | |
/portfolioRpt/portfolio@updateTime | Update Time | Date/Time | Yes | |
/portfolioRpt/portfolio/entities@clrMbrFirmId | Clearing Member Firm ID | String | Yes | |
/portfolioRpt/portfolio/entities@custAcctId | Customer Account ID | String | No |
Errors
Code | Description |
---|---|
400 | Bad XML syntax or missing content. More information will be provided in the error message. |
403 | Returned if the user does not have permission to add a portfolio. |
500 | The server was not able to process the request. More information (if available) will be provided in the error message. |
Examples
Valid
Request
POST {Margin Service API URL}/portfolios
<?xml version="1.1" encoding="UTF-8" standalone="yes"?> <ns2:portfolioReq xmlns:ns2="http://cmegroup.com/schema/core/1.1"> <portfolio desc="My Desc" name="My Name" rptCcy="AUD" id="0"><entities clrMbrFirmId="My Firm" custAcctId="My Account"/></portfolio></ns2:portfolioReq>
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:portfolioRpt xmlns:ns2="http://cmegroup.com/schema/core/1.2" status="SUCCESS"> <portfolio desc="My Desc" name="My Name" rptCcy="AUD" id="53224376" createTime="2017-03-17T15:08:38+00:00" updateTime="2017-03-17T15:08:38+00:00"> <entities clrMbrFirmId="My Firm" custAcctId="My Account"/> </portfolio> </ns2:portfolioRpt>
How was your Client Systems Wiki Experience? Submit Feedback
Copyright © 2024 CME Group Inc. All rights reserved.