etf

Compare Etfs

Compare two to five ETFs side by side.

Returns per-ETF summary data (holdings count, expense ratio, compliance status, compliant/non-compliant weights) and identifies holdings that overlap across multiple ETFs with their respective weights.

curl example:

curl -X POST "http://localhost:8000/api/etf/compare" \
     -H "Content-Type: application/json" \
     -d '{"symbols": ["VTI", "SPY", "SCHB"]}'

Python requests example:

import requests
resp = requests.post(
    "http://localhost:8000/api/etf/compare",
    json={"symbols": ["VTI", "SPY"]},
)
data = resp.json()
print(f"Overlap: {data['overlap_count']} holdings")
post/api/etf/compare

Request

  • Base URL: https://api.halalterminal.com
  • URL: https://api.halalterminal.com/api/etf/compare
  • Auth: API key in header X-API-Key

Request body

symbolsstring[] required

List of 1-6 ETF ticker symbols. One symbol screens a single fund; two or more compare them side by side.

Example request

{
  "symbols": [
    "VTI",
    "SPY",
    "SCHB"
  ]
}

Response

Side-by-side ETF comparison with overlap analysis.

overlap_countinteger

Total number of overlapping holdings.

Example response

{
  "etfs": [
    {
      "compliance_status": "non_compliant",
      "compliant_weight": 78,
      "holdings_count": 3500,
      "name": "Vanguard Total Stock Market ETF",
      "non_compliant_weight": 19,
      "symbol": "VTI"
    },
    {
      "compliance_status": "non_compliant",
      "compliant_weight": 76,
      "holdings_count": 503,
      "name": "SPDR S&P 500 ETF Trust",
      "non_compliant_weight": 21,
      "symbol": "SPY"
    }
  ],
  "overlap_count": 480,
  "overlap_holdings": []
}

Changes

No recorded changes to this operation across all 1 revision of this API.