# ETF Holdings

`GET` `/v1/etf-holdings/{ticker}`

Retrieve constituent holdings and weight percentages for an ETF or mutual fund ticker. Each holding includes the underlying asset ticker, name and portfolio weight so you can analyze concentration, replicate baskets or explain what a fund owns. Use ETF and fund tickers only (e.g. SPY, QQQ); for common stocks this endpoint returns no holdings.

## Use cases

- Analyzing ETF exposure and top holdings (e.g. SPY constituents)
- Portfolio overlap and concentration checks
- Fund comparison and due diligence
- Feeding constituent lists into quote or risk systems

## Input parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ticker` | string | Yes | ETF or fund ticker, e.g. SPY. |

## Output parameters

| Name | Type | Description |
| --- | --- | --- |
| `ticker` | string | ETF or fund ticker requested. |
| `holdings` | array | Indexed constituent positions. |
| `holdings[].asset` | string | Underlying asset ticker. |
| `holdings[].name` | string | Underlying asset name. |
| `holdings[].weightPercentage` | float | Portfolio weight percent. |
| `holdings[].sharesNumber` | integer | Shares held when available. |
| `holdings[].marketValue` | float | Reported market value in USD when available. |
| `holdingsCount` | integer | Total constituents reported by the fund. |
| `syncedAt` | string | Holdings sync timestamp (ISO 8601). |
| `valuesSyncedAt` | string | Market-value enrichment timestamp (ISO 8601). |

## Example response

```json
{
  "ticker": "SPY",
  "holdings": [
    {
      "hasCompanyProfile": true,
      "computedValueUsd": 63618134101.14,
      "holdingValueSyncedAt": "2026-06-03T16:00:07Z",
      "securityCusip": "67066G104",
      "name": "NVIDIA CORP",
      "weightPercentage": 8.39,
      "sharesNumber": 293144107,
      "marketValue": 63920382154,
      "asset": "NVDA",
      "isin": "US67066G1040",
      "updatedAt": "2026-05-13 02:05:01",
      "lastPrice": 217.02
    },
    {
      "hasCompanyProfile": true,
      "computedValueUsd": 55172012522.88,
      "holdingValueSyncedAt": "2026-06-03T16:00:07Z",
      "securityCusip": "037833100",
      "name": "APPLE INC",
      "weightPercentage": 6.76,
      "sharesNumber": 177105844,
      "marketValue": 51507242219,
      "asset": "AAPL",
      "isin": "US0378331005",
      "updatedAt": "2026-05-13 02:05:01",
      "lastPrice": 311.52
    }
  ],
  "valuesSyncedAt": "2026-06-03T16:00:07Z",
  "syncedAt": "2026-06-05T22:02:50-04:00",
  "holdingsCount": 504
}
```

## Examples

### cURL

```bash
curl "https://api.vantafin.com/v1/etf-holdings/SPY?apiKey=$VANTAFIN_API_KEY"
```

### Python

```python
from vantafin import RESTClient

client = RESTClient("vf-live-your_api_key")

result = client.get_etf_holdings("SPY")

print(result)
```

### JavaScript

```javascript
import { RestClient } from "vantafin";

const client = new RestClient("vf-live-your_api_key");

const result = await client.getEtfHoldings("SPY");

console.log(result);
```

### Go

```go
package main

import (
	"fmt"
	"log"

	"github.com/vantafin/vantafin-go"
)

func main() {
	client := vantafin.NewClient("vf-live-your_api_key")

	result, err := client.GetEtfHoldings("SPY")
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(result)
}
```

### Java

```java
import com.vantafin.RestClient;

public class Example {
    public static void main(String[] args) throws Exception {
        RestClient client = new RestClient("vf-live-your_api_key");

        Object result = client.getEtfHoldings("SPY");

        System.out.println(result);
    }
}
```

### Ruby

```ruby
require "vantafin"

client = Vantafin::RestClient.new("vf-live-your_api_key")

result = client.get_etf_holdings("SPY")

pp result
```
