MutualFundBroker-API
  1. mutual_fund_broker
MutualFundBroker-API
  • mutual_fund_broker
    • User Registration
      POST
    • User Login
      POST
    • Add Investment
      POST
    • Fetch Portfolio
      GET
    • Fetch Funds by Fund Family
      GET
  1. mutual_fund_broker

Fetch Portfolio

GET
/portfolio/fetch
Retrieves the current status of the user’s portfolio, including all investments and their associated details. It calculates the total value of the portfolio and lists all investments with their respective units and purchase prices.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://localhost:8000/portfolio/fetch' \
--header 'Authorization: Bearer <token>'

Responses

🟢200Success
application/json
Body

Example
{
    "total_value": 158.228,
    "investments": [
        {
            "mutual_fund_id": 150,
            "mutual_fund_name": "UTI Banking & PSU Fund",
            "units": 10,
            "purchase_price": 4
        }
    ]
}
Modified at 2024-12-22 14:55:14
Previous
Add Investment
Next
Fetch Funds by Fund Family
Built with