Skip to main content
The Asset Details screen composes fundamentals, price history charts, user-specific investment metrics, and recent activity for a selected instrument.
You render this screen by fetching four endpoints: product fundamentals, price history for charts, the user’s investment details, and the recent activity feed.

Prerequisites

  • Backend access to the endpoints
  • Bearer token with read:users scope
  • x-user-id header to apply the correct user context

What to fetch

Use GET /investment-products/{isin}/fundamentals to retrieve pricing, trading tags, and the fundamentals set.For ETFs: Holdings, expense ratio, index stats, geography/sector distributions, about section (provider, replication method, tracked index), and news.For Stocks: Company information (CEO, headquarters, employees, website), financial metrics (PE ratio, EPS, market cap, dividend yield, beta), analyst ratings (buy/sell/hold percentages, price targets), and news.
Use GET /investment-products/{isin}/price-history to retrieve historical price data organized by tenor (1w, 1m, 3m, 6m, 1y, max). Each tenor includes timestamped price points, returns percentage, and a flag indicating intraday vs daily granularity.
Use GET /investment-products/{isin}/investment-details to retrieve the user’s current value, allocation, share count, performance, average price per share, and total dividends. The user must hold the asset.
Use GET /investment-products/{isin}/recent-activity?limit=25 to fetch the latest orders, dividends, and rewards related to the asset, sorted by display date descending.

Example: minimal client fetch

const BASE = 'https://api.wealthyhood.com';

async function fetchAssetFundamentals({ token, userId, isin }) {
  const res = await fetch(`${BASE}/investment-products/${isin}/fundamentals`, {
    headers: {
      'Authorization': `Bearer ${token}`,
      'x-user-id': userId,
      'Accept': 'application/json'
    }
  });
  if (!res.ok) throw new Error(`Failed fundamentals: ${res.status}`);
  return res.json();
}

async function fetchPriceHistory({ token, isin }) {
  const res = await fetch(`${BASE}/investment-products/${isin}/price-history`, {
    headers: {
      'Authorization': `Bearer ${token}`,
      'Accept': 'application/json'
    }
  });
  if (!res.ok) throw new Error(`Failed price history: ${res.status}`);
  return res.json();
}

async function fetchUserInvestmentDetails({ token, userId, isin }) {
  const res = await fetch(`${BASE}/investment-products/${isin}/investment-details`, {
    headers: {
      'Authorization': `Bearer ${token}`,
      'x-user-id': userId,
      'Accept': 'application/json'
    }
  });
  if (!res.ok) throw new Error(`Failed investment details: ${res.status}`);
  return res.json();
}

async function fetchRecentActivity({ token, userId, isin, limit = 25 }) {
  const url = new URL(`${BASE}/investment-products/${isin}/recent-activity`);
  if (limit) url.searchParams.set('limit', String(limit));
  const res = await fetch(url.toString(), {
    headers: {
      'Authorization': `Bearer ${token}`,
      'x-user-id': userId,
      'Accept': 'application/json'
    }
  });
  if (!res.ok) throw new Error(`Failed activity: ${res.status}`);
  return res.json();
}
Load fundamentals, price history, user investment details, and recent activity in parallel for faster screen-time-to-first-paint. Ensure you gracefully handle 404 for unknown ISINs and 400 for non-holders when requesting investment details.

See also