Discover/Casablanca Bourse API
live

Casablanca Bourse APIcasablanca-bourse.com ↗

Get live share prices, sector data, and market indicators for all equities listed on the Casablanca Stock Exchange via two clean JSON endpoints.

Endpoint health
verified 1h ago
get_market_indicators
get_share_prices
2/2 passing latest checkself-healing
Endpoints
2
Updated
5d ago

What is the Casablanca Bourse API?

The Casablanca Bourse API exposes two endpoints covering every equity listed on the Casablanca Stock Exchange (CSE). get_share_prices returns a per-company array with reference price, opening price, closing price, high/low, change percentage, trading volume in MAD, and sector grouping. get_market_indicators returns the MASI and MASI 20 index levels, their daily change percentages, total market capitalization, and session trading volume — all in a single call.

This call costs1 credit / call— charged only on success
Try it
Filter by sector name in French (partial match, case-insensitive). Omitting returns all sectors.
Filter by company name (partial match, case-insensitive). Omitting returns all companies.
→ api.parse.bot/scraper/79ba1cf9-d616-40e4-afde-7082f8c53d55/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/79ba1cf9-d616-40e4-afde-7082f8c53d55/get_share_prices?sector=Banques&company=ATTIJARIWAFA' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 2 totalmissing one? ·

Retrieve current share prices for every equity listed on the Casablanca Stock Exchange in a single round trip (one page fetch, no pagination). Each row is one listed instrument with reference price, opening price, last/closing price, high/low, change percentage, volume (MAD), quantity traded, market capitalization, best bid/ask, trade count, trading status (T = traded, NT = not traded, S = suspended) and a link to the instrument page. Prices are delayed 15 minutes during the session and freeze at the last close outside trading hours; intraday fields (opening, high, low, change, volume, quantity) are null for instruments not traded that day. Optional filters match sector name or company name by case-insensitive substring; both may be combined, no filter returns all instruments (around 80), and a filter matching nothing returns an empty list with total_companies 0. Sector and company names are in French as published by the exchange (e.g. Banques).

Input
ParamTypeDescription
sectorstringFilter by sector name in French (partial match, case-insensitive). Omitting returns all sectors.
companystringFilter by company name (partial match, case-insensitive). Omitting returns all companies.
Response
{
  "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": "Banques",
          "status": "T",
          "ticker": "ATW",
          "volume": 49547269.1,
          "company": "ATTIJARIWAFA BANK",
          "best_ask": 699.9,
          "best_bid": 680.5,
          "low_price": 680.5,
          "high_price": 700,
          "market_cap": 146403340939.5,
          "total_trades": 197,
          "closing_price": 680.5,
          "opening_price": 700,
          "change_percent": -2.47,
          "instrument_url": "https://www.casablanca-bourse.com/live-market/actions/cours?symbol=ATW&ce=BCM130843",
          "quantity_traded": 72617,
          "reference_price": 697.7
        }
      ],
      "total_companies": 1
    },
    "status": "success"
  }
}

About the Casablanca Bourse API

Share Price Data

get_share_prices returns one object per listed instrument, including company, ticker, sector, status, reference_price, opening_price, closing_price, high/low bounds, change_percent, and volume denominated in MAD. No pagination is needed: all listed equities are returned in a single response. You can narrow results with the optional sector parameter (French sector name, partial match, case-insensitive) or the company parameter (partial match, case-insensitive). The response also includes total_companies so you can verify filter coverage without counting rows.

Market Indicators

get_market_indicators returns the headline figures shown on the CSE market overview: masi and masi_20 index levels alongside masi_change_percent and masi_20_change_percent (either a signed float or null when unavailable), market_capitalization, trading_volume, and currency (MAD). This endpoint takes no parameters and is useful for dashboard widgets, alerting pipelines, or any workflow that needs a quick market pulse without iterating individual instruments.

Coverage and Filtering

Sector names used in the sector filter match the French-language taxonomy the exchange uses natively — for example, filtering by "banques" or "télécommunications". The API covers the grouped equities market (Marché Actions Groupement). All monetary values are in Moroccan Dirham (MAD) as labeled in the currency field.

Reliability & maintenanceVerified

The Casablanca Bourse API is a managed, monitored endpoint for casablanca-bourse.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when casablanca-bourse.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official casablanca-bourse.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
1h ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a Moroccan equities screener that filters by sector using the sector parameter and ranks by change_percent.
  • Track daily MASI and MASI 20 index movements by polling get_market_indicators at market open and close.
  • Alert when a specific company's closing_price deviates more than a threshold from its reference_price.
  • Populate a portfolio dashboard with per-ticker opening_price, closing_price, and intraday high/low from get_share_prices.
  • Monitor session trading_volume in MAD from get_market_indicators to detect unusually active trading days.
  • Archive daily market_capitalization snapshots for longitudinal analysis of the Casablanca exchange.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Casablanca Bourse have an official developer API?+
Casablanca Bourse (casablanca-bourse.com) does not publish a documented public developer API or data feed for programmatic access to market data.
How does the `sector` filter work in `get_share_prices`?+
The sector parameter does a case-insensitive partial match against the French sector names used by the exchange — for example, passing "banques" will match companies classified under that sector. Omitting the parameter returns all sectors. The company parameter works the same way against company names.
Does the API cover historical prices or only current session data?+
The API covers current session data: reference price, opening price, closing/last price, intraday high/low, change percentage, and session volume. Historical price series are not currently available. You can fork this API on Parse and revise it to add an endpoint targeting historical price pages on the CSE site.
Are index constituents or company fundamentals included?+
Not currently. get_share_prices returns price and volume fields per listed instrument, and get_market_indicators returns index-level aggregates. Constituent lists for MASI or MASI 20, financial statements, and company fundamentals are not part of the current response shape. You can fork this API on Parse and revise it to add endpoints covering those data points.
How fresh is the data returned by these endpoints?+
Both endpoints reflect the figures as currently displayed on the CSE market page. During trading hours this updates with the session; outside trading hours the values represent the most recent session close. There is no built-in streaming or push mechanism — callers should poll at their desired interval.
Page content last updated . Spec covers 2 endpoints from casablanca-bourse.com.
Related APIs in FinanceSee all →
boursorama.com API
Track live stock prices, forex rates, and commodity prices from Boursorama, plus search for any financial instrument and analyze intraday or daily price movements. Stay updated on market movers and major indices like the CAC 40 to make informed investment decisions.
sharesansar.com API
Access real-time Nepali stock prices, browse company information, and read the latest market news all in one place. Stay informed about the Nepal stock market with current pricing data and detailed news articles.
jse.co.za API
Access live JSE stock prices, company profiles, and market indices from the Johannesburg Stock Exchange. Search SENS announcements and view comprehensive market statistics to stay informed on JSE activity.
luse.co.zm API
Access real-time market data, index performance, and company information from the Lusaka Securities Exchange, including daily trading data, listed companies and debt instruments, SENS announcements, and the latest financial news. Monitor market trends and stay informed on securities exchange activity across Zambia's capital markets.
companiesmarketcap.com API
Track real-time market capitalization and rankings for global companies, search for specific firms, and access detailed financial metrics and historical performance data. Get comprehensive company profiles including current market position and financial trends to compare and analyze investment opportunities.
marketbeat.com API
Track comprehensive stock market data including real-time overviews, analyst ratings, earnings reports, insider trades, and institutional ownership across thousands of companies. Search stocks, analyze financial statements and profitability metrics, monitor short interest, explore options chains, and stay updated with market headlines and competitor analysis.
asx.com.au API
Access Australian Securities Exchange (ASX) market data, including equity prices, index summaries, company details, market announcements, and company directory listings. Retrieve upcoming IPO and float information alongside comprehensive data on all ASX-listed companies.
stockanalysis.com API
Access comprehensive stock market data including real-time financials, income statements, statistics, and IPO calendars to research individual stocks and identify market movers. Search stocks, view detailed overviews, and monitor premarket activity all in structured, easy-to-use format.