Margin Service API - Portfolio - Add

The add portfolio request creates a new portfolio into the CME CORE database.

 

 

EntityPortfolio
ActionAdd
URL/portfolios
HTTP MethodPOST
Parameter InputNo
XML InputYes
Multiple OutputNo
SynchronousYes

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

XPathNameTypeRequiredNotes
/portfolioReq@reqUserIdRequesting User IDStringNo
/portfolioReq/portfolio@descDescriptionStringNo
/portfolioReq/portfolio@nameNameString No
/portfolioReq/portfolio@rptCcyReporting CurrencyCurrencyNoDefaults to USD
/portfolioReq/portfolio/entities@clrMbrFirmIdClearing Member Firm IDString No
/portfolioReq/portfolio/entities@custAcctIdCustomer Account IDString 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

XPathNameTypeRequiredNotes
/portfolioRpt/error@codeError CodeString No
/portfolioRpt/error@msgError MessageString No
/portfolioRpt/portfolio@createTimeCreate TimeDate/TimeYes
/portfolioRpt/portfolio@descDescriptionString No
/portfolioRpt/portfolio@idPortfolio IDString Yes
/portfolioRpt/portfolio@nameNameString No
/portfolioRpt/portfolio@rptCcyReporting CurrencyCurrencyYes
/portfolioRpt/portfolio@updateTimeUpdate TimeDate/TimeYes
/portfolioRpt/portfolio/entities@clrMbrFirmIdClearing Member Firm IDString Yes
/portfolioRpt/portfolio/entities@custAcctIdCustomer Account IDString No

Errors

CodeDescription
400Bad XML syntax or missing content. More information will be provided in the error message.
403Returned if the user does not have permission to add a portfolio.
500The 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.