Create a portfolio
To create a portfolio a POST
call to Create Portfolio is needed and with the following information:
name
the name for the portfolio, this name will appear in the Clarity AI SaaS Platform.securitiesWeightDistribution
defines how to distribute the weight of the portfolio. PERCENTAGE or AMOUNT are supported options.securities
List of Security Items the portfolio will be composed of and requires the following parameters:idType
specifies the type of identifier used, e.g. ISINid
security identifier for the allocation
total
object which specifies the total value of the portfolio and requires the following parameters:value
the total value of the portfolio in the given currencycurrency
the 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 7 months ago
What’s Next