Portfolio

Calculate number of shares from total value and share value

POST/portfolio/transactions/form-calculations/number-of-shares

Server-side form helper that computes number_of_shares = total_value / share_value.

Request body

application/json, required · PortfolioFormCalculateNumberOfSharesRequest

  • total_valuenumberRequired#
  • share_valuenumberRequired#
{
  "total_value": 1,
  "share_value": 1
}

Responses

200
{
  "number_of_shares": "string"
}
422

Validation error

Examples

curl -X POST https://your-org-domain/kong/core/api/v2/portfolio/transactions/form-calculations/number-of-shares\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"\
  -d '{
  "total_value": 1,
  "share_value": 1
}'