Viewing: Trades

Trades

Get recent trades for a symbol. For streaming updates, see Real-time WebSocket.

GET /market/trades/{symbol}/

Pro+

Fetch the latest trades for one symbol, newest first.

Endpoint

https://api.sahmk.sa/api/v1/market/trades/2222/?limit=1

Parameters

(*) Required

ParameterTypeAllowed
symbol *string

stock ticker

limitinteger

default 50, max 200

200 OKapplication/json
{
  "symbol": "2222",
  "updated_at": "2026-08-12T12:19:10+00:00",
  "count": 1,
  "events": [
    {
      "trade_seq": 204505,
      "event_time": "2026-08-12T12:19:10+00:00",
      "price": 26.6,
      "quantity": 20,
      "value": 532.0,
      "side": "buy"
    }
  ],
  "summary": {
    "event_count": 1,
    "trade_quantity": 20,
    "trade_value": 532.0,
    "latest_event_time": "2026-08-12T12:19:10+00:00"
  }
}
View Endpoint-Specific Errors
json
{
  "error": {
    "code": "INVALID_SYMBOL",
    "message": "Stock symbol '9999' not found."
  }
}

{
  "error": {
    "code": "INVALID_LIMIT",
    "message": "limit must be a valid integer."
  }
}

Trade sequence (trade_seq)

  • A trade is uniquely identified by the combination of its symbol, the trading date derived from event_time in the Asia/Riyadh timezone, and trade_seq.
  • The sequence number may repeat in a later trading session.

Last updated on