# Nairobi Securities Exchange (NSE Kenya) API
> Live data for the Nairobi Securities Exchange (NSE Kenya, the Kenyan market) with no key: the live quote for one or more stocks by ticker (price, change, open/high/low, volume, market cap, P/E, sector, in shillings, with the company name), a ranked market screener (top gainers, losers, most active, or largest by market cap), and a search across the market by company name or ticker (optionally by sector).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/nairobi-stock-api/..."
```

## Pricing
- **Free** (Free) — 7,500 calls/Mo, 2 req/s
- **Basic** ($12/Mo) — 185,000 calls/Mo, 10 req/s
- **Pro** ($59/Mo) — 1,050,000 calls/Mo, 20 req/s
- **Scale** ($81/Mo) — 5,760,000 calls/Mo, 50 req/s

## Endpoints

### Quotes

#### `GET /v1/quote` — Live quote for one or more NSE Kenya stocks

**Parameters:**
- `codes` (query, required, string) — NSE Kenya ticker(s), comma-separated up to 20 Example: `SCOM,EQTY`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nairobi-stock-api/v1/quote?codes=SCOM%2CEQTY"
```

**Response:**
```json
{
    "data": {
        "note": "The live quote for one or more Kenyan (NSE) stocks — price, change, open/high/low, volume, market cap, P/E and sector (in shillings), with the company name. Pass codes (the NSE Kenya ticker, comma-separate up to 20, e.g. SCOM,EQTY).",
        "count": 2,
        "quotes": [
            {
                "low": 31.05,
                "high": 31.7,
                "open": 31.2,
                "price": 31.4,
                "change": 0.1999999999999993,
                "sector": "Communications",
                "ticker": "SCOM",
                "volume": 2074748,
                "company": "Safaricom PLC",
                "currency": "KES",
                "pe_ratio": 13.14,
                "market_cap": 1234138892308,
                "change_percent": 0.64
            },
            {
                "low": 75,
                "high": 76,
                "open": 75.5,
                "price": 76,
                "change": 0.25,
                "sector": "Finance",
                "ticker": "EQTY",
                "volume": 136221,
                "company": "Equity Group Holdings Limited",
                "currency": "KES",
                "pe_ratio": 3.8,
                "market_cap": 284912447754,
                "change_percent": 0.33
            }
        ],
        "source": "Nairobi Securities Exchange / NSE Kenya (TradingView)"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:30.485Z",
        "request_id": "66155628-d6bd-4
…(truncated, see openapi.json for full schema)
```

### Screener

#### `GET /v1/screener` — Ranked market screener

**Parameters:**
- `by` (query, optional, string) — Ranking: gainers, losers, active, marketcap Example: `marketcap`
- `limit` (query, optional, string) — Results 1-100 Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nairobi-stock-api/v1/screener?by=marketcap&limit=20"
```

**Response:**
```json
{
    "data": {
        "by": "marketcap",
        "note": "A ranked screener of the Kenyan (NSE) market — the top stocks by your chosen ranking. Pass by (gainers, losers, active, or marketcap; default marketcap) and limit (1-100, default 20). Only real stocks above a market-cap floor are ranked.",
        "count": 20,
        "source": "Nairobi Securities Exchange / NSE Kenya (TradingView)",
        "results": [
            {
                "price": 31.4,
                "change": 0.1999999999999993,
                "sector": "Communications",
                "ticker": "SCOM",
                "volume": 2074748,
                "company": "Safaricom PLC",
                "currency": "KES",
                "market_cap": 1234138892308,
                "change_percent": 0.64
            },
            {
                "price": 76,
                "change": 0.25,
                "sector": "Finance",
                "ticker": "EQTY",
                "volume": 136221,
                "company": "Equity Group Holdings Limited",
                "currency": "KES",
                "market_cap": 284912447754,
                "change_percent": 0.33
            },
            {
                "price": 69.75,
                "change": 0.5,
                "sector": "Finance",
                "ticker": "KCB",
                "volume": 470851,
                "company": "KCB Group PLC",
                "currency": "KES",
                "market_cap": 222532288269,
                "chang
…(truncated, see openapi.json for full schema)
```

### Search

#### `GET /v1/search` — Search the market by name or ticker

**Parameters:**
- `q` (query, required, string) — Company name or ticker fragment Example: `bank`
- `sector` (query, optional, string) — Narrow to a sector Example: `Finance`
- `limit` (query, optional, string) — Results 1-50 Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nairobi-stock-api/v1/search?q=bank&sector=Finance&limit=20"
```

**Response:**
```json
{
    "data": {
        "note": "Search the Kenyan (NSE) market by company name or ticker — matching stocks ranked by market cap. Pass q (the name or ticker fragment, e.g. bank), optionally sector (e.g. Finance, Communications) and limit (1-50, default 20).",
        "count": 4,
        "query": "bank",
        "sector": "Finance",
        "source": "Nairobi Securities Exchange / NSE Kenya (TradingView)",
        "results": [
            {
                "price": 31.8,
                "change": 0.6999999999999993,
                "sector": "Finance",
                "ticker": "COOP",
                "volume": 981116,
                "company": "Co-operative Bank of Kenya Ltd.",
                "currency": "KES",
                "market_cap": 185989430306,
                "change_percent": 2.25
            },
            {
                "price": 28.9,
                "change": 0.3999999999999986,
                "sector": "Finance",
                "ticker": "ABSA",
                "volume": 853065,
                "company": "Absa Bank Kenya Plc",
                "currency": "KES",
                "market_cap": 153169323089,
                "change_percent": 1.4
            },
            {
                "price": 336,
                "change": 1,
                "sector": "Finance",
                "ticker": "SCBK",
                "volume": 12309,
                "company": "Standard Chartered Bank Kenya Ltd",
                "currency": "KES",
                "market
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata & endpoint catalog

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nairobi-stock-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "sample": {
            "safaricom": 31.4
        },
        "source": "TradingView public screener (scanner.tradingview.com/kenya/scan), keyless",
        "screens": [
            "gainers",
            "losers",
            "active",
            "marketcap"
        ],
        "service": "nairobi-stock-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/quote": "Live quote for one or more stocks (codes).",
            "GET /v1/search": "Search by company name or ticker (q, sector, limit).",
            "GET /v1/screener": "Ranked market screener (by, limit)."
        },
        "description": "Live data for the Nairobi Securities Exchange (NSE Kenya, the Kenyan market) with no key: the live quote for one or more stocks by ticker (price, change, open/high/low, volume, market cap, P/E, sector, in shillings, with the company name), a ranked market screener (top gainers, losers, most active, or largest by market cap), and a search across the market by company name or ticker (optionally by sector). The Kenya-equities / screener / search layer for trading dashboards and research. Distinct from other exchange readers — the Nairobi Securities Exchange market with a built-in screener and name search. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:31.099Z",
        "request_id": "2c947c2a-3e36-4d62-996f-7c9c78dbc149"
    },
    "status": "ok",
  
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/nairobi-stock-api
OpenAPI spec: https://www.oanor.com/api/nairobi-stock-api/openapi.json
