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 index history

GEThttps://api.q4.sa/v1/indices/{index}/history
Returns daily or intraday values for TASI, Nomu and the sector indices.
Starter+Intraday intervals need Pro+.

Authorization

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

Path parameters

indexstringrequired
TASI, NOMU, or a sector index such as TBNI (banks).

Query parameters

intervalstring
Bar size.
One of:1min5min15min60min1d1w1mo
Default: 1d
fromdate
Start date, inclusive (YYYY-MM-DD).
todate
End date, inclusive (YYYY-MM-DD).
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.
highnumber
Highest price.
lownumber
Lowest price.
closenumber
Closing price.
volumeinteger
Shares traded.
turnoverinteger
Value traded, SAR.
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
Retrieve price history
Next →
Retrieve market summary
Request
curl "https://api.q4.sa/v1/indices/TASI/history?from=2026-10-01" \
  -H "x-api-key: $Q4_API_KEY"
Response
{
  "data": [
    {
      "date": "2026-10-30",
      "open": 11842.6,
      "high": 11915.3,
      "low": 11820.1,
      "close": 11903.8,
      "volume": 268430112,
      "turnover": 6702118400
    }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6MTIwfQ",
    "limit": 50
  }
}