# GOAT Network API
> Live GOAT Network on-chain data via Blockscout. GOAT Network is a Bitcoin-staking Layer 2; gas and balances are in BTC. Network stats, gas prices, latest blocks, a block by height or hash, address detail with BTC 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/goat-api/..."
```

## Pricing
- **Free** (Free) — 1,750 calls/Mo, 1 req/s
- **Basic** ($12/Mo) — 71,500 calls/Mo, 10 req/s
- **Pro** ($39/Mo) — 515,500 calls/Mo, 20 req/s
- **Mega** ($123/Mo) — 2,630,500 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/goat-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": "537177944"
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:13.735Z",
        "request_id": "675957fd-3007-4e6c-8f6b-6dad560984c9"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 12924992,
        "coin_price_usd": null,
        "gas_used_today": "537177944",
        "market_cap_usd": 0,
        "total_addresses": "1285923",
        "total_transactions": "12602232",
        "transactions_today": "4865",
        "network_utilization_percent": 0.0251882
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:14.005Z",
        "request_id": "d85921b1-90a1-4897-be5d-c3bc5675925e"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Blocks

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

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

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x9f39434642a6e705d82e29f08296368e6d081dbd19d87ca6c2b1aed7e4ded934",
            "size": 1869,
            "miner": "0xDc14833d92d96d7D058d6C34DAd6b759E75a993a",
            "height": 12919634,
            "gas_used": 157011,
            "tx_count": 4,
            "gas_limit": 60000000,
            "timestamp": "2026-06-08T03:50:59.000000Z",
            "burnt_fees": "1099077",
            "difficulty": "0",
            "base_fee_per_gas": "7"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:14.272Z",
        "request_id": "63007904-ca7a-49f9-a495-f772fd4f7ab2"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x7b6a54121cdc7a2fbba7a249c24dc9931fbccd5abc96059c2c6cf69d56b1ddc2",
                "size": 648,
                "miner": "0xA95BfFd6e8696D576bfe17daE08364642cdf8d5C",
                "height": 12925932,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 60000000,
                "timestamp": "2026-06-08T09:50:11.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0xb8037f85c24765f0fcbea1fb719b1024fe0e951cdeec48c67631d6fd94947a89",
                "size": 648,
                "miner": "0xDc14833d92d96d7D058d6C34DAd6b759E75a993a",
                "height": 12925931,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 60000000,
                "timestamp": "2026-06-08T09:50:07.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0xa9974b4a791d72524fbe476823074dd12be3b133c126e0755f11076720b3c66f",
                "size": 648,
                "miner": "0xA95BfFd6e8696D576bfe17daE08364642cdf8d5C",
                "height": 12925930,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 60000000,
                "timestamp": "2026-06-
…(truncated, see openapi.json for full schema)
```

### Accounts

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

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x3022b87ac063DE95b1570F46f5e470F8B53112D8",
            "name": "FiatTokenProxy",
            "token": {
                "name": "Bridged USDC (Stargate)",
                "type": "ERC-20",
                "symbol": "USDC.e"
            },
            "creator": "0x565786AbE5BA0f9D307AdfA681379F0788bEdEf7",
            "balance_btc": 0,
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": true
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:15.205Z",
        "request_id": "bcab46fa-7dfc-45ff-8436-661d2fa4f01a"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x3c2269811836af69497E5F486A85D7316753cf62",
            "from": "0x339d413CCEfD986b1B3647A9cfa9CBbE70A30749",
            "hash": "0x8da6b62132615bdecd207bc1b7b72dc0a09c43ddaf4e4df67a027fcae0be2d79",
            "type": 0,
            "block": 12919634,
            "nonce": 486823,
            "method": "0x3161b7f6",
            "status": "ok",
            "fee_btc": 5.92284372e-9,
            "fee_wei": "5922843720",
            "gas_used": 37965,
            "gas_price": "156008",
            "timestamp": "2026-06-08T03:50:59.000000Z",
            "value_btc": 0,
            "value_wei": "0",
            "confirmations": 6299
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:15.553Z",
        "request_id": "94a76a90-d490-4856-b1f3-2721623791ad"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Tokens

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

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

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Bridged USDC (Stargate)",
            "type": "ERC-20",
            "symbol": "USDC.e",
            "holders": null,
            "decimals": 6,
            "total_supply": "145583866236",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:15.846Z",
        "request_id": "6aa0e208-2621-40c2-8000-990f101f14c9"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

### 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/goat-api/v1/search?q=USD"
```

**Response:**
```json
{
    "data": {
        "count": 11,
        "query": "USD",
        "results": [
            {
                "name": "Bridged USDC (Stargate)",
                "type": "token",
                "symbol": "USDC.e",
                "address": "0x3022b87ac063DE95b1570F46f5e470F8B53112D8"
            },
            {
                "name": "Bridged stgUSDT",
                "type": "token",
                "symbol": "USDT",
                "address": "0xE1AD845D93853fff44990aE0DcecD8575293681e"
            },
            {
                "name": "Avalon Avalon USDC",
                "type": "token",
                "symbol": "aGoatUSDC",
                "address": "0x0b37eE41a3b80431A444d7F3d9F0edE9023BE000"
            },
            {
                "name": "Avalon Avalon USDT",
                "type": "token",
                "symbol": "aGoatUSDT",
                "address": "0x9a02588DDff4d079cC5BEB1b864B12410049288a"
            },
            {
                "name": "Avalon Avalon Variable Debt USDC",
                "type": "token",
                "symbol": "variableDebtGoatUSDC",
                "address": "0xCb4d00EaaF3562469a397994897e7384A124395a"
            },
            {
                "name": "Avalon Avalon Variable Debt USDT",
                "type": "token",
                "symbol": "variableDebtGoatUSDT",
                "address": "0x02edfFA0298313763803089e92e491C915E0e7dD"
            },
            {
                "name": "USDC",
              
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "goat-api",
        "endpoints": {
            "GET /v1/gas": "Gas oracle (slow/average/fast in gwei).",
            "GET /v1/meta": "This document.",
            "GET /v1/block": "Block detail by height= or hash=.",
            "GET /v1/stats": "Network stats (blocks, txns, coin price, market cap, gas).",
            "GET /v1/token": "ERC-20 token detail by contract (address=).",
            "GET /v1/blocks": "The most recent blocks.",
            "GET /v1/search": "Search addresses, tokens, blocks & txns (q=).",
            "GET /v1/address": "Address balance, ENS & contract info (address=).",
            "GET /v1/transaction": "Transaction detail (hash=)."
        },
        "description": "Live GOAT Network on-chain data via Blockscout: network stats, a gas oracle (gwei), recent blocks and block detail, address balances with ENS, transaction detail, ERC-20 token detail and a universal search across addresses, tokens, blocks and transactions. GOAT Network is a Bitcoin-staking Layer 2; gas and balances are in BTC. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:16.329Z",
        "request_id": "4ec39f3d-799f-4fac-85e3-a4c9dee70041"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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