Overview
The simplest integration: fetch a stock’s compliance result and render a badge. One request toGET /instruments/{symbol}/compliance, one badge in your UI.
Step 1 — Proxy the request through your backend
Your server holds the API key and forwards the call to halal.sh. The browser only ever talks to your own endpoint.Step 2 — Render the badge
Drive the badge offdetermination.status. The three statuses are compliant, non-compliant, and pending.
Step 3 — Show the screen details
For a richer view, surface the three financial screens. Each one reports aresult of "pass" or "fail" — there is no boolean passes field, so check result === "pass".
Ratio
value and threshold are decimals — 0.30 means 30%, so multiply by
100 before display. The three financial screen keys are always
debt_to_market_cap, cash_to_market_cap, and prohibited_revenue.
