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

**Response:**
```json
{
    "data": {
        "state": "active",
        "source": "toncenter",
        "address": "-1:5555555555555555555555555555555555555555555555555555555555555555",
        "is_active": true,
        "balance_ton": 2475.547956013,
        "balance_nano": "2475547956013",
        "last_transaction": {
            "lt": "83036841000003",
            "hash": "SQUm1aFZ9ev8M5dlwmeIeCvawF45kmEO8l42z6PqD+s="
        }
    },
    "meta": {
        "timestamp": "2026-06-11T16:47:25.106Z",
        "request_id": "fa0e7fe4-3c65-4e99-b4a4-2fc954329831"
    },
    "status": "ok",
    "message": "Account retrieved successfully",
    "success": true
}
```

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

**Response:**
```json
{
    "data": {
        "count": 10,
        "source": "toncenter",
        "address": "-1:3333333333333333333333333333333333333333333333333333333333333333",
        "transactions": [
            {
                "lt": "83036842000002",
                "hash": "0tG9ORdOQq/MDRZ7qcrhDi+H8banppmvtuP6ZQepkzg=",
                "time": "2026-06-11T16:47:24.000Z",
                "utime": 1781196444,
                "fee_ton": 0,
                "in_from": "Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU",
                "out_count": 0,
                "in_value_ton": 2.702524941,
                "out_value_ton": 0
            },
            {
                "lt": "83036842000001",
                "hash": "Xct8D5Bww8LfGTAVnpAB/6ht4Vn/D7plcbkm14G/NjM=",
                "time": "2026-06-11T16:47:24.000Z",
                "utime": 1781196444,
                "fee_ton": 0,
                "in_from": null,
                "out_count": 0,
                "in_value_ton": null,
                "out_value_ton": 0
            },
            {
                "lt": "83036841000002",
                "hash": "yIUs0+xoq3g+HnlVbQ7aBAh6JeEbrXLVmCRdzKcROso=",
                "time": "2026-06-11T16:47:24.000Z",
                "utime": 1781196444,
                "fee_ton": 0,
                "in_from": "Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU",
                "out_count": 0,
                "in_value_ton": 2.70161076,
                "out_value_ton": 0
            },
            {
   
…(truncated, see openapi.json for full schema)
```

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

**Response:**
```json
{
    "data": {
        "chain": "TON",
        "source": "toncenter",
        "latest_block": {
            "seqno": 72672042,
            "shard": "-9223372036854775808",
            "root_hash": "dSYuOAOe6oTMXS5mYTdTYPZWIvIfsGZi0emqJoZyL68=",
            "workchain": -1
        }
    },
    "meta": {
        "timestamp": "2026-06-11T16:47:29.242Z",
        "request_id": "925e22ea-1bb6-4913-a483-5e9784238d42"
    },
    "status": "ok",
    "message": "Network info retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "Balances are in TON (1 TON = 1e9 nanoTON). Addresses accept raw (0:../-1:..) or user-friendly (EQ../UQ..) form. Data is cached briefly to protect the keyless rate-limited upstream; it only changes per block (~5s).",
        "source": "toncenter public API (toncenter.com/api/v2, live)",
        "service": "ton-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/account": "Balance, state and last transaction for an address (address=EQ.. or 0:..).",
            "GET /v1/network": "Latest TON masterchain block (the chain tip).",
            "GET /v1/transactions": "Recent transactions for an address (address=..&limit=10, max 50)."
        },
        "description": "Live on-chain data from The Open Network (TON / Toncoin), the blockchain integrated with Telegram, read from the public toncenter API. The network endpoint returns the latest masterchain block; the account endpoint returns any address's balance (TON and nanoTON), state and last-transaction reference; the transactions endpoint returns an address's most recent transactions with counterparties, value, fee and time. Live, no key, nothing stored. Blockchain/network data, distinct from the exchange-ticker and market APIs.",
        "latest_seqno": 72672042,
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-11T16:47:29.332Z",
        "request_id": "17c8e6ce-69f4-491f-aeb8-8e27a8667ec4"
    },
    "status": "ok",
    "
…(truncated, see openapi.json for full schema)
```


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