reports

Get Portfolio Report

Generate a Shariah compliance report for a portfolio of stocks.

Accepts a list of ticker symbols and returns an aggregated report with per-holding compliance results, overall compliance percentage, and summary counts. Useful for screening an entire portfolio at once.

curl example:

curl -X POST "http://localhost:8000/api/reports/portfolio" \
     -H "Content-Type: application/json" \
     -d '{"symbols": ["AAPL", "MSFT", "AMZN"]}'

Python requests example:

import requests

resp = requests.post(
    "http://localhost:8000/api/reports/portfolio",
    json={"symbols": ["AAPL", "MSFT", "AMZN"]},
)
report = resp.json()
print(f"Compliance: {report['compliance_percentage']}%")
print(f"Compliant: {report['compliant']}/{report['total']}")
post/api/reports/portfolio

Request

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

Request body

symbolsstring[] required

List of ticker symbols to include in the portfolio report

Example request

{
  "symbols": [
    "AAPL",
    "MSFT",
    "AMZN"
  ]
}

Response

Aggregated Shariah compliance report for the portfolio

report_generated_atstring required

ISO 8601 timestamp when the report was generated

totalinteger required

Total number of holdings analyzed

compliantinteger required

Number of holdings that passed Shariah compliance screening

non_compliantinteger required

Number of holdings that failed Shariah compliance screening

errorsinteger required

Number of holdings where screening could not be completed

compliance_percentagenumber nullable

Percentage of successfully screened holdings that are compliant

Example response

{
  "compliance_percentage": 66.67,
  "compliant": 2,
  "errors": 0,
  "holdings": [
    {
      "is_compliant": true,
      "screening": {
        "methodology": "aaoifi"
      },
      "symbol": "AAPL"
    },
    {
      "is_compliant": true,
      "screening": {
        "methodology": "aaoifi"
      },
      "symbol": "MSFT"
    },
    {
      "is_compliant": false,
      "screening": {
        "methodology": "aaoifi"
      },
      "symbol": "AMZN"
    }
  ],
  "non_compliant": 1,
  "report_generated_at": "2026-03-24T12:00:00Z",
  "total": 3
}

Changes

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