The Portfolio Query API returns portfolio analytics (values, returns, allocations) grouped and filtered by any combination of Addepar attributes. Unlike the Portfolio Views endpoint (which executes a saved view), Portfolio Query lets you define columns, groupings, and filters dynamically in each request. This makes it the primary endpoint for integrations that need flexible, programmatic access to portfolio data.

The response is a hierarchical tree: a total node containing children grouped by your specified attributes, with column values computed at each level.

Overview

Base route/v1/portfolio/query
MethodPOST
ProducesJSON
PaginationNo
OAuth scopesportfolio_query

📘

Access requirements

Portfolio query access must be enabled for your API user or application.

Required parameters

ParameterTypeDescription
columnsArray of objectsAttribute keys to compute. Each entry has a key and optional arguments. Example: [{"key": "value"}, {"key": "time_weighted_return"}]
groupingsArray of objects or stringsAttributes to group rows by. Determines the tree structure of the response. Example: [{"key": "asset_class"}, {"key": "holding_account"}]
start_dateStringPeriod start. Format: YYYY-MM-DD.
end_dateStringPeriod end. Format: YYYY-MM-DD.
portfolio_typeStringScope. Values: ENTITY, ENTITY_FUNDS, GROUP, GROUP_FUNDS, FIRM, FIRM_ACCOUNTS, FIRM_CLIENTS, FIRM_HOUSEHOLDS, FIRM_UNVERIFIED_ACCOUNTS.
portfolio_idNumber or [Number]Entity ID, group ID, or 1 (for firm). Accepts a single value or array.

Alternative to portfolio_id: Pass external_ids to scope by external identifier. Format: [{"external_type_key": "salesforce", "external_id": "sf_123"}]. See External Identifiers.

Optional parameters

ParameterTypeDefaultDescription
filtersArrayNoneFilter rows by attribute values. See filter object below.
hide_previous_holdingsBooleanfalseExclude holdings not held at end of current period.
group_by_historical_valuesBooleanfalseInclude previous values when grouping on a time-varying attribute.
group_by_multiple_attribute_valuesBooleanfalseBreak out groupings by each value for multi-value attributes.
look_through_composite_securitiesBooleanfalseLook through components of composite securities (funds).
look_through_constituent_holdingsObjectNoneControl constituent lookthrough. {"type": "top", "threshold": 10}. Types: none, top, all, weighted.
display_account_feesBooleanfalseShow account fees in results.

Query portfolio data

POST /v1/portfolio/query

curl -X POST "https://{firm}.addepar.com/api/v1/portfolio/query" \
  -H "Authorization: Basic {credentials}" \
  -H "Addepar-Firm: 1" \
  -H "Content-Type: application/vnd.api+json" \
  -H "Accept: application/vnd.api+json" \
  -d '{
  "data": {
    "type": "portfolio_query",
    "attributes": {
      "columns": [
        {"key": "value"},
        {"key": "time_weighted_return"}
      ],
      "groupings": [
        {"key": "asset_class"}
      ],
      "portfolio_type": "ENTITY",
      "portfolio_id": [329263],
      "start_date": "2024-01-01",
      "end_date": "2024-06-30"
    }
  }
}'
{
  "meta": {
    "columns": [
      { "key": "value", "display_name": "Value (USD)", "output_type": "Number", "currency": "USD" },
      { "key": "time_weighted_return", "display_name": "TWR (USD)", "output_type": "Percent", "currency": "USD" }
    ],
    "groupings": [
      { "key": "asset_class", "display_name": "Asset Class" }
    ]
  },
  "data": {
    "type": "portfolio_views",
    "attributes": {
      "total": {
        "name": "Total",
        "columns": { "value": 4.371024413999725E8, "time_weighted_return": 0.023992155163590434 },
        "children": [
          {
            "name": "Equity",
            "grouping": "asset_class",
            "columns": { "value": 2.5993525600627503E8, "time_weighted_return": 0.09047133778274707 },
            "children": []
          },
          {
            "name": "Fixed Income",
            "grouping": "asset_class",
            "columns": { "value": 4.555629874790781E7, "time_weighted_return": 5.433985661802421E-4 },
            "children": []
          }
        ]
      }
    }
  },
  "included": []
}

Response structure:

  • meta.columns confirms which columns were computed, with display names and output types.
  • meta.groupings confirms the grouping hierarchy.
  • data.attributes.total is the root node with portfolio-level totals.
  • children arrays contain grouped breakdowns. Each child has name, grouping (which attribute it groups by), columns (computed values), and its own children (for nested groupings).
  • Entity-backed groupings (like holding_account) include an entity_id field.
  • null column values indicate the calculation is not applicable for that row.

Response codes:

  • 200 OK -- Success
  • 400 Bad Request -- Invalid query, unsupported attribute, or missing permissions for market data attributes
  • 403 Forbidden -- Insufficient permissions or scope

Filter object

Filters narrow results by attribute value before computation.

FieldDescription
attributeAttribute key to filter on. String or object with key. Example: "asset_class" or {"key": "investment_type"}
typeFilter data type. Values: discrete, number.
operatorOperation. Discrete: include, exclude. Number: range, rank.

Discrete filter fields:

FieldDescription
valuesArray of strings to match. Case-sensitive. Example: ["Equity", "Fixed Income"]
unassigned_account_feesInclude/exclude fees not associated with a filtered asset. Default: true for inclusion, false for exclusion.

Number filter fields (range):

FieldDescription
rangesArray of {"from": number, "to": number} pairs.
grouping_attributeNarrow by aggregated position values. Optional.

Number filter fields (rank):

FieldDescription
rank_ordertop or bottom.
rank_valueNumber of results to return.
grouping_attributeOptional.

Filter example:

"filters": [
  {
    "attribute": "asset_class",
    "type": "discrete",
    "operator": "include",
    "values": ["Equity", "Fixed Income"]
  },
  {
    "attribute": {"key": "value"},
    "type": "number",
    "operator": "rank",
    "rank_order": "top",
    "rank_value": 10
  }
]

Date filters are not supported on Portfolio Query.

Column arguments

Columns accept optional arguments that modify the calculation. The most common argument is adjusted (for adjusted value) and time-based arguments that control the observation window.

"columns": [
  { "key": "value", "arguments": { "adjusted": true } },
  { "key": "time_weighted_return", "arguments": { "period": "trailing P5Y" } }
]

See Attributes to discover available attribute keys and their supported arguments.

Time arguments

Time arguments control when or over what period a calculation is observed. There are two categories: time points (a single moment) and time periods (a span).

Time point arguments

Used with point-in-time attributes like value.

FormatDescriptionExample
currentEnd of the query period (default)."time_point": "current"
startingStart of the query period."time_point": "starting"
inceptionPosition inception date."time_point": "inception"
YYYY-MM-DDSpecific date."time_point": "2024-12-31"
P{n}{unit} ago ({rounding})Relative to end date."time_point": "P1Q ago (ceiling)"
P{n}{unit} later ({rounding})Future from end date."time_point": "P2M later (exact)"
P{n}{unit} inception ({rounding})Relative to inception."time_point": "P3Y inception (floor)"

Time period arguments

Used with period attributes like time_weighted_return.

FormatDescriptionExample
currentThe full query period (default)."period": "current"
since inceptionFrom position inception to end date."period": "since inception"
inception to startFrom inception to query start date."period": "inception to start"
trailing P{n}{unit}Window trailing backward from end date."period": "trailing P5Y"
relative P{n}{unit}Relative to today."period": "relative P5Y"
YYYY-MM-DD to YYYY-MM-DDFixed date range."period": "2023-01-01 to 2023-12-31"
{time_point} to {time_point}Custom endpoints."period": "P2M ago (exact) to 2024-06-30"

Interval and rounding values

Intervals: D (days), K (weekdays), W (weeks), M (months), Q (quarters), Y (years).

Rounding: floor (start of period), exact (precise date), ceiling (end of period).

Unsupported attributes

The following attributes cannot be used in Portfolio Query requests:

  • Allocation Deviation
  • Allocation Deviation (%)
  • Benchmark
  • Benchmark (Rollup)
  • Target Allocation
  • Target Allocation Range

📘

Related


Did this page help you?