API ReferenceInvestment
Compare investment scenarios
Compare multiple investment scenarios with different interest rates.
Request Body
application/json
principal*number
Initial principal amount
Range
0 <= valueyears*integer
Investment duration in years (1-50)
Range
1 <= value <= 50scenarios*
Investment scenarios to compare (1-10)
Items
1 <= items <= 10Response Body
application/json
application/json
curl -X POST "https://loading/api/cpf/investment-comparison" \ -H "Content-Type: application/json" \ -d '{ "principal": 100000, "years": 10, "scenarios": [ { "name": "CPF OA", "rate": 2.5 }, { "name": "CPF SA", "rate": 4 }, { "name": "Market", "rate": 7 } ] }'{
"input": {
"principal": 0,
"years": 0
},
"results": [
{
"name": "string",
"rate": 0,
"finalValue": 0,
"totalGrowth": 0,
"growthPercentage": 0
}
]
}{
"error": "string"
}