Viewing: Stocks

Stocks

Get current stock quotes and prices for individual or multiple companies. See Real-time WebSocket for streaming updates.

GET /quote/{symbol}/

Free

Get current price and trading data for a single stock symbol.

Endpoint

https://api.sahmk.sa/api/v1/quote/2222/?identifier=أرامكو

Parameters

(*) Required

ParameterTypeExample
symbol *string2222
identifier stringأرامكو
data_mode stringdelayed

Use symbol when identifier lookup is ambiguous.
data_mode supports realtime, delayed. If omitted, plan default behavior is used.

Data availability by plan:

  • Free / Starter:Delayed prices (~15 minutes)
  • Pro+:Real-time prices
200 OKapplication/json
{
  "symbol": "2222",
  "name": "أرامكو السعودية",
  "name_en": "Saudi Arabian Oil Co",
  "price": 26.6,
  "change": 0.0,
  "change_percent": 0.0,
  "open": 26.6,
  "high": 26.68,
  "low": 26.52,
  "previous_close": 26.6,
  "volume": 6601208,
  "value": 175637052.96,
  "bid": 26.6,
  "bid_size": 9181,
  "ask": 26.62,
  "ask_size": 38155,
  "liquidity": {
    "inflow_value": 99498351.21,
    "inflow_volume": 3739041,
    "inflow_trades": 4858,
    "outflow_value": 76138701.51,
    "outflow_volume": 2862167,
    "outflow_trades": 3472,
    "net_value": 23359649.699999988
  },
  "updated_at": "2026-08-12T12:20:00+00:00",
  "is_delayed": false,
  "resolved_instrument": {
    "input": "أرامكو",
    "symbol": "2222",
    "name": "أرامكو",
    "match_type": "alias_exact",
    "confidence": "high"
  }
}
View Temporary Price-Data Error
json
{
  "error": {
    "code": "PRICE_DATA_TEMPORARILY_UNAVAILABLE",
    "message": "Price data for '2222' is temporarily unavailable. Please retry shortly."
  }
}

GET /quotes/

Starter+

Get quotes for multiple companies in a single request. Requires Starter plan or higher.

Free tier fallback: GET /quote/{symbol}/ for single-company quotes.

Endpoint

https://api.sahmk.sa/api/v1/quotes/?symbols=2222,1120

Parameters

(*) Required

ParameterTypeExample
symbols *string2222,1120
identifiers stringأرامكو، الراجحي
data_mode stringdelayed

Use either symbols or identifiers, not both.
data_mode supports realtime, delayed. If omitted, plan default behavior is used.

200 OKapplication/json
{
  "quotes": [
    {
      "symbol": "2222",
      "name": "شركة الزيت العربية السعودية",
      "name_en": "Saudi Arabian Oil Co",
      "price": 26.6,
      "change": 0.0,
      "change_percent": 0.0,
      "high": 26.68,
      "low": 26.52,
      "bid": 26.6,
      "ask": 26.62,
      "bid_size": 9181,
      "ask_size": 38155,
      "volume": 6601208,
      "net_liquidity": 23359649.699999988,
      "updated_at": "2026-08-12T13:00:00+00:00",
      "is_delayed": false
    },
    {
      "symbol": "1120",
      "name": "مصرف الراجحي",
      "name_en": "Al Rajhi Banking & Investment Corp SJSC",
      "price": 64.05,
      "change": -0.05,
      "change_percent": -0.08,
      "high": 64.3,
      "low": 63.7,
      "bid": 63.95,
      "ask": 64.05,
      "bid_size": 15,
      "ask_size": 43300,
      "volume": 3775688,
      "net_liquidity": -47806410.94999999,
      "updated_at": "2026-08-12T13:00:00+00:00",
      "is_delayed": false
    }
  ],
  "count": 2,
  "max_symbols": 50,
  "requested_count": 2
}

Batch limits

Requests are limited to 50 symbols. If more are requested, the response also includes truncated: true and a warning explaining that only the first 50 were processed.

Identifier resolution

When identifiers is used, the response also includes a resolution object with requested_count, resolved_count, ambiguous, and not_found.

Need symbols? Use GET /companies/

Quick conventions: use path params for a single resource (for example /quote/{symbol}/) and query params for list filtering (for example /events/?symbol=2222&limit=20). Common HTTP/API errors are centralized in Error Codes.

Last updated on