Overview
halal.sh covers a large but finite universe of instruments, and coverage grows over time. When you request/compliance for an instrument that hasn’t been analysed yet, the API doesn’t fail and it doesn’t queue work on demand — it returns a well-formed payload with determination.status: "pending" and the analysis fields left null.
This guide shows how to detect that state and handle it gracefully.
All 12 sandbox instruments are already analysed, so you won’t see a
pending status while testing against the sandbox key. The handling below
matters once you’re live against the full universe.What a pending response looks like
A pending instrument returnsstatus: "pending" with every analysis field null — screens, revenue, purification, stability, and filing:
Detect pending
Branch ondetermination.status and treat pending as “compliance unknown” rather than an error.
- Node.js
- Python
- React
Pending in a portfolio screen
POST /screen can return compliance_status: "pending" for any symbol that isn’t analysed yet. Partition the results and decide what each bucket means for your UI.
What to show users
How coverage grows
Coverage expands as new instruments are analysed, so a symbol that’spending today may return a full result later. Design for it: cache results you’ve already fetched, re-check pending symbols on a sensible cadence (for example, the next time a user opens that stock), and always render a clear neutral state in the meantime. Never block a screen or treat pending as a hard error.
