# TAC API
> Live TAC on-chain data via Blockscout. TAC is the TON Application Chain, an EVM layer that brings Ethereum apps to the TON ecosystem; gas and balances are in TAC. Network stats, gas prices, latest blocks, a block by height or hash, address detail with TAC 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/tac-api/..."
```

## Pricing
- **Free** (Free) — 1,900 calls/Mo, 1 req/s
- **Basic** ($14/Mo) — 82,500 calls/Mo, 10 req/s
- **Pro** ($42/Mo) — 560,000 calls/Mo, 20 req/s
- **Mega** ($131/Mo) — 2,850,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/tac-api/v1/gas"
```

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

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

### Blocks

#### `GET /v1/block` — A block by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height Example: `20553953`
- `hash` (query, optional, string) — Block hash

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

#### `GET /v1/blocks` — Latest blocks

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

### Accounts

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

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

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

### Transactions

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

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

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

### Tokens

#### `GET /v1/token` — ERC-20 token metadata

**Parameters:**
- `address` (query, required, string) — Token contract address Example: `0xAF988C3f7CB2AceAbB15f96b19388a259b6C438f`

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

### Search

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

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

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

### Meta

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

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


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