# KCC Chain API
> Live on-chain data for KuCoin Community Chain (KCC) — an EVM Layer 1 backed by the KuCoin community — via its public Blockscout explorer (no wallet, no key). The stats endpoint returns chain-wide totals (blocks, transactions, addresses, average block time, gas used); gas gives the current gas-price oracle (slow/average/fast). Blocks lists the latest blocks, and a single block resolves by height or by hash with its transaction count, gas, validator and timestamp. The address endpoint returns any account's KCS balance, nonce, contract flag and token holdings; transaction resolves a tx by hash with its from/to, value in KCS, fee, status and block. The token endpoint returns an ERC-20 token's metadata (name, symbol, decimals, total supply, holders) by contract address, and search runs a universal lookup across addresses, tokens, blocks and transactions. Gas, balances, values and fees are denominated in KCS, the native coin. Real on-chain data straight from the explorer, refreshed every call — no key. 9 endpoints. For multi-chain coverage combine with the other oanor chain APIs (Ethereum, Base, Arbitrum and more).

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

## Pricing
- **Free** (Free) — 3,000 calls/Mo, 2 req/s
- **Basic** ($21/Mo) — 105,000 calls/Mo, 8 req/s
- **Pro** ($64/Mo) — 665,000 calls/Mo, 20 req/s
- **Mega** ($215/Mo) — 3,650,000 calls/Mo, 50 req/s

## Endpoints

### Chain

#### `GET /v1/gas` — Gas-price oracle

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

**Response:**
```json
{
    "data": {
        "fast": 1.27,
        "slow": 1.26,
        "unit": "gwei",
        "average": 1.26,
        "gas_used_today": "257025120"
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:35.799Z",
        "request_id": "d5dc2f84-37c5-4c73-b71d-27f6c4727336"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/stats` — Chain stats

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 1.27,
            "slow": 1.26,
            "average": 1.26
        },
        "total_blocks": 52788207,
        "coin_price_usd": null,
        "gas_used_today": "257025120",
        "market_cap_usd": 0,
        "total_addresses": "1192762",
        "total_transactions": "225874322",
        "transactions_today": "2347",
        "network_utilization_percent": 0.0249375
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:36.159Z",
        "request_id": "d5ff5841-70f1-4343-816d-40e9e31835af"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Blocks

#### `GET /v1/block` — A block by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height Example: `52783788`
- `hash` (query, optional, string) — Block hash (alternative to height)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kcc-api/v1/block?height=52783788"
```

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0xa3759d7945888300a383de55c37099b27ef5bee6fd9805c765353defa33141b3",
            "size": 1290,
            "miner": "0xb90Cced3FAE6FA08b70EEaaf9EC2aD650f2c1aB5",
            "height": 52783788,
            "gas_used": 152262,
            "tx_count": 2,
            "gas_limit": 20000000,
            "timestamp": "2026-06-08T05:37:06.000000Z",
            "burnt_fees": "0",
            "difficulty": "2",
            "base_fee_per_gas": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:36.526Z",
        "request_id": "31b74f6d-eda4-4c00-8bcb-304b59e9a2df"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/blocks` — Latest blocks

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x68e20d049ddbbfbbeb8ec2892503ac6d88f146209ace15f8fc9a100b8c833603",
                "size": 611,
                "miner": "0x622537dCE67DF1e4C3411A3B476B0066eA4684CF",
                "height": 52788837,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 20000000,
                "timestamp": "2026-06-08T09:49:33.000000Z",
                "burnt_fees": "0",
                "difficulty": "2",
                "base_fee_per_gas": null
            },
            {
                "hash": "0x4e2b102f6bfe313816a57c344ee7df8174f5e579a86beba719239c6fea5524d7",
                "size": 611,
                "miner": "0x50eD8C7eba4C70ef047555b9055C20903041aeAa",
                "height": 52788836,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 20000000,
                "timestamp": "2026-06-08T09:49:30.000000Z",
                "burnt_fees": "0",
                "difficulty": "2",
                "base_fee_per_gas": null
            },
            {
                "hash": "0xae7864f8515a2759157a5655752599f009b0312e6469715c91bf45413bab6867",
                "size": 611,
                "miner": "0x1A2FE86a691e3056DEdFdF01b5D0F2cD0a012357",
                "height": 52788835,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 20000000,
                "timestamp": "2026-0
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Account balance & holdings

**Parameters:**
- `address` (query, required, string) — Account address (0x + 40 hex) Example: `0x306BBa4971c5eF86d6E1A178BaaD0155ad4A30Aa`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kcc-api/v1/address?address=0x306BBa4971c5eF86d6E1A178BaaD0155ad4A30Aa"
```

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x306BBa4971c5eF86d6E1A178BaaD0155ad4A30Aa",
            "name": null,
            "token": null,
            "creator": null,
            "balance_kcs": 7.037409909025785,
            "balance_wei": "7037409909025785127",
            "is_contract": false,
            "is_verified": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:37.280Z",
        "request_id": "14d7482e-09ed-4ca0-9a33-00be7da0db85"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

#### `GET /v1/transaction` — A transaction by hash

**Parameters:**
- `hash` (query, required, string) — Transaction hash (0x + 64 hex) Example: `0xfe44441baba3fe5bbe88c8b85138533b29873028a0c913ffdc06501930f2b889`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kcc-api/v1/transaction?hash=0xfe44441baba3fe5bbe88c8b85138533b29873028a0c913ffdc06501930f2b889"
```

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0xe75b8525604dF746232c63BC0E831b323400A22F",
            "from": "0x306BBa4971c5eF86d6E1A178BaaD0155ad4A30Aa",
            "hash": "0xfe44441baba3fe5bbe88c8b85138533b29873028a0c913ffdc06501930f2b889",
            "type": 0,
            "block": 52783788,
            "nonce": 1054305,
            "method": "transmit",
            "status": "ok",
            "fee_kcs": 7.6137e-5,
            "fee_wei": "76137000000000",
            "gas_used": 76137,
            "gas_price": "1000000000",
            "timestamp": "2026-06-08T05:37:06.000000Z",
            "value_kcs": 0,
            "value_wei": "0",
            "confirmations": 5051
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:37.726Z",
        "request_id": "a65697ff-c600-4540-bff4-1272ebaa740a"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Tokens

#### `GET /v1/token` — ERC-20 token metadata

**Parameters:**
- `address` (query, required, string) — Token contract address Example: `0x0039f574eE5cC39bdD162E9A88e3EB1f111bAF48`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kcc-api/v1/token?address=0x0039f574eE5cC39bdD162E9A88e3EB1f111bAF48"
```

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "KCC-Peg Tether USD",
            "type": "ERC-20",
            "symbol": "USDT",
            "address": "0x0039f574eE5cC39bdD162E9A88e3EB1f111bAF48",
            "holders": 73412,
            "decimals": 18,
            "total_supply": "8767163117773771897918844",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:38.109Z",
        "request_id": "b4c20a09-4485-49ba-b033-f04bd42e7632"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### Search

#### `GET /v1/search` — Universal search

**Parameters:**
- `q` (query, required, string) — Address, token, block or tx Example: `USDT`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kcc-api/v1/search?q=USDT"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "query": "USDT",
        "results": [
            {
                "name": "KCC-Peg Tether USD",
                "type": "token",
                "symbol": "USDT",
                "address": "0x0039f574eE5cC39bdD162E9A88e3EB1f111bAF48"
            },
            {
                "name": "Torches USDT",
                "type": "token",
                "symbol": "tUSDT",
                "address": "0x92dBEA1Ac6278a0b4AEC11388C94F8fAFBE246C1"
            },
            {
                "name": "KCC-Peg Tether USD",
                "type": "token",
                "symbol": "USDT",
                "address": "0x0597d1e433AD636Bb18FE80b8391FB5B17EAaCb8"
            },
            {
                "name": "Compound USDT",
                "type": "token",
                "symbol": "cUSDT",
                "address": "0x138AC929781F12d2470514e9195339113892DffB"
            },
            {
                "name": "KCC-Peg Tether USD",
                "type": "token",
                "symbol": "USDT",
                "address": "0xE59534c53059deA1DF702BE7c33a057452a4b1Da"
            },
            {
                "name": "KSC-USDT",
                "type": "token",
                "symbol": "KSC-USDT",
                "address": "0x90f82CC8377D50f822B2B33fF9bFf45FbbDF3617"
            },
            {
                "name": "Tether USD",
                "type": "token",
                "symbol": "USDT",
                "address": "0
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "service": "kcc-api",
        "endpoints": {
            "GET /v1/gas": "Gas oracle (slow/average/fast in gwei).",
            "GET /v1/meta": "This document.",
            "GET /v1/block": "Block detail by height= or hash=.",
            "GET /v1/stats": "Network stats (blocks, txns, coin price, market cap, gas).",
            "GET /v1/token": "ERC-20 token detail by contract (address=).",
            "GET /v1/blocks": "The most recent blocks.",
            "GET /v1/search": "Search addresses, tokens, blocks & txns (q=).",
            "GET /v1/address": "Address balance, ENS & contract info (address=).",
            "GET /v1/transaction": "Transaction detail (hash=)."
        },
        "description": "Live KuCoin Community Chain on-chain data via Blockscout: network stats, a gas oracle (gwei), recent blocks and block detail, address balances with ENS, transaction detail, ERC-20 token detail and a universal search across addresses, tokens, blocks and transactions. KCC (KuCoin Community Chain) is an EVM Layer 1; gas, balances and fees are in KCS. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:39.031Z",
        "request_id": "8a2c3614-ac0d-49f1-b224-4b49f300d2b1"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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