MASI · Casablanca Stock Exchange
Live data for every MASI-listed stock.
A simple API for prices and key fundamentals across the Casablanca Stock Exchange.
01
Market overview
Built from whatever stocks are currently cached, not a full live sweep of the market.
02
Live demo
Pick a stock to fetch its current data straight from the API.
03
Compare
Compare up to three stocks side by side, field by field.
04
How it works
-
01
1. You ask for a symbol
Send a stock's ticker to the API, for example ATW for Attijariwafa Bank.
-
02
2. We check the cache first
Recently requested stocks are served instantly from a short-lived cache.
-
03
3. Otherwise, we fetch it live
On a cache miss, a background job pulls current price and fundamentals straight from the market data source and stores the result.
-
04
4. You get clean JSON
Price, market cap, P/E, EPS, sector, and more, all in one response.
05
API docs
Every endpoint below needs an API key, except the demo above.
Authentication
Send your key on every request as the X-API-Key header.
X-API-Key: <your key>
GET /stocks/ — List all stocks
The full MASI ticker list, for populating a picker.
curl -H "X-API-Key: <your key>" https://masitick.ialae.com/stocks/
GET /stock/<symbol>/ — Get one stock
Current price and fundamentals for one ticker. Served from cache when available, otherwise scraped live (up to 30 seconds) before falling back to an async task id. Add ?fresh=1 to force a live scrape.
curl -H "X-API-Key: <your key>" https://masitick.ialae.com/stock/ATW/
{
"symbol": "ATW",
"status": "success",
"cached": true,
"cache_age_seconds": 42,
"result": {
"symbol": "ATW",
"stock_name": "Attijariwafa Bank",
"last_price": "650.00",
"market_cap": "...",
"pe_ratio": "...",
"eps": "...",
"sector": "...",
"industry": "..."
}
}
Cache
Results are cached for 30 minutes per symbol.
06
Get access
Masitick is free to use for reasonable, non-abusive volumes. Email us to request an API key.
About
Masitick is an API for the Casablanca Stock Exchange (MASI): live prices and key fundamentals (market cap, P/E, EPS, dividend yield, sector, and more) for every listed stock, in one clean JSON response per ticker. It exists so any app, script, or spreadsheet tracking Moroccan equities can pull current data without scraping a market data site by hand.