Asset Management Coding Exercise
System should able to add the investors, funds, and Holdings.
System should allow the investors to invest in any funds.
System should allow the fund house to invest in any holdings with any number of quantity.
System should be able to calculate the market value of any Investor and Funds
System should also allow to Exclude some funds or holdings when calculating the market value of an Investor
System should also allow to Exclude some holdings when calculating the market value of a Fund
API for Investor to Invest in Fund
POST http ://localhost:8080/invests/investors 201 Created
Request Body
{
"investor" : {
"name" : "INV1"
},
"fund" : {
"fundName" : "F1"
}
}
API for Funds to Invest in Holdings
POST http ://localhost:8080/invests/funds 201 Created
Request Body
{
"fund" : {
"fundName" : "F3"
},
"holding" : {
"name" : "H4" ,
"value" : 10
},
"quantity" : 100
}
API for calculating the Market Value of Investor
GET http ://localhost:8080/value/investors/{investor}?&exclude={holdingName1}&exclude={holdingName2} 200 OK
Response Body
{
"type" :"INVESTOR" ,
"value" :6000
}
API for calculating the Market value of Fund
GET http ://localhost:8080/value/funds/{fund}?&exclude={holdingName1}&exclude={holdingName2} 200 OK
{
"type" :"FUND" ,
"value" :6500
}