# TON Blockchain API
> Live on-chain data from The Open Network (TON / Toncoin), the layer-1 blockchain integrated with Telegram — no key, nothing cached, nothing stored. The network endpoint returns the latest masterchain block (the chain tip). The account endpoint returns any TON address's balance (in TON and nanoTON), account state and last-transaction reference. The transactions endpoint returns an address's most recent transactions with counterparties, value, fee and time. Addresses accept raw (0:.. / -1:..) or user-friendly (EQ.. / UQ..) form. This is live blockchain and network data straight from the public TON node API — distinct from the exchange-ticker, price and market APIs in the catalogue. Built for TON wallets, explorers, dashboards and on-chain analytics.

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

## Pricing
- **Free** (Free) — 20,000 calls/Mo, 3 req/s
- **Starter** ($9/Mo) — 265,000 calls/Mo, 10 req/s
- **Growth** ($25/Mo) — 1,225,000 calls/Mo, 25 req/s
- **Scale** ($58/Mo) — 4,380,000 calls/Mo, 50 req/s

## Endpoints

### Account

#### `GET /v1/account` — Balance, state and last transaction for an address

**Parameters:**
- `address` (query, required, string) — TON address (raw 0:../-1:.. or EQ../UQ..) Example: `-1:5555555555555555555555555555555555555555555555555555555555555555`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ton-api/v1/account?address=-1%3A5555555555555555555555555555555555555555555555555555555555555555"
```

### Transactions

#### `GET /v1/transactions` — Recent transactions for an address

**Parameters:**
- `address` (query, required, string) — TON address Example: `-1:3333333333333333333333333333333333333333333333333333333333333333`
- `limit` (query, optional, string) — Max results (1-50) Example: `10`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ton-api/v1/transactions?address=-1%3A3333333333333333333333333333333333333333333333333333333333333333&limit=10"
```

### Network

#### `GET /v1/network` — Latest TON masterchain block (chain tip)

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

### Meta

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

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


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