post https://api-lib.bambu.life/api/generalCalculator/v2/profitAndLoss/calcPortfoliosPnl
The following table describes the parameters for this API:
Name | DataType | Description | Mandatory | Sample Value | No. of decimals | Notes |
---|---|---|---|---|---|---|
balanceUnitHolding | number | Number of units held by the user per fund | Y | 2225656 | 2 | This is taken from `/pnl-calculators/funds` Field name: balanceUnitHolding |
avgPurchasePrice | number | Average purchase price of the product per fund | Y | 1.25 | 8 | This is taken from `/pnl-calculators/funds`.Field name: purchasePrice |
profitAndLossAmt | number | Profit or loss incurred by the user per fund | Y | -152457.4 ,152457.4 | 2 | Values can either be negative or positive, indicating profit achieved or Loss incurred.This is taken from `/pnl-calculators/funds`. Field Name: transactionValue |
The following table describes the outputs for this API:
Name | DataType | Description | Sample Value | No. of decimals |
---|---|---|---|---|
pnl | Number | Overall unrealized profit or loss of the goal in $ | -29527833.2189 | 2 |
pnlPercentage | Number | Overall unrealized profit or loss of the goal in % | -0.07546456692519288 | 6 |