# Tezos Smart Contract API
> Browse Tezos smart contracts live from the public TzKT indexer — no key. On Tezos a smart contract is an originated KT1 account with Michelson code, on-chain storage and named entrypoints. The Tezos on-chain reader resolves a single address's account state, but it cannot browse the contract universe, rank contracts by balance or activity, read a contract's callable entrypoints, or read its code identity. This opens that. Browse and rank the deployed smart contracts with their KT1 address, XTZ balance, creator, lifetime transaction count and token activity; read one contract in full — its balance, creator, code/type hash (contracts sharing a code hash run identical Michelson) and current delegate; and read the named entrypoints a contract exposes — its callable interface, each method with its parameter schema. The contract layer for Tezos explorers, dApp dashboards, wallets and analytics. Distinct from the Tezos on-chain reader (per-address account state), the self-amending governance reader, the baker reader, the FA-token registry and the .tez naming reader. Live from the indexer; short cache only.

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

## Pricing
- **Free** (Free) — 8,800 calls/Mo, 3 req/s
- **Starter** ($9/Mo) — 166,000 calls/Mo, 10 req/s
- **Pro** ($30/Mo) — 870,000 calls/Mo, 25 req/s
- **Scale** ($84/Mo) — 5,350,000 calls/Mo, 60 req/s

## Endpoints

### Contracts

#### `GET /v1/contracts` — Browse/rank Tezos smart contracts

**Parameters:**
- `limit` (query, optional, string) — Page size (1-100) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tezoscontracts-api/v1/contracts?limit=25"
```

**Response:**
```json
{
    "data": {
        "note": "Browse Tezos smart contracts (originated KT1 accounts) ranked by XTZ balance — each with its address, alias, balance, creator, lifetime transaction count and token activity. The discovery layer the per-address account reader can't give you. Paginate with limit; read one in /v1/contract, its interface in /v1/entrypoints.",
        "count": 25,
        "source": "TzKT",
        "contracts": [
            {
                "alias": null,
                "address": "KT1CeFqjJRJPNVvhvznQrWfHad2jCiDZ6Lyj",
                "creator": "tz1etHLky7fuVumvBDi92ogXQZZPESiFimWR",
                "balance_xtz": 15579954.372733,
                "tokens_count": 0,
                "last_activity": "2026-06-14T17:02:16Z",
                "first_activity": "2024-04-02T13:34:16Z",
                "num_transactions": 121385,
                "token_transfers_count": 0
            },
            {
                "alias": null,
                "address": "KT1Rdn7gRZCgRYTCN5W3V878Rfqksahnx5zK",
                "creator": "KT1CP1C8afHqdNfBsSE3ggQhzM2iMHd4cRyt",
                "balance_xtz": 11603641.834963,
                "tokens_count": 0,
                "last_activity": "2026-06-09T14:29:10Z",
                "first_activity": "2024-04-13T19:13:59Z",
                "num_transactions": 588,
                "token_transfers_count": 0
            },
            {
                "alias": "Sirius DEX",
                "address": "KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU
…(truncated, see openapi.json for full schema)
```

### Contract

#### `GET /v1/contract` — One contract in full

**Parameters:**
- `address` (query, optional, string) — Contract address (KT1...); omit for the highest-balance Example: `KT1CeFqjJRJPNVvhvznQrWfHad2jCiDZ6Lyj`

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

**Response:**
```json
{
    "data": {
        "note": "One Tezos smart contract in full: its XTZ balance, creator, lifetime transaction and token activity, code/type hash (contracts sharing a code hash run identical Michelson) and current delegate. Omit address to use the highest-balance contract.",
        "alias": null,
        "source": "TzKT",
        "address": "KT1CeFqjJRJPNVvhvznQrWfHad2jCiDZ6Lyj",
        "creator": "tz1etHLky7fuVumvBDi92ogXQZZPESiFimWR",
        "delegate": null,
        "code_hash": 252039085,
        "type_hash": 738638697,
        "balance_xtz": 15579954.372733,
        "tokens_count": 0,
        "last_activity": "2026-06-14T17:02:16Z",
        "first_activity": "2024-04-02T13:34:16Z",
        "num_originations": 1,
        "num_transactions": 121385,
        "active_tokens_count": 0,
        "token_transfers_count": 0
    },
    "meta": {
        "timestamp": "2026-06-14T17:03:52.986Z",
        "request_id": "74c356b5-4bd0-4cfc-85e1-cea13979c072"
    },
    "status": "ok",
    "message": "Contract retrieved successfully",
    "success": true
}
```

### Entrypoints

#### `GET /v1/entrypoints` — A contract's named entrypoints

**Parameters:**
- `address` (query, optional, string) — Contract address (KT1...); omit for the highest-balance Example: `KT1CeFqjJRJPNVvhvznQrWfHad2jCiDZ6Lyj`

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

**Response:**
```json
{
    "data": {
        "note": "The named entrypoints a Tezos contract exposes — its callable interface. Each entrypoint is a method (e.g. transfer, mint, burn) with its parameter schema. This is how a wallet or dApp knows what calls a contract accepts. Omit address to use the highest-balance contract.",
        "count": 2,
        "source": "TzKT",
        "address": "KT1CeFqjJRJPNVvhvznQrWfHad2jCiDZ6Lyj",
        "entrypoints": [
            {
                "name": "burn",
                "unused": false,
                "parameters": {
                    "schema:object": {
                        "ticket:ticket": {
                            "amount:nat": "nat",
                            "content:object": {
                                "nat:nat": "nat",
                                "bytes:?bytes": "bytes"
                            },
                            "address:address": "address"
                        },
                        "address:address": "address"
                    }
                }
            },
            {
                "name": "mint",
                "unused": false,
                "parameters": {
                    "schema:address": "address"
                }
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-14T17:03:53.085Z",
        "request_id": "fd666632-a235-43eb-ba2b-7c0be34ac083"
    },
    "status": "ok",
    "message": "Entrypoints retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "sample": {
            "top_contract": "KT1CeFqjJRJPNVvhvznQrWfHad2jCiDZ6Lyj"
        },
        "source": "public TzKT indexer (api.tzkt.io), keyless",
        "service": "tezoscontracts-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/contract": "One contract in full: balance, creator, code hash, activity (address; omit for the top).",
            "GET /v1/contracts": "Browse/rank smart contracts by balance (limit).",
            "GET /v1/entrypoints": "A contract's named entrypoints / callable interface (address; omit for the top)."
        },
        "description": "Browse Tezos smart contracts live from the public TzKT indexer: rank originated KT1 contracts by balance and activity, read one contract in full (balance, creator, code hash, token activity), and read a contract's named entrypoints (its callable interface). The contract layer for Tezos explorers, dApp dashboards and analytics. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T17:03:53.331Z",
        "request_id": "6e1855c5-0593-4749-bd8e-78c53edc4d51"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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