# Ink API
> Live Ink on-chain data via Blockscout. Ink is Kraken's Ethereum L2 built on the OP Stack; gas and balances are in ETH. Network stats, gas prices, latest blocks, a block by height or hash, address detail with ETH balance, a transaction by hash, ERC-20 token metadata and a universal search across addresses, tokens, blocks and transactions. Real data, no key.

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

## Pricing
- **Free** (Free) — 1,300 calls/Mo, 1 req/s
- **Basic** ($12/Mo) — 72,000 calls/Mo, 10 req/s
- **Pro** ($38/Mo) — 480,000 calls/Mo, 20 req/s
- **Mega** ($125/Mo) — 2,300,000 calls/Mo, 50 req/s

## Endpoints

### Network

#### `GET /v1/gas` — Current gas prices

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

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": "78021324822"
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:50.831Z",
        "request_id": "7d86cefe-06c7-4202-99fd-ee86e330fab6"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/stats` — Network statistics

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 47412804,
        "coin_price_usd": 1664.18,
        "gas_used_today": "78021324822",
        "market_cap_usd": 200840716224.72644,
        "total_addresses": "8673905",
        "total_transactions": "277858611",
        "transactions_today": "445152",
        "network_utilization_percent": 3.4256232
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:51.080Z",
        "request_id": "1aa22efc-42ae-47a9-818f-96d16f9f7677"
    },
    "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: `47382965`
- `hash` (query, optional, string) — Block hash

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x23d6b8e10fca2f98fc6058dc892a8440fddf3e602527a16fe2b03bcd0c62e644",
            "size": 4260,
            "miner": "0x4200000000000000000000000000000000000011",
            "height": 47382965,
            "reward": "60856713865",
            "gas_used": 508989,
            "tx_count": 5,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T01:16:16.000000Z",
            "burnt_fees": "139971975",
            "difficulty": "0",
            "base_fee_per_gas": "275"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:51.290Z",
        "request_id": "a53c2c4d-a464-4512-aa18-43423a1080f7"
    },
    "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/ink-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0xf1283fa91b1117cdea501ae5b7fc711e389909bb2b91f4b7ed1b0d3b3932573a",
                "size": 4177,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 47413893,
                "reward": "18286453815",
                "gas_used": 519115,
                "tx_count": 5,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:51:44.000000Z",
                "burnt_fees": "145352200",
                "difficulty": "0",
                "base_fee_per_gas": "280"
            },
            {
                "hash": "0x3d8a0dbcda2744fbeee4f216d6dddba7fc2c2befe78229091e755cde29dabd1a",
                "size": 4177,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 47413892,
                "reward": "18286498031",
                "gas_used": 519115,
                "tx_count": 5,
                "gas_limit": 30000000,
                "timestamp": "2026-06-08T09:51:43.000000Z",
                "burnt_fees": "145352200",
                "difficulty": "0",
                "base_fee_per_gas": "280"
            },
            {
                "hash": "0xc7c401ab19d79acd74c7bf64a1bfab596a6eb99df29880416516066e83a037c7",
                "size": 4177,
                "miner": "0x4200000000000000000000000000000000000011",
                "height": 47413891,
                "reward"
…(truncated, see openapi.json for full schema)
```

### Accounts

#### `GET /v1/address` — Address detail with ETH balance

**Parameters:**
- `address` (query, required, string) — Address hash Example: `0x2D270e6886d130D724215A266106e6832161EAEd`

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x2D270e6886d130D724215A266106e6832161EAEd",
            "name": "FiatTokenProxy",
            "token": {
                "name": "USDC",
                "type": "ERC-20",
                "symbol": "USDC"
            },
            "creator": null,
            "balance_eth": 0,
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": true
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:57.478Z",
        "request_id": "bd80a804-282a-48f5-893e-64cd81194f7f"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

**Parameters:**
- `hash` (query, required, string) — Transaction hash Example: `0x30dd33a6837a4e60a78d5c5329539548ef1b8d6d3975b18998d4602c7e9077ae`

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x4200000000000000000000000000000000000015",
            "from": "0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001",
            "hash": "0x30dd33a6837a4e60a78d5c5329539548ef1b8d6d3975b18998d4602c7e9077ae",
            "type": 126,
            "block": 47382965,
            "nonce": 47382966,
            "method": "setL1BlockValuesJovian",
            "status": "ok",
            "fee_eth": 0,
            "fee_wei": "0",
            "gas_used": 57418,
            "gas_price": "0",
            "timestamp": "2026-06-08T01:16:16.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 30937
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:59.949Z",
        "request_id": "f40aae4b-1dc8-48bf-8845-a59a1aa5980c"
    },
    "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: `0x2D270e6886d130D724215A266106e6832161EAEd`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": "https://assets.coingecko.com/coins/images/6319/small/USDC.png?1769615602",
            "name": "USDC",
            "type": "ERC-20",
            "symbol": "USDC",
            "holders": null,
            "decimals": 6,
            "total_supply": "79279042260732",
            "exchange_rate_usd": 0.99962,
            "circulating_market_cap": "75545440075.5318"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:52:00.236Z",
        "request_id": "c15a08ca-4bc1-419a-a277-49cd5fe5a116"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### Search

#### `GET /v1/search` — Universal on-chain search

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

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "query": "USDC",
        "results": [
            {
                "name": "USDC",
                "type": "token",
                "symbol": "USDC",
                "address": "0x2D270e6886d130D724215A266106e6832161EAEd"
            },
            {
                "name": "Stargate Bridged USDC",
                "type": "token",
                "symbol": "USDC.E",
                "address": "0xF1815bd50389c46847f0Bda824eC8da914045D14"
            },
            {
                "name": "Advanced Strategies USDC",
                "type": "token",
                "symbol": "sentoraUSDC",
                "address": "0x9761DDF8e79930b334f1Be1BD93aBE3695061CcA"
            },
            {
                "name": "ICHI Vault Liquidity",
                "type": "token",
                "symbol": "IV-RSRVR-USDC.e-WETH-3000",
                "address": "0xB3d903BE7FC055DE1Fd69BB599f36ACDCe83b7Be"
            },
            {
                "name": "Boosted Yield USDC",
                "type": "token",
                "symbol": "boostedUSDC",
                "address": "0xDbD87325D7b1189Dcc9255c4926076fF4a96A271"
            },
            {
                "name": "Balanced Yield USDC",
                "type": "token",
                "symbol": "balancedUSDC",
                "address": "0xcaae49fb7f74cCFBE8A05E6104b01c097a78789f"
            },
            {
                "name": "ICHI Vault Liquidity",
                "type": "tok
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "ink-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 Ink (Kraken L2) 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. Ink is Kraken's Ethereum L2 (OP Stack); gas and balances are in ETH. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:52:01.249Z",
        "request_id": "b0987a78-c083-4ad0-bb2e-bc1ac7774137"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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