---
title: "Get sector, country, and holding exposures for the given portfolio and the markdown of respective charts"
method: POST
path: "/portfolio_exposures"
---

# Get sector, country, and holding exposures for the given portfolio and the markdown of respective charts

`POST /portfolio_exposures`

## Request

- Base URL: `https://portfoliopilot.com/api/gpt`
- URL: `https://portfoliopilot.com/api/gpt/portfolio_exposures`
- Auth: none declared
- TypeScript: <https://skmtc.dev/portfoliopilot/apis/portfoliopilot-plugin/docs/portfolio_exposures/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `portfolio` Portfolio[]
    - Investment[]: Provided portfolio for the user. Use ticker CUR:USD for cash, ticker Reserved.RealEstate for real estate, ticker Reserved.Crypto for cryptocurrencies, ticker Private.MoneyMarket for money market funds
      - `T` string, required: ticker symbol
      - `A` number, required: amount representing current market value

## Response `200`

OK

- GetPortfolioExposuresResponse
  - `exposure_dicts` object
    - `country` object
    - `sector` object
    - `holding` object
  - `country_exposure_chart_markdown` string: Markdown for displaying the country exposure pie chart
  - `sector_exposure_chart_markdown` string: Markdown for displaying the sector exposure pie chart
  - `holding_exposure_chart_markdown` string: Markdown for displaying the holding exposure pie chart

## Other responses

- `400`: Bad Request
- `405`: Method not allowed (e.g. GET request type is not supported, use POST method instead)

## Changes

- **2025-01-28** `e2d1ba050ae9`: 3 breaking
  - the `exposure_dicts/country/additionalProperties/` response's property format changed from `float` to no format for status `200`
  - the `exposure_dicts/holding/additionalProperties/` response's property format changed from `float` to no format for status `200`
  - the `exposure_dicts/sector/additionalProperties/` response's property format changed from `float` to no format for status `200`

[Operation history](https://skmtc.dev/portfoliopilot/apis/portfoliopilot-plugin/changes/portfolio_exposures/post.md)

---

[API](https://skmtc.dev/portfoliopilot/apis/portfoliopilot-plugin.md) - [All operations](https://skmtc.dev/portfoliopilot/apis/portfoliopilot-plugin/llms.txt) - [OpenAPI document](https://skmtc.dev/portfoliopilot/apis/portfoliopilot-plugin/revisions/7ed0083c9099?raw)
