---
title: "Get the top 20 stocks with the highest expected Sharpe based on the provided filters."
method: GET
path: "/top_stocks"
---

# Get the top 20 stocks with the highest expected Sharpe based on the provided filters.

`GET /top_stocks`

## Query parameters

- `sector` 'Healthcare' | 'Energy' | 'Technology' | 'Financial Services' | 'Basic Materials' | 'Industrials' | 'Real Estate' | 'Consumer Defensive' | 'Manufacturing' | 'Consumer Cyclical' | 'Communication Services' | 'Information' | 'Retail Trade' | 'Professional, Scientific, and Technical Services' | 'Transportation and Warehousing' | 'Finance and Insurance' | 'Health Care and Social Assistance' | 'Utilities' | 'Educational Services' | 'Mining, Quarrying, and Oil and Gas Extraction' | 'Administrative and Support and Waste Management and Remediation Services' | 'Agriculture, Forestry, Fishing and Hunting' | 'Construction' | 'Wholesale Trade' | 'Arts, Entertainment, and Recreation' | 'Real Estate and Rental and Leasing' | 'Accommodation and Food Services' | 'Management of Companies and Enterprises'
- `min_marketcap` number
- `country` 'US' | 'CA'
- `sort_by` 'expected_sharpe' | 'ai_sentiment_score' | 'expected_return' | 'market_cap'
- `sort_order` 'descending' | 'ascending'

## Response `200`

OK

- TopStocksResponse — Response object containing the top 10 stocks based on the provided filters. A lot of stock-specific information is also provided.
  - `top_stocks` StockDetails[]
    - `Ticker` string
    - `beta` number — The beta value of the stock, indicating its sensitivity to market movements.
    - `security_type` string — The type of security (e.g. "Companies").
    - `sub_asset_class` string
    - `name` string — The name of the company.
    - `country` string — The country where the company is headquartered.
    - `exchange` string
    - `detailed_info` string — Additional detailed information about the stock (if available).
    - `sector` string
    - `industry` string
    - `marketcap` number
    - `employees` number
    - `ceo` string
    - `similar` string — Similar stocks or companies (if available).
    - `logo` string — The logo of the company as a url to a hosted image.
    - `url` string
    - `tags` string
    - `Company_Growth` number — The company growth factor of the stock.
    - `Company_Quality` number — The company quality factor of the stock.
    - `Company_Size` number — The company size factor of the stock.
    - `Company_Value` number — The company value factor of the stock.
    - `Credit_Conditions` number — The credit conditions factor of the stock.
    - `Economic_Growth` number — The economic growth factor of the stock.
    - `High_Dividend` number — The high dividend factor of the stock.
    - `Inflation_Surprises` number — The inflation surprises factor of the stock.
    - `Low_Volatility` number — The low volatility factor of the stock.
    - `Oil_Price` number — The oil price factor of the stock.
    - `Price_Momentum` number — The price momentum factor of the stock.
    - `Real_Yield` number — The real yield factor of the stock.
    - `VIX_Index` number — The VIX index factor of the stock.
    - `seriesName` string
    - `more_info` string — url to the PortfolioPilot Security Explorer page providing more information (create link)

## Other responses

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

---

[API](https://skmtc.net/portfoliopilot/apis/portfoliopilot-plugin.md) · [All operations](https://skmtc.net/portfoliopilot/apis/portfoliopilot-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portfoliopilot/portfoliopilot-plugin/versions/7ed0083c9099/schema)
