Viewing: Analytics

Realtime Event Engine overview →

Analytics

Compare and analyze company ratios with compact analytics endpoints.

GET /analytics/ratios/{symbol}/

Starter+

Financial ratios for one symbol.

Endpoint

https://app.sahmk.sa/api/v1/analytics/ratios/1120/?history=5y&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": "2025-12-31",
      "statement_period": "annual",
      "fiscal_year": 2025,
      "fiscal_quarter": null,
      "ratios": {
        "roe": 9.77,
        "roa": 3.89,
        "net_margin": 19.09,
        "debt_to_equity": 0.6,
        "revenue_growth_yoy": 10.0,
        "net_income_growth_yoy": 16.67
      },
      "key_metrics": {
        "total_revenue": 1100.0,
        "operating_income": 250.0,
        "net_income": 210.0,
        "operating_cash_flow": 280.0,
        "total_assets": 5400.0,
        "stockholders_equity": 2150.0,
        "total_debt": 1300.0
      }
    }
  ],
  "meta": {
    "period": "annual",
    "metrics": "core",
    "warnings": []
  }
}

GET /analytics/compare/

Starter+

Compare ratio snapshots across multiple symbols.

Endpoint

https://app.sahmk.sa/api/v1/analytics/compare/?symbols=1120,1180,1010,2222&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": "الراجحي",
      "market_id": "TASI",
      "sector_name": "Financial Services",
      "sector_name_ar": "الخدمات المالية",
      "sector": "Financial Services",
      "market_cap": 1000001120.0,
      "current_price": 89.4,
      "ratios": {
        "roe": 9.77,
        "roa": 3.89,
        "net_margin": 19.09,
        "debt_to_equity": 0.6,
        "revenue_growth_yoy": 10.0,
        "net_income_growth_yoy": 16.67,
        "asset_turnover": 0.2037,
        "debt_ratio": 0.2407
      },
      "key_metrics": {
        "total_revenue": 1100.0,
        "operating_income": 250.0,
        "net_income": 210.0,
        "operating_cash_flow": 280.0,
        "total_assets": 5400.0,
        "stockholders_equity": 2150.0,
        "total_debt": 1300.0
      }
    }
  ],
  "count": 1,
  "meta": {
    "period": "annual",
    "metrics": "extended",
    "warnings": []
  }
}

Deprecation plan: sector remains temporarily and is planned for removal on 2026-07-01. Use sector_name and sector_name_ar going forward.

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.