Calculate Portfolio Health Score
POST /api/v1/portfolio-health
Calculate a health score for a portfolio based on diversification, cost efficiency, risk alignment, and rebalancing needs.
Request Body
Section titled “Request Body ”object
Array of portfolio assets
object
Type of asset
Example
etfCurrent value in base currency
Example
100000Ticker symbol (optional)
Example
VWCE.DEAsset name (optional)
Example
Vanguard FTSE All-World UCITS ETFNumber of units held
Example
50Purchase price per unit
Example
110.5Currency code (ISO 4217)
Example
EURAnnual expense ratio for ETFs/funds (%)
Example
0.22Geographic region of the asset
Example
GlobalUser age for risk assessment (default: 35)
Example
35Target asset allocation for rebalancing analysis
object
Optional email to associate with the result
Whether to save result for analytics (default: true)
Responses
Section titled “ Responses ”Health score calculation successful
object
Indicates successful calculation
object
Overall health score (0-1000)
Example
790Portfolio health badge level based on total score
Example
Proficientobject
Diversification score (0-250)
Example
180Cost efficiency score (0-250)
Example
220Age-appropriate risk score (0-250)
Example
200Rebalancing needs score (0-250)
Example
190Actionable improvement suggestions
Example
[ "Consider adding international diversification", "Your expense ratios are excellent"]Breakdown of assets by type (percentage)
object
Example
{ "etf": 74, "stock": 18, "cash": 8}Total portfolio value
Example
135000object
Validation error
object
Always false for error responses
Error type
Example
Validation errorMachine-readable error code
Example
VALIDATION_ERRORDetailed validation errors
object
Path to the invalid field
Example
currentAgeError message
Example
Must be between 18 and 100Rate limit exceeded
object
Always false for error responses
Error type
Example
Validation errorMachine-readable error code
Example
VALIDATION_ERRORDetailed validation errors
object
Path to the invalid field
Example
currentAgeError message
Example
Must be between 18 and 100