Skip to content
Dark MatterDark Matter
Guides

Build a Portfolio View

Query positions, filter and compose, aggregate metrics, portfolio construction patterns.

Overview

A portfolio view composes DMTR API queries: positions, filters, views, and aggregate metrics. Use these patterns for dashboards, reporting, and portfolio construction tools.

Query positions

Use GET /positions with query parameters to fetch positions. Apply filters: vehicle_class, status, issuer_id, date ranges. Use pagination to iterate through large result sets. Cache results when appropriate to reduce API calls.

Filter and compose

Combine filters to build focused views: e.g., active SPV LLC positions with cleared KYC, or fund LP positions above a valuation threshold. Compose multiple queries for different segments (by vehicle class, by issuer, by transferability). Merge and deduplicate client-side as needed.

Aggregate metrics

Compute portfolio-level metrics from position data: total AUM, count by vehicle class, exposure by issuer, transferable vs restricted breakdown. Use valuation.current_mark for mark-to-market; handle missing or stale valuations appropriately. Aggregate in your application or via reporting endpoints if available.

const positions = [];
for await (const pos of client.positions.listIter({ status: 'active' })) {
  positions.push(pos);
}

const totalAUM = positions.reduce(
  (sum, p) => sum + (p.valuation?.current_mark ?? 0), 0
);

const byVehicle = Object.groupBy(positions, p => p.asset.vehicle_class);

console.log('Total AUM: $' + totalAUM.toLocaleString());
console.log('Vehicle classes: ' + Object.keys(byVehicle).join(', '));

Portfolio construction patterns

Common patterns: flat list with filters, hierarchical view by issuer/vehicle, summary cards with drill-down, comparison across time periods. Consider real-time updates via webhooks for live dashboards. For large portfolios, use background jobs and incremental sync.

200Success
{
  "data": [
    {
      "entity_id": "meg-2026-047",
      "asset": {
        "vehicle_class": "spv_llc",
        "issuer": "Acme Growth III"
      },
      "valuation": {
        "current_mark": 2500000
      }
    },
    {
      "entity_id": "meg-2026-112",
      "asset": {
        "vehicle_class": "fund_lp",
        "issuer": "Sequoia XVIII"
      },
      "valuation": {
        "current_mark": 1250000
      }
    }
  ],
  "has_more": false
}
Edit this page on GitHub

Last reviewed: June 12, 2026

Was this page helpful?