The Portfolio List API endpoint (api/v2/portfolio/portfolios/list) has been updated to accept a new format for a POST body, and to support pagination of results. Please review the API documentation for the endpoint (https://www.orioneclipse.com/swagger/index.html) for the list of column names.
The suggested method of creating the POST body is to set the desired columns, filters, and sorting in the Eclipse application and observing the request as it is sent to the API.
Below is the list of some samples
Get list of all portfolios with all columns
POST https://baseurl/api/v2/portfolio/portfolios/list
BODY
{}
Get list of all portfolios with all columns by filter
POST https://baseurl/api/v2/portfolio/portfolios/list?filterId={portfolioFilterId}
BODY
{}
Get list with paging
POST https://baseurl/api/v2/portfolio/portfolios/list?limit={pageSize}&offset={recordsToSkip}
Example
POST https://baseurl/api/v2/portfolio/portfolios/list?limit=1000&offset=3000
This will return 1000 records skipping first 3000 records.
Get only selected list of columns
It will return all the mentioned columns. There are some required columns that would be returned even when they are not specified.
BODY
{
"columns": [
{
"colId": "id"
},
{
"colId": "accountId"
},
{
"colId": "modelName"
},
{
"colId": "registrationId"
},
{
"colId": "primaryTeam"
},
{
"colId": "accountNumber"
},
{
"colId": "totalValue"
},
{
"colId": "name"
}
]
}
Filtering records based on column values
We can specify multiple condition on multiple columns. We can have records to match all column conditions (matchAll : true) or any column condition (matchAll : false).
BODY
{
"matchAll": boolean,
"columns": [{
"colId": string,
"sort": string,
"sortIndex": number
"filters": [{
"comparator": string,
"dataType": string,
"values": [string]
}
]
}
]
}
Example: Returns portfolios that are Out Of Tolerance sorted by id.
{
"matchAll": true,
"columns": [
{
"colId": "id",
"sort": "asc",
"sortIndex": 0
},
{
"colId": "portfolioOutOfTolerance",
"filters": [
{
"comparator": "EQUALS",
"dataType": "String",
"values": [
"OOT"
]
}
]
},
{
"colId": "totalValue"
}
]
}
Example: Returns portfolios whose primary team starts with “Test” and whose total value is between 100000 and 200000 sorted by team name ascending then total value descending.
{
"matchAll": true,
"columns": [
{
"colId": "id"
},
{
"colId": "name"
},
{
"colId": "primaryTeam",
"sort": "asc",
"sortIndex": 0,
"filters": [
{
"comparator": "STARTS_WITH",
"dataType": "String",
"values": [
"Test"
]
}
]
},
{
"colId": "totalValue",
"sort": "desc",
"sortIndex": 1,
"filters": [
{
"comparator": "GREATER_THAN",
"dataType": "Number",
"values": [
100000
]
},
{
"comparator": "LESS_THAN",
"dataType": "Number",
"values": [
200000
]
}
]
}
]
}
Example: Returns portfolios with account number containing “Roth”, “REBAL”
{
"matchAll": true,
"columns": [
{
"colId": "id"
},
{
"colId": "name"
},
{
"colId": "accountNumber",
"filters": [
{
"comparator": "CONTAINS",
"dataType": "String",
"values": [
"Roth",
"REBAL"
]
}
]
}
]
}
Example: Returns portfolios whose last trade date is within last 30 days.
{
"matchAll": true,
"columns": [
{
"colId": "id"
},
{
"colId": "name"
},
{
"colId": "lastTradedDate",
"sort": "desc",
"sortIndex": 0,
"filters": [
{
"comparator": "WITHIN",
"dataType": "Date",
"values": [
30
]
}
]
}
]
}
The below fields are marked as required, so these will always be returned:
cashOutOfTolerance
hasUnassignedHoldings
id
isDisabled
isSleevePortfolio
modelId
modelName
name
needAnalyticsStatus
numOfAssociatedAccounts
orionConnectFirmId
portfolioOutOfTolerance
primaryTeam
registrationId
statusReason
tradeBlocked