dividends

Get Dividend Purification

Calculate dividend purification amounts for a stock.

Applies the company's Shariah purification rate to each historical dividend payment and returns per-dividend purification amounts, the halal portion, and aggregate totals.

Key fields in the response:

  • purification_rate: the company-level rate (e.g. 0.031 = 3.1%)
  • total_dividends: sum of all dividends
  • total_purification: total amount to donate
  • total_halal: total amount that is halal to keep

curl example:

curl -X GET "http://localhost:8000/api/dividends/MSFT/purification"

Python requests example:

import requests
resp = requests.get("http://localhost:8000/api/dividends/MSFT/purification")
data = resp.json()
print(f"Purification rate: {data['purification_rate']:.1%}")
print(f"Total to purify: ${data['total_purification']:.2f}")
get/api/dividends/{symbol}/purification

Request

  • Base URL: https://api.halalterminal.com
  • URL: https://api.halalterminal.com/api/dividends/{symbol}/purification
  • Auth: API key in header X-API-Key

Path parameters

symbolstring required

Ticker symbol, e.g. AAPL.

Response

Dividend purification breakdown with per-payment and total amounts.

symbolstring required

Ticker symbol (e.g. 'MSFT').

purification_ratenumber nullable

Company-level purification rate (e.g. 0.031 = 3.1%).

countinteger required

Total number of dividend payments included.

total_dividendsnumber required

Sum of all dividend amounts in USD.

total_purificationnumber required

Total amount to purify across all dividends in USD.

total_halalnumber required

Total halal amount after purification in USD.

Example response

{
  "count": 4,
  "dividends": [
    {
      "amount": 0.75,
      "date": "2025-03-13",
      "halal_amount": 0.727,
      "purification_amount": 0.023,
      "purification_rate": 0.031
    },
    {
      "amount": 0.75,
      "date": "2025-06-12",
      "halal_amount": 0.727,
      "purification_amount": 0.023,
      "purification_rate": 0.031
    }
  ],
  "purification_rate": 0.031,
  "symbol": "MSFT",
  "total_dividends": 3.08,
  "total_halal": 2.985,
  "total_purification": 0.095
}

Changes

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