POST v1/BondPortfolios/Create

Creates a bond portfolio.

Request Information

Parameters

Name Type Description Additional information
request BondPortfoliosCreateRequest Container for the BondPortfoliosCreateRequest input parameters. See parameter details below.

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "name": "sample string 1",
  "insiteId": "sample string 2",
  "id": 3,
  "list": [
    {
      "instrumentId": 1,
      "cashWeight": 1.0
    },
    {
      "instrumentId": 1,
      "cashWeight": 1.0
    },
    {
      "instrumentId": 1,
      "cashWeight": 1.0
    }
  ],
  "sdkVersion": "sample string 4"
}

application/xml, text/xml

Sample:
<BondPortfoliosCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <SdkVersion>sample string 4</SdkVersion>
  <Id>3</Id>
  <InsiteId>sample string 2</InsiteId>
  <List>
    <BondPortfolioInput>
      <CashWeight>1</CashWeight>
      <InstrumentId>1</InstrumentId>
    </BondPortfolioInput>
    <BondPortfolioInput>
      <CashWeight>1</CashWeight>
      <InstrumentId>1</InstrumentId>
    </BondPortfolioInput>
    <BondPortfolioInput>
      <CashWeight>1</CashWeight>
      <InstrumentId>1</InstrumentId>
    </BondPortfolioInput>
  </List>
  <Name>sample string 1</Name>
</BondPortfoliosCreateRequest>

Parameter Information

Parameter Name: request

Property Type Description
Name String The name of the new bond portfolio.
InsiteId String Optional - Insite Id.
Id Int32 Optional - Portfolio to copy bonds from. "List" parameter will be ignored if "Id" parameter is passed in.
List List`1 Optional - The list of bonds to include in the new portfolio. Exposures can be passed in with the list of bonds through the BondPortfolioInput class.
SdkVersion String If the client is using the SDK, the version number will be passed along with the request. This field is optional.

Response Information

Response body formats

application/json, text/json

Sample:
{
  "id": 1,
  "itemsAdded": 2,
  "errorOccurred": false,
  "errorMessages": [
    "sample string 1",
    "sample string 2",
    "sample string 3"
  ],
  "request": {
    "name": "sample string 1",
    "insiteId": "sample string 2",
    "id": 3,
    "list": [
      {
        "instrumentId": 1,
        "cashWeight": 1.0
      },
      {
        "instrumentId": 1,
        "cashWeight": 1.0
      },
      {
        "instrumentId": 1,
        "cashWeight": 1.0
      }
    ],
    "sdkVersion": "sample string 4"
  }
}

application/xml, text/xml

Sample:
<BondPortfoliosCreateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorMessages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
    <d2p1:string>sample string 3</d2p1:string>
  </ErrorMessages>
  <ErrorOccurred>false</ErrorOccurred>
  <Request>
    <SdkVersion>sample string 4</SdkVersion>
    <Id>3</Id>
    <InsiteId>sample string 2</InsiteId>
    <List>
      <BondPortfolioInput>
        <CashWeight>1</CashWeight>
        <InstrumentId>1</InstrumentId>
      </BondPortfolioInput>
      <BondPortfolioInput>
        <CashWeight>1</CashWeight>
        <InstrumentId>1</InstrumentId>
      </BondPortfolioInput>
      <BondPortfolioInput>
        <CashWeight>1</CashWeight>
        <InstrumentId>1</InstrumentId>
      </BondPortfolioInput>
    </List>
    <Name>sample string 1</Name>
  </Request>
  <Id>1</Id>
  <ItemsAdded>2</ItemsAdded>
</BondPortfoliosCreateResponse>