> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wealthyhood.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Discover Assets

> How to list investment products using the Investment Products API

The Discover Assets screen presents the complete set of listed instruments available to investors.

<Info>
  You render this screen by combining data from two sources: the Universe Configuration API for static metadata
  (names, descriptions, collections) and the Investment Products API for live trading data (prices, returns,
  trading status).
</Info>

## Data sources

Building a complete discover screen requires two data sources:

<CardGroup cols={2}>
  <Card title="Universe Configuration" icon="database" href="/api-reference/universe-config/get-universe-config">
    Static metadata: asset names, descriptions, collections, asset classes, sectors, and search terms.
  </Card>

  <Card title="Investment Products" icon="chart-line" href="/api-reference/investment-products/investment-products">
    Live data: prices, returns, trading status, and listed state.
  </Card>
</CardGroup>

## Prerequisites

* Backend access to the M2M endpoints
* Bearer token with `read:users` scope
* Your tenant identifier for universe configuration

## What to fetch

<AccordionGroup>
  <Accordion title="Universe configuration (static metadata)">
    Use [Get universe configuration](/api-reference/universe-config/get-universe-config) to retrieve asset metadata and discovery content.

    Returns:

    * Asset names, descriptions, logos
    * Asset classes, sectors, geographies
    * Discovery collections (Big Tech, AI & Robotics, etc.)
    * Top movers, popular assets
    * Search terms for each asset
  </Accordion>

  <Accordion title="Investment products (live trading data)">
    Use [Investment products](/api-reference/investment-products/investment-products) to retrieve all listed instruments with live pricing.

    Returns:

    * Listed status
    * Current prices and returns
    * Trading currency
  </Accordion>
</AccordionGroup>

## Example: fetch and combine data

<CodeGroup>
  ```javascript Node.js theme={null}
  const CONFIG_BASE = "https://{TENANT}-staging.wealthyhood.workers.dev";
  const API_BASE = "https://api.wealthyhood.com";

  async function getDiscoverScreenData({ token, userId }) {
    // Fetch both data sources in parallel
    const [universeConfig, investmentProducts] = await Promise.all([
      fetch(`${CONFIG_BASE}/b2b/app-config`).then((res) => res.json()),
      fetch(`${API_BASE}/investment-products`, {
        headers: {
          Authorization: `Bearer ${token}`,
          "x-user-id": userId,
          Accept: "application/json"
        }
      }).then((res) => res.json())
    ]);

    // Create lookup for live data
    const productMap = new Map(investmentProducts.map((p) => [p.commonId, p]));

    // Combine static + live data
    const assets = Object.entries(universeConfig.investmentUniverse.assets)
      .map(([key, config]) => {
        const live = productMap.get(key);
        return {
          key,
          isin: config.isin,
          name: config.simpleName,
          description: config.shortDescription,
          logoUrl: config.logoUrl,
          assetClass: config.assetClass,
          sector: config.sector,
          listed: live?.listed ?? false,
          currentPrice: live?.tradedPrice,
          dailyReturn: live?.currentTicker?.dailyReturnPercentage
        };
      })
      .filter((a) => a.listed);

    return { assets, discovery: universeConfig.discovery };
  }
  ```

  ```bash cURL theme={null}
  # Fetch universe config (no auth required)
  curl -X GET "https://{TENANT}-staging.wealthyhood.workers.dev/b2b/app-config" \
    -H "Accept: application/json"

  # Fetch investment products (auth required)
  curl -X GET "https://api.wealthyhood.com/investment-products" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "x-user-id: 64f0c51e7fb3fc001234abcd"
  ```
</CodeGroup>

## Building discovery sections

Use the `discovery` object from universe configuration to build curated sections:

```javascript theme={null}
function buildDiscoverySections(discovery, assetMap) {
  return {
    // Top movers section
    topMovers: {
      best: discovery.topMovers.best.map((m) => assetMap.get(m.asset)),
      worst: discovery.topMovers.worst.map((m) => assetMap.get(m.asset))
    },

    // Popular assets
    popular: discovery.popularAssetsSection.map((key) => assetMap.get(key)),

    // Collections (Big Tech, AI & Robotics, etc.)
    collections: Object.entries(discovery.collections)
      .map(([key, c]) => ({
        label: c.label,
        emoji: c.emoji,
        assets: c.assets.map((k) => assetMap.get(k))
      }))
      .filter((c) => c.assets.length > 0)
  };
}
```

## See also

* [Flows → Investment Universe](/flows/investment-universe) - Complete integration guide
* [API Reference → Universe Configuration](/api-reference/universe-config/get-universe-config)
* [API Reference → Investment Products](/api-reference/investment-products/investment-products)
