casablanca-bourse.com APIwww.casablanca-bourse.com ↗
Access real-time share prices, market cap, bid/ask spreads, and sector data for all companies listed on the Casablanca Stock Exchange via one API endpoint.
curl -X GET 'https://api.parse.bot/scraper/79ba1cf9-d616-40e4-afde-7082f8c53d55/get_share_prices?sector=Banks&company=ATTIJARIWAFA' \ -H 'X-API-Key: $PARSE_API_KEY'
Get current share prices for all companies listed on the Casablanca Bourse. Returns reference price, opening price, closing price, high/low prices, change percentage, volume, quantity traded, market capitalization, and bid/ask data for each company, grouped by sector. Supports optional filtering by sector name or company name (partial match, case-insensitive).
| Param | Type | Description |
|---|---|---|
| sector | string | Filter by sector name (partial match, case-insensitive). Omitting returns all sectors. |
| company | string | Filter by company name (partial match, case-insensitive). Omitting returns all companies. |
{
"type": "object",
"fields": {
"companies": "array of company objects with share price data including company, ticker, sector, status, reference_price, opening_price, closing_price, high_price, low_price, change_percent, volume, quantity_traded, market_cap, best_bid, best_ask, total_trades, instrument_url",
"total_companies": "integer - number of companies returned after filtering"
},
"sample": {
"data": {
"companies": [
{
"sector": "Banks",
"status": "T",
"ticker": "ATW",
"volume": 44006794.9,
"company": "ATTIJARIWAFA BANK",
"best_ask": 700,
"best_bid": 686,
"low_price": 686,
"high_price": 694.8,
"market_cap": 147586615554,
"total_trades": 189,
"closing_price": 686,
"opening_price": 690,
"change_percent": -0.72,
"instrument_url": "https://www.casablanca-bourse.com/en/live-market/instruments/ATW",
"quantity_traded": 63865,
"reference_price": 691
}
],
"total_companies": 1
},
"status": "success"
}
}About the casablanca-bourse.com API
The Casablanca Bourse API provides live market data for every equity listed on the Casablanca Stock Exchange through a single get_share_prices endpoint that returns 12+ fields per company — including reference price, opening price, closing price, high/low range, change percentage, volume, quantity traded, market capitalization, and bid/ask data — with optional filtering by sector or company name.
What the API Returns
The get_share_prices endpoint returns an array of company objects covering all equities listed on the Casablanca Stock Exchange (Bourse de Casablanca). Each object includes ticker, company, sector, status, reference_price, opening_price, closing_price, high and low prices, change percentage, volume, quantity traded, market_capitalization, and bid/ask fields. The response also includes a total_companies integer reflecting how many records match your query.
Filtering Options
Two optional query parameters let you narrow results without post-processing. The sector parameter accepts a partial, case-insensitive string and returns only companies in matching sectors — useful when you care about, say, banking or real estate equities specifically. The company parameter works the same way for company names. Omitting both parameters returns the full list of listed companies grouped by sector.
Data Coverage and Freshness
Data covers all equities traded in the Marché Actions grouping on the Casablanca Bourse, organized by their official sector classification. The status field indicates each instrument's current trading state, and the bid/ask fields give you the best current quotes on each side of the order book. Market capitalization is included per company, making it straightforward to size positions or rank constituents within a sector.
- Track intraday price movements for Moroccan equities using
opening_pricevsclosing_pricecomparisons. - Build a sector-level dashboard by filtering
get_share_priceswith thesectorparameter and aggregating market cap. - Screen for high-volume trading sessions using the
volumeand quantity traded fields. - Monitor bid/ask spread widening as a liquidity signal across Casablanca-listed stocks.
- Calculate sector-weighted indices using
market_capitalizationdata returned per company. - Alert on significant price moves by comparing
reference_priceagainst current prices and watchingchange_percentagethresholds. - Populate a watchlist for specific Moroccan companies using the
companyfilter parameter.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the Casablanca Bourse have an official developer API?+
What does the `get_share_prices` endpoint return for each company?+
total_companies count reflecting the filtered result set.Does the API cover historical price data or only current market data?+
Is data available for all Casablanca Stock Exchange market segments, including bonds and ETFs?+
How precise is the sector filtering, and what happens if no companies match?+
sector parameter does a partial, case-insensitive match against official sector classifications used by the Casablanca Bourse. If no companies match the supplied string, the response returns an empty companies array with total_companies set to 0. Omitting the parameter returns all sectors.