Use Cases

African Market Data API

Query supported African exchanges, tickers, historical end-of-day prices, and source-specific FX rates.

Market routes return exchange metadata, tickers, historical prices and FX observations. Begin by checking which exchanges or currency pairs are available:

TaskEndpoint
List exchanges and latest trade dates/v1/markets/exchanges
Browse instruments on an exchange/v1/markets/tickers
Fetch one instrument/v1/markets/tickers/{exchange_code}/{ticker_symbol}
Query currency rates/v1/markets/fx-rates

Market data covers fewer countries than country reference records and historical indicators. Price-history depth varies by exchange and instrument. See Markets for coverage and supported parameters.

Example: List Exchanges

curl "https://api.africa-api.com/v1/markets/exchanges" \
  -G \
  -d "country_code=ng" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

Remove country_code=ng to list exchanges across supported countries.

Example: Browse Tickers

curl "https://api.africa-api.com/v1/markets/tickers" \
  -G \
  -d "exchange_code=NGX" \
  -d "limit=20" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

exchange_code=NGX selects the Nigerian Exchange. Use a returned ticker symbol in the detail and history routes.

Example: Get Historical Prices For One Ticker

curl "https://api.africa-api.com/v1/markets/tickers/NGX/MTNN/history" \
  -G \
  -d "start_date=2025-01-01" \
  -d "end_date=2025-12-31" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

The date filters select the requested period. Returned history depends on the observations available for that ticker.

Example: Query FX Rates

curl "https://api.africa-api.com/v1/markets/fx-rates" \
  -G \
  -d "base_currency=USD" \
  -d "quote_currency=NGN" \
  -H "Authorization: Bearer $AFRICA_API_KEY"

Inspect the rate's source and observation date. Providers and reporting schedules vary by currency pair.

African Market Data API FAQ

Is there an API for African stock exchanges?

/v1/markets/* includes exchange metadata, tickers and historical end-of-day prices for supported exchanges, including NGX, JSE and Casablanca. Query the exchange list and check each instrument's available dates.

How do I get USD exchange rates for African currencies?

Use GET /v1/markets/fx-rates with base_currency=USD and the required quote_currency. The catalog combines USD-based daily rates with central-bank series, including BCEAO, Bank Al-Maghrib and Bank of Tanzania. Check the returned source to distinguish providers.

Does the API include historical price data?

Yes. Ticker history routes return historical end-of-day series for supported instruments, and FX history supports rate-over-time queries. Coverage varies by exchange and instrument, so check the markets reference for current depth.