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
Example request
{
"symbols": [
"VTI",
"SPY",
"SCHB"
]
}Response
Side-by-side ETF comparison with overlap analysis.
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.