# Get top constituents

Get top N constituents of an aggregate ranked by a metric.
    
    Integration Use cases:
    - Top contributors to index
    - Sector leaders
    - Most active securities in aggregate

Endpoint: POST /aggregates/summary/top-constituents
Version: 1.0.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer

## Request fields (application/json):

  - `aggregate_id` (integer, required)
    Aggregate ID

  - `metric` (string)
    Metric to rank by

  - `top_n` (integer)
    Number of top constituents

  - `interval` (string)
    Time interval enumeration.
    Enum: "10min", "30min", "1h", "1d", "1w", "1m", "1y"

  - `asset_class` (string)
    Asset class enumeration.
    Enum: "all", "cash", "options"

## Response 200:

  - `200` (unknown)
    Successful Response

## Response 200 fields (application/json):

  - `aggregate_id` (integer, required)
    Aggregate ID

  - `vanda_id` (string, required)
    Aggregate Vanda ID

  - `constituents` (array, required)
    Top constituents ranked by metric

  - `constituents.id` (integer, required)
    Security ID

  - `constituents.vanda_id` (string, required)
    Vanda identifier

  - `constituents.symbol` (any)
    Trading symbol

  - `constituents.name` (any)
    Security name

  - `constituents.sector` (any)
    Sector

  - `constituents.industry` (any)
    Industry

  - `constituents.weight` (any)
    Weight in aggregate (percentage)

  - `constituents.latest_data` (any)
    Latest data point for security

  - `metric` (string, required)
    Metric used for ranking

  - `count` (integer, required)
    Number of constituents returned

## Response 422:

  - `422` (unknown)
    Validation Error

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array, required)

  - `detail.msg` (string, required)

  - `detail.type` (string, required)

  - `detail.input` (any)

  - `detail.ctx` (object)

