Predefined Portfolios
Add a new predefined portfolio template to the system
Name of the predefined portfolio
Conservative DePIN Portfolio
Description of the portfolio strategy
A low-risk portfolio focused on established DePIN protocols
Risk level of the portfolio
Conservative
Possible values: Whether the portfolio is active
true
Example: true
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
}
Retrieve all active predefined portfolio templates
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"
}
]
Retrieve a specific predefined portfolio by its ID
The ID of the predefined portfolio to retrieve
1
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 an existing predefined portfolio
The ID of the predefined portfolio to update
1
Updated name of the predefined portfolio
Updated Conservative DePIN Portfolio
Updated description of the portfolio strategy
An updated low-risk portfolio focused on established DePIN protocols
Updated risk level of the portfolio
Moderate Conservative
Possible values: Whether the portfolio should be active
true
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
}
Soft delete a predefined portfolio by setting it to inactive
The ID of the predefined portfolio to delete
1
DELETE /v1/predefined-portfolio/{portfolioId} HTTP/1.1
Host: api.example.com
Accept: */*
{
"message": "Predefined portfolio deactivated successfully"
}
Retrieve all active predefined portfolios with a specific risk level
The risk level to filter portfolios by
Conservative
Possible values: 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"
}
]