Predefined Portfolios

Create a new predefined portfolio

post

Add a new predefined portfolio template to the system

Body
namestringRequired

Name of the predefined portfolio

Example: Conservative DePIN Portfolio
descriptionstringOptional

Description of the portfolio strategy

Example: A low-risk portfolio focused on established DePIN protocols
riskLevelstring · enumRequired

Risk level of the portfolio

Example: ConservativePossible values:
isActivebooleanOptional

Whether the portfolio is active

Default: trueExample: true
Responses
201
Predefined portfolio created successfully
application/json
post
POST /v1/predefined-portfolio HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: */*
Content-Length: 343

{
  "name": "Conservative DePIN Portfolio",
  "description": "A low-risk portfolio focused on established DePIN protocols",
  "riskLevel": "Conservative",
  "protocolItems": [
    {
      "protocolName": "Helium",
      "protocolIdentifier": "HNT",
      "allocationPercentage": 60
    },
    {
      "protocolName": "Render Network",
      "protocolIdentifier": "RNDR",
      "allocationPercentage": 40
    }
  ],
  "isActive": true
}
{
  "message": "Predefined portfolio created successfully",
  "predefinedPortfolioId": "1",
  "totalAllocation": 100
}

Get all active predefined portfolios

get

Retrieve all active predefined portfolio templates

Responses
200
Predefined portfolios retrieved successfully
application/json
get
GET /v1/predefined-portfolios HTTP/1.1
Host: api.example.com
Accept: */*
[
  {
    "predefinedPortfolioId": "1",
    "name": "Conservative DePIN Portfolio",
    "description": "A low-risk portfolio focused on established DePIN protocols",
    "riskLevel": "Conservative",
    "protocolItems": [
      {
        "protocolName": "Helium",
        "protocolIdentifier": "HNT",
        "allocationPercentage": 60
      }
    ],
    "totalAllocation": 100,
    "isActive": true,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
]

Get predefined portfolio by ID

get

Retrieve a specific predefined portfolio by its ID

Path parameters
portfolioIdstringRequired

The ID of the predefined portfolio to retrieve

Example: 1
Responses
200
Predefined portfolio retrieved successfully
application/json
get
GET /v1/predefined-portfolio/{portfolioId} HTTP/1.1
Host: api.example.com
Accept: */*
{
  "predefinedPortfolioId": "1",
  "name": "Conservative DePIN Portfolio",
  "description": "A low-risk portfolio focused on established DePIN protocols",
  "riskLevel": "Conservative",
  "protocolItems": [
    {
      "protocolName": "Helium",
      "protocolIdentifier": "HNT",
      "allocationPercentage": 60
    }
  ],
  "totalAllocation": 100,
  "isActive": true,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}

Update predefined portfolio

put

Update an existing predefined portfolio

Path parameters
portfolioIdstringRequired

The ID of the predefined portfolio to update

Example: 1
Body
namestringOptional

Updated name of the predefined portfolio

Example: Updated Conservative DePIN Portfolio
descriptionstringOptional

Updated description of the portfolio strategy

Example: An updated low-risk portfolio focused on established DePIN protocols
riskLevelstring · enumOptional

Updated risk level of the portfolio

Example: Moderate ConservativePossible values:
isActivebooleanOptional

Whether the portfolio should be active

Example: true
Responses
200
Predefined portfolio updated successfully
application/json
put
PUT /v1/predefined-portfolio/{portfolioId} HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: */*
Content-Length: 281

{
  "name": "Updated Conservative DePIN Portfolio",
  "description": "An updated low-risk portfolio focused on established DePIN protocols",
  "riskLevel": "Moderate Conservative",
  "protocolItems": [
    {
      "protocolName": "Helium",
      "protocolIdentifier": "HNT",
      "allocationPercentage": 60
    }
  ],
  "isActive": true
}
{
  "message": "Predefined portfolio updated successfully",
  "predefinedPortfolioId": "1",
  "totalAllocation": 100
}

Delete predefined portfolio

delete

Soft delete a predefined portfolio by setting it to inactive

Path parameters
portfolioIdstringRequired

The ID of the predefined portfolio to delete

Example: 1
Responses
200
Predefined portfolio deactivated successfully
application/json
delete
DELETE /v1/predefined-portfolio/{portfolioId} HTTP/1.1
Host: api.example.com
Accept: */*
{
  "message": "Predefined portfolio deactivated successfully"
}

Get predefined portfolios by risk level

get

Retrieve all active predefined portfolios with a specific risk level

Path parameters
riskLevelstring · enumRequired

The risk level to filter portfolios by

Example: ConservativePossible values:
Responses
200
Predefined portfolios retrieved successfully
application/json
get
GET /v1/predefined-portfolios/risk/{riskLevel} HTTP/1.1
Host: api.example.com
Accept: */*
[
  {
    "predefinedPortfolioId": "1",
    "name": "Conservative DePIN Portfolio",
    "description": "A low-risk portfolio focused on established DePIN protocols",
    "riskLevel": "Conservative",
    "protocolItems": [
      {
        "protocolName": "Helium",
        "protocolIdentifier": "HNT",
        "allocationPercentage": 60
      }
    ],
    "totalAllocation": 100,
    "isActive": true,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
]