# CSE Colombo Stock Exchange API
> Live data from the Colombo Stock Exchange (CSE) in Sri Lanka, with no key. Read the day's market summary (turnover, share volume, trades); the headline ASPI all-share index; a full company quote with fundamentals (last price, day and 52-week range, market cap, today's volume and turnover, foreign-holding percentage and the beta versus the ASPI and S&P SL20 indices); and the day's top gainers, losers and most-active stocks. The Sri-Lanka-equities / frontier-market / foreign-holding-and-beta layer for trading dashboards, screeners and research — distinct from other exchange readers, with a fundamentals-and-risk cut. Live from CSE; short cache only.

## 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/cse-api/..."
```

## Pricing
- **Free** (Free) — 14,000 calls/Mo, 3 req/s
- **Starter** ($24/Mo) — 280,000 calls/Mo, 8 req/s
- **Pro** ($62/Mo) — 1,600,000 calls/Mo, 20 req/s
- **Enterprise** ($143/Mo) — 8,500,000 calls/Mo, 60 req/s

## Endpoints

### Quotes

#### `GET /v1/quote` — Company quote with beta & foreign holdings

**Parameters:**
- `symbol` (query, required, string) — CSE symbol, e.g. JKH.N0000 (John Keells), LOLC.N0000, COMB.N0000 Example: `JKH.N0000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cse-api/v1/quote?symbol=JKH.N0000"
```

**Response:**
```json
{
    "data": {
        "isin": "LK0092N00003",
        "name": "JOHN KEELLS HOLDINGS PLC",
        "note": "The full quote and fundamentals for one Colombo Stock Exchange company — last price, day and 52-week range, change, market cap, today's volume and turnover, foreign-holding percentage and the beta versus the ASPI and S&P SL20 indices. Pass symbol (e.g. LOLC.N0000, JKH.N0000).",
        "change": 0.3,
        "source": "CSE",
        "symbol": "JKH.N0000",
        "day_low": 19.7,
        "day_high": 20,
        "beta_aspi": 1.4364177,
        "last_price": 20,
        "market_cap": 354233524900,
        "week52_low": 17.8,
        "week52_high": 26.1,
        "beta_sp_sl20": 1.3333858,
        "change_percent": 1.52,
        "previous_close": 19.7,
        "turnover_today": 63157624,
        "share_volume_today": 3163380,
        "foreign_holding_percent": null
    },
    "meta": {
        "timestamp": "2026-06-15T02:11:03.936Z",
        "request_id": "5be8da8e-c181-4146-ab13-bdfc316aba6d"
    },
    "status": "ok",
    "message": "Quote retrieved successfully",
    "success": true
}
```

### Market

#### `GET /v1/index` — The ASPI all-share index

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

**Response:**
```json
{
    "data": {
        "low": 21270.02,
        "high": 21658.1,
        "name": "All Share Price Index",
        "note": "The headline ASPI (All Share Price Index) of the Colombo Stock Exchange — its current level, day high/low, point change and percent change. The pulse of the whole Sri Lankan market.",
        "as_of": "2026-06-12T09:19:31.110Z",
        "index": "ASPI",
        "value": 21637.43,
        "change": 367.41,
        "source": "CSE",
        "change_percent": 1.73
    },
    "meta": {
        "timestamp": "2026-06-15T02:11:04.175Z",
        "request_id": "2fdcd8ae-4ce5-4c82-8716-83fe61b910d6"
    },
    "status": "ok",
    "message": "Index retrieved successfully",
    "success": true
}
```

#### `GET /v1/movers` — Top gainers, losers or most-active

**Parameters:**
- `kind` (query, optional, string) — gainers, losers or active (default gainers) Example: `gainers`
- `limit` (query, optional, string) — Results (1-50, default 20) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cse-api/v1/movers?kind=gainers&limit=20"
```

**Response:**
```json
{
    "data": {
        "kind": "gainers",
        "note": "The day's top gainers or losers on the Colombo Stock Exchange — each with its price, change and percent change. Pass kind (gainers, losers or active).",
        "count": 10,
        "source": "CSE",
        "securities": [
            {
                "price": 0.3,
                "change": 0.1,
                "symbol": "SEMB.X0000",
                "change_percent": 50
            },
            {
                "price": 2.8,
                "change": 0.6,
                "symbol": "HNBF.R0001",
                "change_percent": 27.27
            },
            {
                "price": 3.6,
                "change": 0.6,
                "symbol": "HNBF.R0000",
                "change_percent": 20
            },
            {
                "price": 5.9,
                "change": 0.8,
                "symbol": "HVA.N0000",
                "change_percent": 15.69
            },
            {
                "price": 1151.75,
                "change": 139.25,
                "symbol": "SMOT.N0000",
                "change_percent": 13.75
            },
            {
                "price": 22.8,
                "change": 2.7,
                "symbol": "KPHL.N0000",
                "change_percent": 13.43
            },
            {
                "price": 9.2,
                "change": 1,
                "symbol": "HNBF.N0000",
                "change_percent": 12.2
            },
            {
             
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/summary` — The day's market summary

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

**Response:**
```json
{
    "data": {
        "note": "The day's market summary for the Colombo Stock Exchange — total turnover (LKR), shares traded and number of trades. The headline activity of the Sri Lankan market.",
        "source": "CSE",
        "trades": 19910,
        "turnover": 1992725682.55,
        "trade_date": "2026-06-12T09:19:31.110Z",
        "share_volume": 83820931
    },
    "meta": {
        "timestamp": "2026-06-15T02:11:04.726Z",
        "request_id": "428510b9-a1e8-4220-8983-15071af7eeb9"
    },
    "status": "ok",
    "message": "Market summary retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Endpoints & source

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

**Response:**
```json
{
    "data": {
        "sample": {
            "aspi": 21637.43
        },
        "source": "Colombo Stock Exchange public feed (cse.lk/api), keyless",
        "service": "cse-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/index": "The ASPI all-share index.",
            "GET /v1/quote": "Full company quote with beta & foreign holdings (symbol).",
            "GET /v1/movers": "Top gainers, losers or most-active (kind).",
            "GET /v1/summary": "The day's market summary (turnover, volume, trades)."
        },
        "description": "Live data from the Colombo Stock Exchange (CSE) in Sri Lanka with no key: the day's market summary (turnover, share volume, trades), the headline ASPI index, a full company quote with fundamentals (price, 52-week range, market cap, foreign-holding percentage and beta versus the ASPI and S&P SL20), and the top gainers/losers/most-active stocks. The Sri-Lanka-equities / frontier-market / foreign-holding-and-beta layer for trading dashboards and screeners. Distinct from other exchange readers — CSE with a fundamentals-and-risk cut. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-15T02:11:04.822Z",
        "request_id": "26bb8a50-fea4-4cf1-912b-599cffd99c3d"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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