# Canto Chain API
> Real-time on-chain data for Canto (chain-id 7700), a permissionless, public-good EVM-compatible Layer-1 built on the Cosmos SDK with Ethermint and focused on free public DeFi infrastructure with CANTO as its native coin. The status endpoint returns the chain id, network id, latest block height, native symbol and node client version so you can confirm the chain is live and synced. The block endpoint returns a block by decimal or 0x-hex height — or the latest block when no height is given — with its hash, parent hash, timestamp (raw and ISO), transaction count, gas used and limit, base fee and miner. The gas endpoint returns the current gas price in both wei and gwei at the latest block. The balance endpoint returns the native CANTO balance (in wei and human-readable units) and the transaction count (nonce) for any 0x address. The meta endpoint documents the chain id, decimals and ecosystem. Reads a live Canto JSON-RPC node directly, so values are current to the latest block. Live, nothing stored. 5 endpoints. This serves native-coin and chain data; for ERC-20 token balances or contract calls use a dedicated token/contract API.

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

## Pricing
- **Free** (Free) — 250 calls/Mo, 2 req/s
- **Basic** ($12/Mo) — 21,500 calls/Mo, 5 req/s
- **Pro** ($34/Mo) — 118,000 calls/Mo, 20 req/s
- **Mega** ($76/Mo) — 540,000 calls/Mo, 60 req/s

## Endpoints

### Chain

#### `GET /v1/block` — Block by height or latest

**Parameters:**
- `number` (query, optional, string) — Block height (decimal or 0x-hex) or 'latest'. Omit for the latest block.

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

**Response:**
```json
{
    "data": {
        "hash": "0x6cd433d491a36dc89da912b87d0a9abc38a184bf7a8486afad6a75ad02a0a79f",
        "miner": "0x0c047b0f49264c27cd14cd786dcff2b9300bce88",
        "number": 21077628,
        "gas_used": 0,
        "gas_limit": 30000000,
        "timestamp": 1781556055,
        "size_bytes": 1766,
        "parent_hash": "0xc0744535d81fcc6076a9ea26e4b931333af3e8562a5c21e6ad68992644d8603a",
        "timestamp_iso": "2026-06-15T20:40:55.000Z",
        "transaction_count": 0,
        "base_fee_per_gas_wei": "50000000000"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:06.422Z",
        "request_id": "5afa8ad8-f29a-43d4-a25d-17c72b4141c3"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "at_block": 21077629,
        "gas_price_wei": "53125000000",
        "native_symbol": "CANTO",
        "gas_price_gwei": 53.125
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:07.059Z",
        "request_id": "6606b69d-de89-46da-9441-38adef62c917"
    },
    "status": "ok",
    "message": "Gas price retrieved successfully",
    "success": true
}
```

#### `GET /v1/status` — Chain status

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

**Response:**
```json
{
    "data": {
        "chain": "Canto",
        "chain_id": 7700,
        "network_id": 7700,
        "rpc_healthy": true,
        "latest_block": 21077629,
        "native_symbol": "CANTO",
        "client_version": "Version dev ()\nCompiled at  using Go go1.22.0 (amd64)"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:07.685Z",
        "request_id": "a8a6f6a8-eb69-40a6-8588-6ad5c4c53fe0"
    },
    "status": "ok",
    "message": "Chain status retrieved successfully",
    "success": true
}
```

### Account

#### `GET /v1/balance` — Native CANTO balance for an address

**Parameters:**
- `address` (query, required, string) — 0x-prefixed 40-hex EVM address Example: `0x000000000000000000000000000000000000dEaD`

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

**Response:**
```json
{
    "data": {
        "address": "0x000000000000000000000000000000000000dEaD",
        "balance": "5036.454904069129897071",
        "balance_wei": "5036454904069129897071",
        "native_symbol": "CANTO",
        "transaction_count": 0
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:07.937Z",
        "request_id": "58bd7a41-799e-4966-b81c-0c20f466d711"
    },
    "status": "ok",
    "message": "Balance retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "type": "EVM Layer-1 (Cosmos SDK + Ethermint)",
        "chain": "Canto",
        "network": "mainnet",
        "chain_id": 7700,
        "decimals": 18,
        "ecosystem": "Canto — a permissionless, public-good EVM Layer-1 for DeFi, native coin CANTO",
        "endpoints": [
            "/v1/status",
            "/v1/block",
            "/v1/gas",
            "/v1/balance",
            "/v1/meta"
        ],
        "description": "Canto is a permissionless, public-good EVM-compatible Layer-1 (Cosmos SDK / Ethermint) focused on free public DeFi infrastructure, with CANTO as its native coin.",
        "documentation": "https://canto-api.oanor.dev",
        "native_symbol": "CANTO"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:08.040Z",
        "request_id": "64cb2256-ea91-4c50-8017-a3f800b84836"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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