Q4API Docs
Q4 APISign inGet API key
DocumentationAPI Reference
Overview
API reference
Companies
GETList companiesGETRetrieve a companyGETList sectors
Market data
GETRetrieve a quoteGETList quotesGETRetrieve price historyGETRetrieve index historyGETRetrieve market summaryGETList market moversGETList sector performanceGETList tradesGETRetrieve order book depth
WebSocket
WSQuotes streamWSTrades streamWSDepth stream
Fundamentals
GETRetrieve standardised statementsGETRetrieve as-reported statementsGETList figuresGETRetrieve ratiosGETCompare companiesGETList dividendsGETList corporate actionsGETList stock eventsGETSearch notes
Documents
GETList documentsGETRetrieve a documentGETList document pagesGETRetrieve document textGETRetrieve document summaryGETList notesGETRetrieve a noteGETList sectionsGETRetrieve a sectionGETSearch board report sections
Earnings calls
GETList earnings callsGETRetrieve an earnings callGETRetrieve a transcriptGETRetrieve call audio
Announcements
GETList announcementsGETRetrieve an announcement
Economic data
GETList seriesGETList observations
Webhooks & alerts
POSTCreate a webhookGETList webhooksDELDelete a webhookPOSTCreate an alert ruleGETList alert rulesDELDelete an alert rule
Account
GETRetrieve usage
Market data

Retrieve price history

GEThttps://api.q4.sa/v1/prices/{symbol}/history
Returns OHLCV bars for a stock, adjusted for splits, bonus shares and rights issues.
Starter+Intraday intervals need Pro+.

Daily bars go back to the stock’s listing. Intraday bars (1min to 60min) cover 90 days on Pro and 2 years on Business.

The latest bar is marked is_final: false until the closing auction ends.

Authorization

x-api-keyheaderrequired
Your API key. See Authentication.

Path parameters

symbolstringrequired
Tadawul symbol, e.g. 2222 for Saudi Aramco. ISINs are accepted too.

Query parameters

intervalstring
Bar size.
One of:1min5min15min30min60min1d1w1mo
Default: 1d
fromdate
Start date, inclusive (YYYY-MM-DD).
todate
End date, inclusive (YYYY-MM-DD).
adjustedboolean
Adjust prices and volumes for corporate actions.
Default: true
limitinteger
Results per page.
Default: 500 · Range: 1–2000
cursorstring
The next_cursor from the previous page. Omit it for the first page.

Response

dataobject[]
The result.
datedate
Trading date (Riyadh).
opennumber
Opening price.
highinteger
Highest price.
lownumber
Lowest price.
closenumber
Closing price.
volumeinteger
Shares traded.
turnovernumber
Value traded, SAR.
tradesinteger
Number of trades.
is_finalboolean
False while the bar is still forming.
paginationobject
Paging details. See Pagination.
next_cursorstring
Pass as cursor to get the next page. null on the last page.
limitinteger
Page size used.

Errors

400, 401, 403, 404, 429. Every error has the same shape: see Errors.
← Previous
List quotes
Next →
Retrieve index history
Request
curl "https://api.q4.sa/v1/prices/1120/history?interval=1d&from=2026-10-01&to=2026-10-31" \
  -H "x-api-key: $Q4_API_KEY"
Response
{
  "data": [
    {
      "date": "2026-10-30",
      "open": 94.8,
      "high": 96,
      "low": 94.5,
      "close": 95.9,
      "volume": 3412870,
      "turnover": 325884011.2,
      "trades": 9884,
      "is_final": true
    },
    {
      "date": "2026-10-29",
      "open": 95.2,
      "high": 95.4,
      "low": 94.3,
      "close": 94.8,
      "volume": 2975118,
      "turnover": 282401760.9,
      "trades": 8412,
      "is_final": true
    }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6MTIwfQ",
    "limit": 50
  }
}