axprism (R)

Official R client for the AxPrism API — institutional XBRL data and Shariah compliance screening (AAOIFI, MSCI Islamic, DJIM, FTSE, Saudi CMA), SEC/EDGAR, ESEF, and the Tadawul / Bursa Malaysia / IDX exchanges.

Installation

From CRAN (once published):

install.packages("axprism")

From source:

# install.packages("remotes")
remotes::install_local("sdk/r")

Depends on httr and jsonlite.

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 testing: axmd_demo_try_axprism_2024. The client reads the AXPRISM_API_KEY environment variable by default.

library(axprism)
client <- axprism_client(api_key = "axmd_demo_try_axprism_2024")

Quick start

library(axprism)

client <- axprism_client(api_key = Sys.getenv("AXPRISM_API_KEY"))

# Shariah compliance verdict
comp <- axprism_compliance(client, "AAPL", standard = "aaoifi")
comp$verdict                 # "halal"

# Normalized financial statements
fin <- axprism_financials(client, "AAPL", statement = "IS", period = "annual", currency = "USD")

# Company profile
prof <- axprism_profile(client, "AAPL")

# International exchanges
axprism_tadawul_symbols(client, limit = 10)
axprism_bursa_shariah(client)
axprism_idx_financials(client, "BBCA")

# Disclosure / text search
axprism_disclosures_search(client, "supply chain risk", ticker = "AAPL", forms = c("10-K", "10-Q"))
axprism_text_search(client, "revenue recognition", ticker = "MSFT")

# Portfolio screening
axprism_portfolio(client, items = list(
  list(ticker = "AAPL", weight = 35, shares = 120, dividend_per_share = 0.96),
  list(ticker = "MSFT", weight = 25, shares = 80)
))

Endpoint coverage

Convenience functions cover compliance, financials, profile/symbols, screener, market data, disclosures/text search, the Tadawul/Bursa/IDX exchanges, webhooks and bulk export. For any other endpoint, use the generic escape hatch:

axprism_request(client, "GET", "/api/v1/coverage/summary")

Error handling & retries

Non-2xx responses raise an R error with the HTTP status and server message. The client automatically retries on 429 (honoring Retry-After) and transient 5xx errors with exponential backoff (configurable via max_retries and backoff_s in axprism_client()).

Documentation

License

Released under the MIT License (see the LICENSE file in the package).