# KRX Korea Stock Exchange API
> Live data for the Korean stock market (KOSPI and KOSDAQ on the Korea Exchange), with no key. Read the live quote for one or more stocks by their six-digit code (price, open/high/low, change, volume and market capitalisation, in Korean won); the live value of a market index (KOSPI, KOSDAQ, KOSPI 200); and the top stocks ranked by market capitalisation. The Korea-equities / KOSPI-index / market-cap-ranking layer for trading dashboards, screeners and research — distinct from other exchange readers, this is Korean market data. Live; 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/krx-api/..."
```

## Pricing
- **Free** (Free) — 14,500 calls/Mo, 3 req/s
- **Starter** ($16/Mo) — 290,000 calls/Mo, 8 req/s
- **Pro** ($43/Mo) — 1,680,000 calls/Mo, 20 req/s
- **Enterprise** ($102/Mo) — 8,450,000 calls/Mo, 60 req/s

## Endpoints

### Stocks

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

**Parameters:**
- `codes` (query, required, string) — Korean stock codes, comma-separated, e.g. 005930 (Samsung), 000660 (SK Hynix) Example: `005930,000660`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/krx-api/v1/quote?codes=005930%2C000660"
```

**Response:**
```json
{
    "data": {
        "note": "The live quote for one or more KRX-listed stocks — price, open/high/low, change, volume, traded value and market cap (in KRW) each. Pass codes (comma-separate up to 10, e.g. 005930,000660 for Samsung and SK Hynix).",
        "count": 2,
        "quotes": [
            {
                "low": 335000,
                "code": "005930",
                "high": 344500,
                "isin": "KR7005930003",
                "name": "삼성전자",
                "open": 342500,
                "price": 336500,
                "change": 14000,
                "volume": 9539232,
                "currency": "KRW",
                "market_cap": 1967272751592000,
                "market_status": "OPEN",
                "trading_value": 3231798000000,
                "change_percent": 4.34
            },
            {
                "low": 2265000,
                "code": "000660",
                "high": 2322000,
                "isin": "KR7000660001",
                "name": "SK하이닉스",
                "open": 2283000,
                "price": 2279000,
                "change": 129000,
                "volume": 1798439,
                "currency": "KRW",
                "market_cap": 1624248689835000,
                "market_status": "OPEN",
                "trading_value": 4128786000000,
                "change_percent": 6
            }
        ],
        "source": "KRX (Naver Finance)"
    },
    "meta": {
        "timestamp": "2026-06-15T
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/ranking` — Top stocks by market cap

**Parameters:**
- `market` (query, optional, string) — KOSPI or KOSDAQ (default KOSPI) Example: `KOSPI`
- `limit` (query, optional, string) — Results (1-50, default 20) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/krx-api/v1/ranking?market=KOSPI&limit=20"
```

**Response:**
```json
{
    "data": {
        "note": "The largest KRX-listed stocks by market capitalisation for a market — each with its price, change and market cap. Pass market (KOSPI or KOSDAQ; default KOSPI) and limit (1-50, default 20). The blue-chip leaderboard of the Korean market.",
        "count": 20,
        "market": "KOSPI",
        "source": "KRX (Naver Finance)",
        "stocks": [
            {
                "code": "005930",
                "name": "삼성전자",
                "price": 336000,
                "change": 13500,
                "market_cap": 19643496,
                "change_percent": 4.19
            },
            {
                "code": "000660",
                "name": "SK하이닉스",
                "price": 2279000,
                "change": 129000,
                "market_cap": 16242487,
                "change_percent": 6
            },
            {
                "code": "402340",
                "name": "SK스퀘어",
                "price": 1384000,
                "change": 26000,
                "market_cap": 1826304,
                "change_percent": 1.91
            },
            {
                "code": "005935",
                "name": "삼성전자우",
                "price": 217000,
                "change": 10000,
                "market_cap": 1741146,
                "change_percent": 4.83
            },
            {
                "code": "009150",
                "name": "삼성전기",
                "price": 1920000,
 
…(truncated, see openapi.json for full schema)
```

### Indices

#### `GET /v1/index` — Live value of a market index

**Parameters:**
- `name` (query, optional, string) — KOSPI, KOSDAQ or KOSPI200 (default KOSPI) Example: `KOSPI`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/krx-api/v1/index?name=KOSPI"
```

**Response:**
```json
{
    "data": {
        "low": 8450.24,
        "high": 8603.48,
        "name": "코스피",
        "note": "The live value of a Korean market index — current level, open, day high/low, change and percent change. Pass name (KOSPI, KOSDAQ or KOSPI200; default KOSPI).",
        "open": 8526.12,
        "index": "KOSPI",
        "value": 8529.02,
        "change": 405.4,
        "source": "KRX (Naver Finance)",
        "market_status": "OPEN",
        "change_percent": 4.99,
        "trading_volume": 298304000
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:57.795Z",
        "request_id": "54710aed-38af-465c-a7ca-7178ef7ca192"
    },
    "status": "ok",
    "message": "Index retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "sample": {
            "kospi": 8529.02
        },
        "source": "Naver Finance public quote feed (finance.naver.com), keyless",
        "indexes": [
            "KOSPI",
            "KOSDAQ",
            "KOSPI200"
        ],
        "service": "krx-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/index": "Live value of a market index (name).",
            "GET /v1/quote": "Live quote for one or more stocks (codes).",
            "GET /v1/ranking": "Top stocks by market cap (market, limit)."
        },
        "description": "Live data for the Korean stock market (KOSPI & KOSDAQ on the Korea Exchange) with no key: the live quote for one or more stocks by code (price, open/high/low, change, volume, market cap in KRW), the live value of a market index (KOSPI, KOSDAQ, KOSPI 200), and the top stocks ranked by market capitalisation. The Korea-equities / KOSPI-index / market-cap-ranking layer for trading dashboards and screeners. Distinct from other exchange readers — Korean market data. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:57.880Z",
        "request_id": "40c5529f-6b30-4051-bff6-8cb3254c5bc5"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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