Viewing: Analytics

Analytics

Compare and analyze company ratios with compact analytics endpoints.

GET /analytics/ratios/{symbol}/

Starter+

Financial ratios for one symbol.

Endpoint

https://api.sahmk.sa/api/v1/analytics/ratios/1120/?history=latest&period=quarterly&metrics=extended

Parameters

(*) Required

ParameterTypeExample
symbol *string1120
history string5y
period stringquarterly
metrics stringextended
meta stringextended

history: latest, 3y, 5y, 10y, max (default latest). period: annual, quarterly (default annual). metrics: core, extended (default core). meta: minimal (default) or extended.

Data Available by Plan:

  • Free:No analytics access
  • Starter:Latest + annual + core only
  • Pro/Business:All ratios options (history, period, metrics)
  • Enterprise:Custom ratios feature set and access profile by agreement
200 OKapplication/json
{
  "symbol": "1120",
  "ratios": [
    {
      "report_date": "2026-06-30",
      "statement_period": "quarterly",
      "fiscal_year": 2026,
      "fiscal_quarter": 2,
      "ratios": {
        "roe": 4.6,
        "roa": 0.66,
        "net_margin": 64.42,
        "revenue_growth_yoy": 13.35,
        "net_income_growth_yoy": 14.0,
        "asset_turnover": 0.0103
      },
      "key_metrics": {
        "total_revenue": 10884480000.0,
        "net_income": 7012137000.0,
        "operating_cash_flow": 10379536000.0,
        "total_assets": 1054772497000.0,
        "stockholders_equity": 152416762000.0
      }
    }
  ],
  "meta": {
    "period": "quarterly",
    "metrics": "extended",
    "warnings": [
      "Some metrics unavailable"
    ]
  }
}

GET /analytics/compare/

Starter+

Compare ratio snapshots across multiple symbols.

Endpoint

https://api.sahmk.sa/api/v1/analytics/compare/?symbols=1120&metrics=extended

Parameters

(*) Required

ParameterTypeExample
symbols *string1120,1180,1010,2222
metrics stringextended
meta stringextended

symbols is required as comma-separated values (example 1120,1180,1010). metrics: core or extended (default core). meta: minimal (default) or extended.

Data Available by Plan:

  • Starter:Up to 3 symbols + core metrics only
  • Pro:Up to 10 symbols + core/extended metrics
  • Business:Up to 20 symbols + core/extended metrics
  • Enterprise:Custom symbol limits and compare feature profile by agreement
200 OKapplication/json
{
  "results": [
    {
      "symbol": "1120",
      "company_name": "مصرف الراجحي",
      "sector_name": "Banks",
      "sector_name_ar": "البنوك",
      "market_id": "TASI",
      "market_cap": 384600000000.0,
      "current_price": 64.05,
      "ratios": {
        "roe": 9.48,
        "roa": 1.37,
        "net_margin": 67.49,
        "asset_turnover": 0.0203
      },
      "key_metrics": {
        "total_revenue": 21412480000.0,
        "net_income": 14452137000.0,
        "total_assets": 1054772497000.0,
        "stockholders_equity": 152416762000.0
      }
    }
  ],
  "count": 1,
  "meta": {
    "period": "annual",
    "metrics": "extended",
    "warnings": [
      "Some metrics unavailable"
    ]
  }
}

Integration tips

  • Default metadata is minimal: meta.period, meta.metrics, meta.warnings.
  • Use meta=extended for extra fields (ratios: coverage, periods_available, quality, partial_context; compare rows: coverage).
  • Ratio keys are dynamic, so render ratio objects dynamically.

Last updated on