axprism
Official Python SDK for the AxPrism API — institutional XBRL data, Shariah compliance screening (AAOIFI, MSCI Islamic, DJIM, FTSE, Saudi CMA), SEC/EDGAR, ESEF, EDINET, and the Tadawul / Bursa Malaysia / IDX exchanges.
Installation
Coming soon to PyPI.
pip install axprismwill work once the package is published. For now, install from a local checkout of this repo:
# From the repo root:
pip install ./sdk/python
# …or for development (editable install):
pip install -e ./sdk/python
Requires Python 3.8+ and requests.
Authentication
AxPrism authenticates with the X-API-Key header. Get a key at
axprism.com/keys. A public read-only demo key is
available for trying the API: axmd_demo_try_axprism_2024.
from axprism import AxPrism
client = AxPrism(api_key="axmd_live_...")
Quick Start
from axprism import AxPrism
client = AxPrism(api_key="axmd_demo_try_axprism_2024")
# Shariah compliance screening
result = client.compliance("AAPL", standard="aaoifi")
print(result.verdict) # "halal"
print(result.ratios.debt.ratio) # 0.026
print(result.ratios.debt.passes) # True
# Screen a full portfolio (with purification)
portfolio = client.portfolio([
{"ticker": "AAPL", "weight": 35, "shares": 120, "dividend_per_share": 0.96},
{"ticker": "MSFT", "weight": 25, "shares": 80, "dividend_per_share": 3.32},
])
print(portfolio.summary.halal_weight)
print(portfolio.purification.total_usd)
# Normalized financial statements (values are display strings; use as_number=True for floats)
fin = client.financials("AAPL", statement="IS", period="annual", currency="USD")
print(fin.get_metric("Revenue")) # "$416,161,000,000"
print(f"Revenue: ${fin.get_metric('Revenue', as_number=True):,.0f}")
# Price history
hist = client.prices("AAPL", start="2024-01-01", limit=252)
print(hist.prices[0].close)
Endpoint coverage
The SDK provides typed, ergonomic methods across all key groups. For any of the
API's 165+ operations not given a dedicated method, use the generic
client.request(method, path, params=..., json=...) escape hatch.
| Group | Methods |
|---|---|
| Compliance | compliance, compliance_multi, compliance_trend, compliance_history, compliance_point_in_time, compliance_audit, sukuk, portfolio, screen_compliance, purification, is_halal |
| Financials | financials, ttm, batch_metric, compare, facts, segments, nongaap, restatements, restatement_events, concept_history, concepts_search, screener |
| Profile / symbols | profile, market_cap, symbols, exchanges, company_resolve |
| Market data | prices, estimates, news, insiders, holders_13f, etf_holdings, options_chain, corporate_actions, esg, calendar, fx_rates |
| Disclosures / text | disclosures.search, disclosures.recent, disclosures.facets, text.search, text.stats, text.index |
| International | tadawul.*, bursa.*, idx.* (symbols, profile, financials, sectors, shariah) |
| Filings | filing_index, filing_as_reported, filing_footnote_graph, filing_diff, filing_textblocks |
| Webhooks | webhooks.list, webhooks.events, webhooks.create, webhooks.delete |
| Bulk / export | bulk_financials (CSV), excel_workbook (XLSX bytes) |
| Coverage | coverage_core50, coverage_summary, benchmark_financials_50 |
| Account | me, usage, pricing, rulesets, metrics_catalog, keys.* |
International exchanges
client.tadawul.symbols(limit=10) # Saudi Tadawul registry
client.tadawul.financials("2222") # Saudi Aramco
client.bursa.shariah() # Bursa Malaysia SC list
client.idx.profile("BBCA") # Indonesia Stock Exchange
Disclosure & text search
client.disclosures.search("supply chain risk", ticker="AAPL", forms=["10-K", "10-Q"])
client.disclosures.recent("AAPL", limit=10)
client.text.search("revenue recognition", ticker="MSFT")
Pagination
for hit in client.paginate("/api/v1/disclosures/search",
{"q": "climate", "ticker": "AAPL"},
items_key="results", max_items=200):
print(hit)
Error Handling & Retries
The client retries automatically on 429 (honoring Retry-After) and transient
5xx errors with exponential backoff (configurable via max_retries and
backoff_factor).
from axprism import AxPrism, AuthError, RateLimitError, TierError, NotFoundError
client = AxPrism(api_key="...", max_retries=3, backoff_factor=0.5)
try:
result = client.compliance("AAPL")
except AuthError:
print("Invalid API key (401)")
except TierError as e: # 402 / 403
print(f"Need {e.required_tier}. Upgrade at {e.upgrade_url}")
except RateLimitError as e: # 429
print(f"Quota exceeded: {e.used_today}/{e.daily_limit}")
except NotFoundError: # 404
print("Ticker not found")
Examples & tests
examples/quickstart.py— runnable script using the demo key.tests/test_live.py— read-only live tests (pytest).
Documentation
- API Reference: axprism.com/api-reference
- Pricing: axprism.com/pricing
- Support: support@axprism.com
License
MIT — see LICENSE.
Metadata
Release files for axprism 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| axprism-0.2.0.tar.gz | 18.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| axprism-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.0 kB
Release files / axprism-0.2.0.tar.gz
| Download URL | axprism-0.2.0.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62ee1850a03f9d85f628f7c9ff862f38d7fc61c563c781825fcc9a1970b0b745
|
|
BLAKE2b-256 checksum How to use checksums |
e7fa42576ccffedbbd222d6f97e97a344baaed3c72c018b53aaacd0ca9142708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / axprism-0.2.0-py3-none-any.whl
| Download URL | axprism-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64a17d5d00c1b11ea7bb044c18486e71c8f8391ee3c50533d096e43e3b7ef61d
|
|
BLAKE2b-256 checksum How to use checksums |
c57e2e8235bc2a1c691e3ab8b70afae45a8bf14b483d35f9721525f5a11fec56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for axprism 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.