Tasilab
Home Pricing Docs EN · عربي Sign in Start free →
Home / Tadawul API

The Tadawul API, built for developers.

A programmable interface to the Saudi Exchange (TASI): real-time quotes, historical bars, paper orders, portfolio, backtesting, and experiment tracking — over a clean REST API and a Python SDK. Everything is a simulation; no real order is placed.

There are good sources of Saudi market data. What there wasn't, until Tasilab, is a full developer sandbox for the Saudi market — somewhere you can not just read prices but place orders, hold positions, measure performance, and backtest, entirely in code and entirely without risk. If you know Alpaca for US markets, this is the same idea for Tadawul.

Quickstart

Create a free account, copy your API key, and make your first call. Every authenticated request carries an X-API-Key header.

Terminal
pip install tasilab
export TASILAB_API_KEY="your-api-key"
Python
import os
from tasilab import Tasilab

tasi = Tasilab(api_key=os.environ["TASILAB_API_KEY"])

quote = tasi.get_quote("2222")          # Saudi Aramco
print(quote["price"])

pf = tasi.portfolio()
print(pf["cash_balance"], "SAR available")

The same call over plain HTTP:

curl
curl https://api.tasilab.com/v1/market/quote/2222 \
  -H "X-API-Key: $TASILAB_API_KEY"

What the API covers

Base URL: https://api.tasilab.com. A selection of the endpoints — the full reference is interactive Swagger.

Market data

GET/v1/market/quote/{symbol}
GET/v1/market/quotes
GET/v1/market/status
GET/v1/historical/{symbol}

Orders & portfolio

POST/v1/orders
GET/v1/portfolio
GET/v1/portfolio/positions
GET/v1/analytics/performance

Backtesting & experiments

POST/v1/backtest/run
GET/v1/experiments

Authentication

Every authed endpoint takes an X-API-Key: <your-key> header. Your key lives in your dashboard and can be rotated at any time (which immediately invalidates the old one). The Python SDK reads it from the TASILAB_API_KEY environment variable so it never has to appear in your code.

A note on market data

Tasilab is a sandbox, not a data vendor. Prices come from licensed market-data providers and are surfaced to power your simulation — 15-minute delayed on the free tier. If you need raw, redistributable Tadawul data for your own product, a licensed data provider is the right tool; Tasilab is where you test strategies against that market, place simulated orders, and measure the result.

Get your API key

Free account, an API key, and SAR 100,000 in paper capital — in about a minute. Then read the full interactive reference.

Start free →

New to this? Start with the backtesting guide or build your first trading bot.

Tasilab

An API-native paper-trading sandbox for the Saudi Exchange. Trade with discipline.

Product
  • Paper trading
  • Tadawul API
  • Python SDK
  • Documentation
Guides
  • Backtest in Python
  • Historical data
  • First trading bot
Legal
  • Terms of use
  • Privacy
  • Disclaimer

Tasilab is a simulation-only paper-trading environment. No real orders are placed on the Saudi Exchange. Tasilab is not licensed by the Capital Market Authority and does not provide investment advice.

© 2026 Tasilab