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

# Index funds

> Index-fund constituents and look-through holdings.

Index-fund endpoints expose fund composition: the constituents of a fund, or, looking the other way, which funds hold a given security.

## Index funds

```http theme={null}
GET /index-funds
```

Query by `ticker` (the fund's holdings) **or** by `holding` (funds that hold a security), not both.

| Parameter     | Type    | Required | Default | Description                                  |
| ------------- | ------- | -------- | ------- | -------------------------------------------- |
| `scenario_id` | string  | Yes      | -       | The world to read from.                      |
| `ticker`      | string  | No       | -       | A fund symbol; returns its holdings.         |
| `holding`     | string  | No       | -       | A security symbol; returns funds holding it. |
| `as_of`       | date    | No       | latest  | Snapshot date.                               |
| `limit`       | integer | No       | 50      | Page size (max 1000).                        |
| `offset`      | integer | No       | 0       | Pagination offset.                           |

<Warning>
  Provide `ticker` **or** `holding`, not both; passing both returns `400`.
</Warning>

<CodeGroup>
  ```bash cURL theme={null}
  # Holdings of an index fund
  curl -s "https://api.davidhf.com/index-funds?scenario_id=<id>&ticker=SPY" \
    -H "X-API-KEY: YOUR_API_KEY"

  # Funds that hold a security
  curl -s "https://api.davidhf.com/index-funds?scenario_id=<id>&holding=AAPL" \
    -H "X-API-KEY: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  dd.index_funds.list(scenario_id="<id>", ticker="SPY")
  dd.index_funds.list(scenario_id="<id>", holding="AAPL")
  ```
</CodeGroup>

## Discovery helper

```http theme={null}
GET /index-funds/tickers
```

Returns the available index-fund tickers. Takes no parameters.

<CodeGroup>
  ```bash cURL theme={null}
  curl -s "https://api.davidhf.com/index-funds/tickers" \
    -H "X-API-KEY: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  dd.index_funds.tickers()
  ```
</CodeGroup>

```json theme={null}
{ "tickers": ["SPY", "QQQ", "IWM", "DIA", "..."] }
```

<Info>
  Index funds are non-operating instruments: they serve prices, fund-flow news, holdings, and metadata, but no issuer financials. For `SPY`, the ETF share price is reported separately from the S\&P 500 benchmark level. See [Ticker universe](/concepts/ticker-universe).
</Info>
