Create a portfolio
To create a portfolio a POST call to Create Portfolio is needed and with the following information:
namethe name for the portfolio, this name will appear in the Clarity AI SaaS Platform.securitiesWeightDistributiondefines how to distribute the weight of the portfolio. PERCENTAGE or AMOUNT are supported options.securitiesList of Security Items the portfolio will be composed of and requires the following parameters:idTypespecifies the type of identifier used, e.g. ISINidsecurity identifier for the allocation
totalobject which specifies the total value of the portfolio and requires the following parameters:valuethe total value of the portfolio in the given currencycurrencythe currency denomination of the portfolio.
Sample body
A completed body for a portfolio using PERCENTAGE would look like:
{
"name": "Sample Portfolio - PERCENTAGE",
"securitiesWeightDistribution": "PERCENTAGE",
"securities": [
{
"idType": "ISIN",
"id": "US78462F1030",
"percentage": 70
},
{
"idType": "CUSIP",
"id": "037833100",
"percentage": 80
},
{
"idType": "CASH",
"id": "Short Cash",
"percentage": -25
},
{
"idType": "OTHER",
"id": "Derivatives",
"percentage": -25
}
],
"total": {
"value": 200000,
"currency": "EUR"
}
}
A completed body for a portfolio using AMOUNT would look like:
{
"name": "Sample portfolio- AMOUNT",
"securitiesWeightDistribution": "AMOUNT",
"securities": [
{
"idType": "ISIN",
"id": "US78462F1030",
"amount": 200000,
"currency": "EUR"
},
{
"idType": "CUSIP",
"id": "037833100",
"amount": 100000,
"currency": "EUR"
},
{
"idType": "CASH",
"id": "Short Cash",
"amount": -25000,
"currency": "EUR"
},
{
"idType": "OTHER",
"id": "Derivatives",
"amount": -25000,
"currency": "EUR"
}
],
"total": {
"currency": "EUR"
}
}
Sample response
The response will look like:
{
"id": "650edc5ff188042e8fc2196b",
"name": "SamplePortfolio",
"status": "DRAFT",
"total": {
"value": 1000,
"currency": "USD"
}
}
Depending on the complexity of the portfolio, it creating can take several seconds. Until then the status of the portfolio will be DRAFT. Once ready, the status will change to CREATED.
The id can be then used to retrieve, update, or delete a portfolio and also to retrieve Clarity AI data based on the composition of the portfolio.
Updated over 1 year ago
What’s Next
