Package {axprism}


Type: Package
Title: Client for the 'AxPrism' Institutional XBRL and Shariah Compliance API
Version: 0.2.0
Description: Provides an R client for the 'AxPrism' Application Programming Interface (API) (https://axprism.com), which serves institutional financial data in the eXtensible Business Reporting Language (XBRL) format together with Shariah compliance screening. Supported compliance rulesets include those of the Accounting and Auditing Organization for Islamic Financial Institutions (AAOIFI), the Morgan Stanley Capital International (MSCI) Islamic methodology, the Dow Jones Islamic Market (DJIM), the Financial Times Stock Exchange (FTSE) and the Saudi Capital Market Authority (CMA). Convenience functions wrap company fundamentals, compliance verdicts and portfolio screening, company profiles, equity screeners, regulatory disclosures and filing text search, and the Tadawul (Saudi Exchange), Bursa Malaysia and Indonesia Stock Exchange (IDX) markets, as well as webhooks and bulk data export. Requests use 'X-API-Key' header authentication, automatic retries with exponential backoff, and a generic request helper that covers all endpoints.
License: MIT + file LICENSE
Encoding: UTF-8
URL: https://axprism.com, https://axprism.com/api-reference
BugReports: https://axprism.com/contact
Imports: httr, jsonlite
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-06-26 01:30:20 UTC; code
Author: Marco Corleone [aut, cre]
Maintainer: Marco Corleone <dev@axprism.com>
Repository: CRAN
Date/Publication: 2026-07-01 09:20:02 UTC

AxPrism API client for R

Description

Official R client for the AxPrism Institutional XBRL Platform (https://axprism.com). Authenticates with the X-API-Key header, retries with exponential backoff on rate limits (429) and transient 5xx errors, and exposes typed convenience functions plus a generic axprism_request escape hatch covering every endpoint.

Details

A public, read-only demo key is available for testing: axmd_demo_try_axprism_2024.

Author(s)

Maintainer: Marco Corleone dev@axprism.com

Authors:

See Also

Useful links:


One metric across multiple tickers (max 20)

Description

One metric across multiple tickers (max 20)

Usage

axprism_batch_metric(
  client,
  tickers,
  metric,
  period = "annual",
  currency = "USD",
  years = 5
)

Arguments

client

An axprism_client.

tickers

Character vector of tickers.

metric

Metric key, e.g. "ax:Revenue".

period

"annual" or "quarterly".

currency

Reporting currency (default "USD").

years

Number of years (default 5).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_batch_metric(client, c("AAPL", "MSFT"), "ax:Revenue")

## End(Not run)

Bulk financials as a CSV string

Description

Bulk financials as a CSV string

Usage

axprism_bulk_financials(client, ticker, statement = "IS", period = "annual")

Arguments

client

An axprism_client.

ticker

Ticker symbol.

statement

"IS", "BS", or "CF".

period

"annual" or "quarterly".

Value

A character scalar containing CSV text.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_bulk_financials(client, "AAPL")

## End(Not run)

Bursa Malaysia Shariah-compliant list

Description

Bursa Malaysia Shariah-compliant list

Usage

axprism_bursa_shariah(client)

Arguments

client

An axprism_client.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_bursa_shariah(client)

## End(Not run)

Bursa Malaysia symbols

Description

Bursa Malaysia symbols

Usage

axprism_bursa_symbols(client, limit = 200)

Arguments

client

An axprism_client.

limit

Max symbols (default 200).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_bursa_symbols(client)

## End(Not run)

Earnings / events calendar for a ticker

Description

Earnings / events calendar for a ticker

Usage

axprism_calendar(client, ticker)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_calendar(client, "AAPL")

## End(Not run)

Create an AxPrism API client

Description

Create an AxPrism API client

Usage

axprism_client(
  api_key = NULL,
  base_url = "https://axprism.com",
  timeout_s = 30,
  max_retries = 3,
  backoff_s = 0.5
)

Arguments

api_key

Your AxPrism API key (axmd_live_...). Defaults to the AXPRISM_API_KEY environment variable.

base_url

API base URL. Defaults to https://axprism.com.

timeout_s

Request timeout in seconds (default 30).

max_retries

Max retries on 429 / 5xx (default 3).

backoff_s

Base seconds for exponential backoff (default 0.5).

Value

An object of class axprism_client.

Examples

# Constructing a client is offline and requires no network access.
client <- axprism_client(api_key = "demo-key")
inherits(client, "axprism_client")
client$base_url

# Trailing slashes in the base URL are normalized away.
axprism_client(api_key = "k", base_url = "https://axprism.com/")$base_url

## Not run: 
# A live call additionally needs a real API key and network access.
client <- axprism_client(api_key = "axmd_demo_try_axprism_2024")
axprism_compliance(client, "AAPL")

## End(Not run)

Compare a metric across companies over time

Description

Compare a metric across companies over time

Usage

axprism_compare(
  client,
  tickers,
  metric = "ax:Revenue",
  period = "annual",
  limit_periods = 8,
  currency = "USD"
)

Arguments

client

An axprism_client.

tickers

Character vector of tickers.

metric

Metric key (default "ax:Revenue").

period

"annual" or "quarterly".

limit_periods

Number of periods (default 8).

currency

Reporting currency (default "USD").

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_compare(client, c("AAPL", "MSFT"))

## End(Not run)

Shariah compliance verdict for one ticker

Description

Shariah compliance verdict for one ticker

Usage

axprism_compliance(
  client,
  ticker,
  standard = "aaoifi",
  period = "annual",
  as_of = NULL
)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

standard

"aaoifi", "msci", "dji", "ftse", or "saudi".

period

"annual" or "quarterly".

as_of

Optional ISO date for point-in-time context.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_compliance(client, "AAPL")

## End(Not run)

Run all supported Shariah standards at once

Description

Run all supported Shariah standards at once

Usage

axprism_compliance_multi(client, ticker, period = "annual")

Arguments

client

An axprism_client.

ticker

Ticker symbol.

period

"annual" or "quarterly".

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_compliance_multi(client, "AAPL")

## End(Not run)

Historical point-in-time compliance verdict

Description

Historical point-in-time compliance verdict

Usage

axprism_compliance_point_in_time(client, ticker, as_of, standard = "aaoifi")

Arguments

client

An axprism_client.

ticker

Ticker symbol.

as_of

ISO date ("YYYY-MM-DD").

standard

Compliance standard (default "aaoifi").

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_compliance_point_in_time(client, "AAPL", as_of = "2023-12-31")

## End(Not run)

Compliance ratio trend over N periods

Description

Compliance ratio trend over N periods

Usage

axprism_compliance_trend(client, ticker, periods = 8)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

periods

Number of periods (default 8).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_compliance_trend(client, "AAPL")

## End(Not run)

Historical values for a single XBRL concept

Description

Historical values for a single XBRL concept

Usage

axprism_concept_history(client, ticker, concept, limit = 20)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

concept

XBRL concept tag.

limit

Max periods (default 20).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_concept_history(client, "AAPL", "Revenues")

## End(Not run)

Recent filings for a ticker

Description

Recent filings for a ticker

Usage

axprism_disclosures_recent(client, ticker, limit = 20)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

limit

Max filings (default 20).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_disclosures_recent(client, "AAPL")

## End(Not run)

Description

Full-text search across disclosures (SEC EDGAR, ESEF, etc.)

Usage

axprism_disclosures_search(client, q, ticker = NULL, forms = NULL, limit = 20)

Arguments

client

An axprism_client.

q

Query string.

ticker

Optional ticker filter.

forms

Optional character vector of form types.

limit

Max hits (default 20).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_disclosures_search(client, "revenue recognition")

## End(Not run)

Analyst consensus, price targets, earnings, and dividends

Description

Analyst consensus, price targets, earnings, and dividends

Usage

axprism_estimates(client, ticker)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_estimates(client, "AAPL")

## End(Not run)

List supported exchanges

Description

List supported exchanges

Usage

axprism_exchanges(client)

Arguments

client

An axprism_client.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_exchanges(client)

## End(Not run)

Raw XBRL facts for a company

Description

Raw XBRL facts for a company

Usage

axprism_facts(client, ticker, concept = NULL, limit = 500)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

concept

Optional XBRL concept filter.

limit

Max facts (default 500).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_facts(client, "AAPL")

## End(Not run)

Normalized financial statements (IS / BS / CF / ALL)

Description

Normalized financial statements (IS / BS / CF / ALL)

Usage

axprism_financials(
  client,
  ticker,
  statement = "IS",
  period = "annual",
  currency = "NATIVE",
  history = "latest",
  as_reported = FALSE
)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

statement

"IS", "BS", "CF", or "ALL".

period

"annual", "quarterly", or "ttm".

currency

"NATIVE", "USD", or any ISO 4217 code.

history

"latest" or "all".

as_reported

Return raw un-normalized XBRL when TRUE.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_financials(client, "AAPL", statement = "IS")

## End(Not run)

FX rates relative to a base currency

Description

FX rates relative to a base currency

Usage

axprism_fx_rates(client, base = "USD", symbols = NULL)

Arguments

client

An axprism_client.

base

Base currency (default "USD").

symbols

Optional character vector of target currencies.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_fx_rates(client, "USD", c("EUR", "GBP"))

## End(Not run)

Public health check

Description

Public health check

Usage

axprism_health(client)

Arguments

client

An axprism_client.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_health(client)

## End(Not run)

Institutional 13-F holders by CIK

Description

Institutional 13-F holders by CIK

Usage

axprism_holders_13f(client, cik, limit = 1)

Arguments

client

An axprism_client.

cik

Central Index Key.

limit

Max records (default 1).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_holders_13f(client, "0000320193")

## End(Not run)

IDX company financials

Description

IDX company financials

Usage

axprism_idx_financials(client, symbol, period = "annual")

Arguments

client

An axprism_client.

symbol

IDX symbol.

period

"annual" or "quarterly".

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_idx_financials(client, "BBCA")

## End(Not run)

Indonesia Stock Exchange (IDX) symbols

Description

Indonesia Stock Exchange (IDX) symbols

Usage

axprism_idx_symbols(client, limit = 200)

Arguments

client

An axprism_client.

limit

Max symbols (default 200).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_idx_symbols(client)

## End(Not run)

Insider (Form 3/4/5) transactions

Description

Insider (Form 3/4/5) transactions

Usage

axprism_insiders(client, ticker, limit = 25)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

limit

Max records (default 25).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_insiders(client, "AAPL")

## End(Not run)

Rolling-average market capitalization (USD)

Description

Rolling-average market capitalization (USD)

Usage

axprism_market_cap(client, ticker, months = 36)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

months

Averaging window in months (default 36).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_market_cap(client, "AAPL")

## End(Not run)

Account info for the current API key

Description

Account info for the current API key

Usage

axprism_me(client)

Arguments

client

An axprism_client.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_me(client)

## End(Not run)

Recent news for a ticker

Description

Recent news for a ticker

Usage

axprism_news(client, ticker, limit = 25)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

limit

Max items (default 25).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_news(client, "AAPL")

## End(Not run)

Screen a full portfolio for Shariah compliance and purification

Description

Screen a full portfolio for Shariah compliance and purification

Usage

axprism_portfolio(
  client,
  items,
  ruleset = "aaoifi",
  period = "annual",
  include_purification = TRUE
)

Arguments

client

An axprism_client.

items

List of holdings (each a list with ticker, optional weight, shares, dividend_per_share).

ruleset

Compliance ruleset (default "aaoifi").

period

"annual" or "quarterly".

include_purification

Compute purification when TRUE.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_portfolio(client, list(list(ticker = "AAPL", shares = 100)))

## End(Not run)

OHLCV price history

Description

OHLCV price history

Usage

axprism_prices(client, ticker, start = NULL, end = NULL, limit = 252)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

start

Optional start date (ISO).

end

Optional end date (ISO).

limit

Max bars (default 252).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_prices(client, "AAPL")

## End(Not run)

Subscription pricing and entitlements

Description

Subscription pricing and entitlements

Usage

axprism_pricing(client)

Arguments

client

An axprism_client.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_pricing(client)

## End(Not run)

Company profile, CIK, SIC, exchange, and Shariah activity screen

Description

Company profile, CIK, SIC, exchange, and Shariah activity screen

Usage

axprism_profile(client, ticker)

Arguments

client

An axprism_client.

ticker

Ticker symbol, e.g. "AAPL".

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_profile(client, "AAPL")

## End(Not run)

Purification amount for a single holding (USD)

Description

Purification amount for a single holding (USD)

Usage

axprism_purification(client, ticker, shares_held, dividend_per_share = NULL)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

shares_held

Number of shares held.

dividend_per_share

Optional dividend per share (USD).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_purification(client, "AAPL", shares_held = 100)

## End(Not run)

Make a raw request against the AxPrism API

Description

Generic escape hatch for any of the API's 165+ endpoints. Returns parsed JSON (a list). Honors retries/backoff and raises informative errors.

Usage

axprism_request(client, method, path, query = list(), body = NULL)

Arguments

client

An axprism_client.

method

HTTP method: "GET", "POST", or "DELETE".

path

Endpoint path beginning with /api/v1/....

query

Named list of query parameters (NULLs dropped).

body

Named list sent as a JSON request body (for POST).

Value

Parsed response (named list).

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
# Requires network access and a valid API key.
axprism_request(client, "GET", "/api/v1/health")

## End(Not run)

List supported Shariah compliance rulesets

Description

List supported Shariah compliance rulesets

Usage

axprism_rulesets(client)

Arguments

client

An axprism_client.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_rulesets(client)

## End(Not run)

Screen tickers by compliance and fundamentals (max 50)

Description

Screen tickers by compliance and fundamentals (max 50)

Usage

axprism_screener(
  client,
  tickers,
  verdict = NULL,
  ruleset = "aaoifi",
  period = "annual",
  debt_ratio_max = NULL,
  income_ratio_max = NULL,
  market_cap_min = NULL,
  market_cap_max = NULL,
  limit = 50
)

Arguments

client

An axprism_client.

tickers

Character vector of tickers.

verdict

Optional verdict filter ("halal"/"haram"/"inconclusive").

ruleset

Compliance ruleset (default "aaoifi").

period

"annual" or "quarterly".

debt_ratio_max

Optional max debt ratio.

income_ratio_max

Optional max non-permissible income ratio.

market_cap_min

Optional minimum market cap (USD).

market_cap_max

Optional maximum market cap (USD).

limit

Max results (default 50).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_screener(client, c("AAPL", "MSFT"))

## End(Not run)

Reported business / geographic segments

Description

Reported business / geographic segments

Usage

axprism_segments(client, ticker, limit = 1)

Arguments

client

An axprism_client.

ticker

Ticker symbol.

limit

Max filings (default 1).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_segments(client, "AAPL")

## End(Not run)

Symbol search / suggestions

Description

Symbol search / suggestions

Usage

axprism_symbols(client, query = "", limit = 20)

Arguments

client

An axprism_client.

query

Search string.

limit

Max results (default 20).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_symbols(client, "apple")

## End(Not run)

Tadawul company financials

Description

Tadawul company financials

Usage

axprism_tadawul_financials(client, symbol, period = "annual")

Arguments

client

An axprism_client.

symbol

Tadawul symbol (e.g. "2222").

period

"annual" or "quarterly".

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_tadawul_financials(client, "2222")

## End(Not run)

Tadawul (Saudi) symbols

Description

Tadawul (Saudi) symbols

Usage

axprism_tadawul_symbols(client, sector = NULL, limit = 200)

Arguments

client

An axprism_client.

sector

Optional sector filter.

limit

Max symbols (default 200).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_tadawul_symbols(client)

## End(Not run)

Description

Search indexed filing text blocks

Usage

axprism_text_search(client, q, ticker = NULL, form = NULL, limit = 20)

Arguments

client

An axprism_client.

q

Query string.

ticker

Optional ticker filter.

form

Optional form-type filter.

limit

Max hits (default 20).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_text_search(client, "climate risk")

## End(Not run)

Trailing twelve months income statement

Description

Trailing twelve months income statement

Usage

axprism_ttm(client, ticker, currency = "NATIVE")

Arguments

client

An axprism_client.

ticker

Ticker symbol.

currency

Reporting currency (default "NATIVE").

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_ttm(client, "AAPL")

## End(Not run)

Request usage analytics

Description

Request usage analytics

Usage

axprism_usage(client, days = 30)

Arguments

client

An axprism_client.

days

Look-back window in days (default 30).

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_usage(client, days = 30)

## End(Not run)

Create a webhook subscription

Description

Create a webhook subscription

Usage

axprism_webhooks_create(client, url, event, ticker_filter = NULL)

Arguments

client

An axprism_client.

url

Callback URL.

event

Event type (see axprism_webhooks_events).

ticker_filter

Optional ticker filter.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_webhooks_create(client, "https://example.com/hook", "filing.created")

## End(Not run)

Delete a webhook subscription

Description

Delete a webhook subscription

Usage

axprism_webhooks_delete(client, sub_id)

Arguments

client

An axprism_client.

sub_id

Subscription id.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_webhooks_delete(client, "sub_123")

## End(Not run)

List available webhook event types

Description

List available webhook event types

Usage

axprism_webhooks_events(client)

Arguments

client

An axprism_client.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_webhooks_events(client)

## End(Not run)

List webhook subscriptions

Description

List webhook subscriptions

Usage

axprism_webhooks_list(client)

Arguments

client

An axprism_client.

Value

Parsed API response as a named list.

Examples

client <- axprism_client(api_key = "demo-key")
## Not run: 
axprism_webhooks_list(client)

## End(Not run)