# Stock Exchange of Thailand (SET) API
> Live data for the Stock Exchange of Thailand (SET, the Bangkok 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 baht, with the company name), a ranked market screener (top gainers, losers, most active, or largest by market cap), and the live value of the SET Index.

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

## Pricing
- **Free** (Free) — 11,500 calls/Mo, 2 req/s
- **Basic** ($19/Mo) — 255,000 calls/Mo, 10 req/s
- **Pro** ($52/Mo) — 1,390,000 calls/Mo, 20 req/s
- **Scale** ($119/Mo) — 7,400,000 calls/Mo, 50 req/s

## Endpoints

### Quotes

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

**Parameters:**
- `codes` (query, required, string) — SET ticker(s), comma-separated up to 20 Example: `PTT,DELTA`

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

**Response:**
```json
{
    "data": {
        "note": "The live quote for one or more Thai (SET) stocks — price, change, open/high/low, volume, market cap, P/E and sector (in baht), with the company name. Pass codes (the SET ticker, comma-separate up to 20, e.g. PTT,DELTA).",
        "count": 2,
        "quotes": [
            {
                "low": 36,
                "high": 36.5,
                "open": 36.25,
                "price": 36,
                "change": -0.5,
                "sector": "Energy Minerals",
                "ticker": "PTT",
                "volume": 58568852,
                "company": "PTT Public Co., Ltd.",
                "currency": "THB",
                "pe_ratio": 11.09,
                "market_cap": 1028267859375,
                "change_percent": -1.37
            },
            {
                "low": 360,
                "high": 368,
                "open": 366,
                "price": 363,
                "change": 5,
                "sector": "Electronic Technology",
                "ticker": "DELTA",
                "volume": 19461890,
                "company": "Delta Electronics (Thailand) Public Co. Ltd.",
                "currency": "THB",
                "pe_ratio": 159.39,
                "market_cap": 4527995355469,
                "change_percent": 1.4
            }
        ],
        "source": "Stock Exchange of Thailand / SET (TradingView)"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:42.078Z",
        "request_id": "daf84211-f
…(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: `gainers`
- `limit` (query, optional, string) — Results 1-100 Example: `20`

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

**Response:**
```json
{
    "data": {
        "by": "gainers",
        "note": "A ranked screener of the Thai (SET) 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": "Stock Exchange of Thailand / SET (TradingView)",
        "results": [
            {
                "price": 0.03,
                "change": 0.009999999999999998,
                "sector": "Consumer Services",
                "ticker": "GRAND",
                "volume": 407951,
                "company": "Grande Asset Hotels & Property Public Co. Ltd.",
                "currency": "THB",
                "market_cap": 278566927,
                "change_percent": 50
            },
            {
                "price": 1.32,
                "change": 0.26,
                "sector": "Energy Minerals",
                "ticker": "UMS",
                "volume": 18318308,
                "company": "Unique Mining Services Public Co. Ltd.",
                "currency": "THB",
                "market_cap": 3152621325,
                "change_percent": 24.53
            },
            {
                "price": 3.78,
                "change": 0.6999999999999997,
                "sector": "Electronic Technology",
                "ticker": "SMT",
                "volume": 53576442,
                "company": "Stars Microelectronics (Thailand) Public Co. Lt
…(truncated, see openapi.json for full schema)
```

### Indices

#### `GET /v1/index` — Live value of the SET Index

**Parameters:**
- `name` (query, optional, string) — SET Example: `SET`

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

**Response:**
```json
{
    "data": {
        "low": 1582.26,
        "high": 1595.84,
        "name": "SET Index",
        "note": "The live value of the SET Index (the Stock Exchange of Thailand benchmark) — current level, change, and the day's open/high/low. Pass name (SET; default SET).",
        "open": 1588.1,
        "index": "SET",
        "value": 1592.41,
        "change": 20.090000000000146,
        "source": "Stock Exchange of Thailand / SET (TradingView)",
        "change_percent": 1.28
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:42.507Z",
        "request_id": "8cbd8f77-f3d9-43f1-a51e-44b41e05edea"
    },
    "status": "ok",
    "message": "Index retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "sample": {
            "set_index": 1592.41
        },
        "source": "TradingView public screener (scanner.tradingview.com/thailand/scan), keyless",
        "indexes": [
            "SET"
        ],
        "screens": [
            "gainers",
            "losers",
            "active",
            "marketcap"
        ],
        "service": "set-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/index": "Live value of the SET Index (name).",
            "GET /v1/quote": "Live quote for one or more stocks (codes).",
            "GET /v1/screener": "Ranked market screener (by, limit)."
        },
        "description": "Live data for the Stock Exchange of Thailand (SET, the Bangkok 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 baht, with the company name), a ranked market screener (top gainers, losers, most active, or largest by market cap), and the live value of the SET Index. The Thailand-equities / SET-index / screener layer for trading dashboards and research. Distinct from other exchange readers — the SET market with a built-in screener. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-15T02:10:42.582Z",
        "request_id": "4cf433e7-a897-4bbd-aee3-5b6d672132cf"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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