# NGX Stock Data: Nigerian Stock Prices, History & Indices (`mansalabs/ngx-stock-data`) Actor

Nigerian Exchange (NGX) stock prices for all listed equities: live board, quotes, daily OHLCV history, top gainers and losers, and 21 NGX indices including the All-Share Index. Clean JSON for analysts, apps and AI agents.

- **URL**: https://apify.com/mansalabs/ngx-stock-data.md
- **Developed by:** [Mansa Labs](https://apify.com/mansalabs) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NGX Stock Data: Nigerian Stock Prices, History & Indices

Structured data for the **Nigerian Exchange (NGX)** in Lagos: every listed stock with its latest price, quotes for the tickers you choose, daily OHLCV price history (back to 2010 for DANGCEM), today's top gainers and losers, and 21 NGX indices: All-Share (ASI), NGX 30, Premium, Pension, Banking and sector indices. Prices are in NGN.

Covers 146 NGX securities, including Dangote Cement, MTN Nigeria, Airtel Africa, BUA Foods, GTCO, Zenith Bank, Seplat.

### What you can fetch

| Dataset | What you get | Rows |
|---|---|---|
| `stocks` | Every NGX listed stock: ticker, name, price, change, % change, volume | 146 |
| `quote` | Latest price, volume, market cap, shares outstanding, sector for the tickers you list | 1 per ticker |
| `history` | Daily open, high, low, close, adjusted close and volume | 1 per trading day |
| `movers` | Today's top gainers and losers, ranked | about 10 |
| `indices` | 21 NGX indices: All-Share (ASI), NGX 30, Premium, Pension, Banking and sector indices | 21 |

### Use cases

- **Investors and analysts:** pull the full NGX board or a price history into a spreadsheet, notebook or BI tool.
- **Fintech and portfolio apps:** NGX quotes and daily closes without building your own data pipeline.
- **AI agents and LLM apps:** Nigeria market data as a tool call, including via Apify's MCP server.
- **Newsletters and dashboards:** daily movers and index levels for NGX market reports.
- **Backtesting:** years of daily OHLCV for NGX stocks in one run.

### Input examples

Full board:

```json
{ "dataset": "stocks" }
```

One year of daily prices for two stocks:

```json
{ "dataset": "history", "tickers": ["DANGCEM","MTNN"], "historyRange": "1Y" }
```

### Output example (quote)

```json
{
  "exchange": "NGX",
  "ticker": "DANGCEM",
  "name": "Dangote Cement Plc",
  "price": 1341,
  "change": 0,
  "change_pct": 0,
  "volume": 999529,
  "market_cap": 13667582993310,
  "shares_outstanding": 16873559251,
  "sector": "INDUSTRIAL GOODS",
  "logo_url": null,
  "last_updated": "2026-11-06T16:30:06.38+00:00",
  "currency": "NGN",
  "retrieved_at": "2026-11-06T16:30:06.38+00:00"
}
```

### Output example (history, one trading day)

```json
{
  "exchange": "NGX",
  "ticker": "DANGCEM",
  "currency": "NGN",
  "price_unit": "major",
  "date": "2026-11-06",
  "open": 1341,
  "high": 1341,
  "low": 1341,
  "close": 1341,
  "adj_close": 1341,
  "volume": 999529
}
```

### Pricing

**$15 per 1,000 results** ($0.015 per row) plus $0.005 per run. You only pay for rows returned.

| Example run | Rows | Cost |
|---|---|---|
| Full NGX board (`stocks`) | 146 | about $2.19 |
| 1 year of daily history for DANGCEM | 247 | about $3.71 |
| Today's movers | about 10 | about $0.15 |

Use **Max results** to cap any run. "All available history" for a long-listed stock can return several thousand rows, so set a cap or a date range if you only need part of it.

For other African exchanges in one actor, see [African Stock Market Data](https://apify.com/mansalabs/african-stock-market-data), which covers 15+ exchanges. If you run this every day or need fundamentals, dividends, bond yields, FX or macro data, a flat monthly plan from [Mansa API](https://mansaapi.com) (the data layer behind this actor) works out cheaper.

### Data notes

- Live prices refresh about every 30 minutes during NGX trading hours. Outside trading hours you get the latest close.
- History is daily bars only. There is no intraday history.
- A ticker that doesn't exist on NGX is skipped and listed in the run's status message. You are not charged for it.

Powered by [Mansa API](https://mansaapi.com), African market data infrastructure.

# Actor input Schema

## `dataset` (type: `string`):

Which NGX data to fetch.

## `tickers` (type: `array`):

NGX ticker symbols for quote and history, e.g. DANGCEM, MTNN. Run the Stocks dataset to list every ticker.

## `historyRange` (type: `string`):

How far back to go for the History dataset. Ignored if you set From/To dates.

## `historyFrom` (type: `string`):

Optional start date for History. Overrides History range.

## `historyTo` (type: `string`):

Optional end date for History.

## `maxResults` (type: `integer`):

Optional cap on rows returned (and charged) in this run.

## `apiKey` (type: `string`):

Bring your own key from mansaapi.com. Leave empty to use the actor's built-in access.

## Actor input object example

```json
{
  "dataset": "stocks",
  "tickers": [
    "DANGCEM"
  ],
  "historyRange": "1M"
}
```

# Actor output Schema

## `results` (type: `string`):

NGX rows returned by this run

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tickers": [
        "DANGCEM"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mansalabs/ngx-stock-data").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "tickers": ["DANGCEM"] }

# Run the Actor and wait for it to finish
run = client.actor("mansalabs/ngx-stock-data").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tickers": [
    "DANGCEM"
  ]
}' |
apify call mansalabs/ngx-stock-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mansalabs/ngx-stock-data"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/63lSRxcfuhJ79b9C2/builds/I9I66QKOIz9ioAOhh/openapi.json
