# 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"
```

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

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

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

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

### 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"
```

### Meta

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

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


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