# KyberSwap API
> Live DEX-aggregator swap quotes from KyberSwap, which routes a trade across every decentralised exchange and liquidity pool on a chain to find the best output. The quote endpoint prices a swap between two tokens on Ethereum, Arbitrum, Base, Optimism, Polygon or BNB Chain — it returns the amount received, the USD values in and out, the price impact, the estimated gas cost and the DEXs the route passes through. The tokens endpoint lists the supported tokens per chain. The chains endpoint lists supported chains. Read live from KyberSwap, nothing stored. This is KyberSwap's own multi-chain EVM swap-routing and best-price layer — distinct from single-DEX feeds and from Solana swap aggregators.

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

## Pricing
- **Free** (Free) — 2,300 calls/Mo, 3 req/s
- **Starter** ($10/Mo) — 60,000 calls/Mo, 15 req/s
- **Pro** ($27/Mo) — 330,000 calls/Mo, 40 req/s
- **Scale** ($64/Mo) — 1,900,000 calls/Mo, 120 req/s

## Endpoints

### Quote

#### `GET /v1/quote` — Best swap quote between two tokens

**Parameters:**
- `from` (query, required, string) — From token symbol Example: `USDC`
- `to` (query, required, string) — To token symbol Example: `WETH`
- `amount` (query, required, string) — Amount of the from token Example: `1000`
- `chain` (query, optional, string) — ethereum (default), arbitrum, base, optimism, polygon, bsc Example: `ethereum`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kyberswap-api/v1/quote?from=USDC&to=WETH&amount=1000&chain=ethereum"
```

**Response:**
```json
{
    "data": {
        "to": "WETH",
        "gas": 350081,
        "from": "USDC",
        "rate": 0.0006182701,
        "chain": "ethereum",
        "source": "KyberSwap",
        "gas_usd": 0.0556,
        "amount_in": 1000,
        "amount_out": 0.61827007,
        "route_dexs": [
            "kipseli-pamm"
        ],
        "amount_in_usd": 1000.16,
        "amount_out_usd": 1000.02,
        "price_impact_pct": 0.0141
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:39.081Z",
        "request_id": "a0cb1272-9a57-4da9-ab76-e40c1b4819e2"
    },
    "status": "ok",
    "message": "Quote retrieved successfully",
    "success": true
}
```

### Tokens

#### `GET /v1/tokens` — Supported tokens on a chain

**Parameters:**
- `chain` (query, optional, string) — Chain Example: `ethereum`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kyberswap-api/v1/tokens?chain=ethereum"
```

**Response:**
```json
{
    "data": {
        "chain": "ethereum",
        "count": 6,
        "source": "KyberSwap",
        "tokens": [
            {
                "symbol": "ETH",
                "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                "decimals": 18
            },
            {
                "symbol": "WETH",
                "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
                "decimals": 18
            },
            {
                "symbol": "USDC",
                "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                "decimals": 6
            },
            {
                "symbol": "USDT",
                "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
                "decimals": 6
            },
            {
                "symbol": "DAI",
                "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
                "decimals": 18
            },
            {
                "symbol": "WBTC",
                "address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
                "decimals": 8
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:39.167Z",
        "request_id": "e91c89e7-a731-4fd7-b166-ca63a6bff9a2"
    },
    "status": "ok",
    "message": "Tokens retrieved successfully",
    "success": true
}
```

### Chains

#### `GET /v1/chains` — All supported chains

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

**Response:**
```json
{
    "data": {
        "count": 6,
        "chains": [
            {
                "chain": "ethereum",
                "tokens": 6
            },
            {
                "chain": "arbitrum",
                "tokens": 6
            },
            {
                "chain": "base",
                "tokens": 4
            },
            {
                "chain": "optimism",
                "tokens": 5
            },
            {
                "chain": "polygon",
                "tokens": 6
            },
            {
                "chain": "bsc",
                "tokens": 4
            }
        ],
        "source": "KyberSwap"
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:39.257Z",
        "request_id": "b8a3531e-b3cd-448f-8ecb-a42608f842d8"
    },
    "status": "ok",
    "message": "Chains retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "chains": [
            "ethereum",
            "arbitrum",
            "base",
            "optimism",
            "polygon",
            "bsc"
        ],
        "source": "KyberSwap Aggregator API (aggregator-api.kyberswap.com, live)",
        "service": "kyberswap-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/quote": "Best swap quote between two tokens (chain=ethereum, from=USDC, to=WETH, amount=1000).",
            "GET /v1/chains": "All supported chains.",
            "GET /v1/tokens": "Supported tokens on a chain (chain=ethereum)."
        },
        "description": "Live DEX-aggregator swap quotes from KyberSwap, which routes a trade across every decentralised exchange and liquidity pool on a chain to find the best output. The quote endpoint prices a swap between two tokens on Ethereum, Arbitrum, Base, Optimism, Polygon or BNB Chain — amount received, USD values in and out, price impact, estimated gas cost and the DEXs the route passes through; the tokens endpoint lists supported tokens per chain; the chains endpoint lists supported chains. Live, no key, nothing stored. Distinct from single-DEX feeds and from Solana swap aggregators — this is KyberSwap's own multi-chain EVM swap-routing and best-price layer.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:39.470Z",
        "request_id": "6a9d5296-1600-4b94-9f99-a9af7b94d654"
    },
    "status": "
…(truncated, see openapi.json for full schema)
```


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