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

## Pricing
- **Free** (Free) — 1,650 calls/Mo, 1 req/s
- **Basic** ($12/Mo) — 75,500 calls/Mo, 10 req/s
- **Pro** ($38/Mo) — 495,500 calls/Mo, 20 req/s
- **Mega** ($121/Mo) — 2,580,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/bitfinity-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.01,
        "slow": 0.01,
        "unit": "gwei",
        "average": 0.01,
        "gas_used_today": null
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:59.702Z",
        "request_id": "1f3919bd-25c9-4942-959a-1a2fbe7969ce"
    },
    "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/bitfinity-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.01,
            "slow": 0.01,
            "average": 0.01
        },
        "total_blocks": 11677446,
        "coin_price_usd": null,
        "gas_used_today": null,
        "market_cap_usd": 0,
        "total_addresses": "15656",
        "total_transactions": "282796",
        "transactions_today": "0",
        "network_utilization_percent": 0
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:00.216Z",
        "request_id": "8d81ab36-41a9-4070-89b4-421ed782b32f"
    },
    "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: `11543965`
- `hash` (query, optional, string) — Block hash

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

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x9d73de40e7851ebc3adfceb362d0a518349c763e523ff25417f9471411b9f072",
            "size": 23245,
            "miner": "0x0000000000000000000000000000000000000000",
            "height": 11543965,
            "gas_used": 3700327,
            "tx_count": 1,
            "gas_limit": 75000000,
            "timestamp": "2026-05-20T09:57:26.000000Z",
            "burnt_fees": "25902289",
            "difficulty": "0",
            "base_fee_per_gas": "7"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:00.459Z",
        "request_id": "91c8c153-d9ea-45c7-a68f-68939afbf534"
    },
    "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/bitfinity-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x4b5b37ba559d73c57ce3acf592a24dcb49e8b210e219f295c69215a854219aa8",
                "size": 513,
                "miner": "0x0000000000000000000000000000000000000000",
                "height": 11677572,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 75000000,
                "timestamp": "2026-06-08T09:49:26.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0x3116b9972b84e86ba9e81318f8e372b781c3b7fe7f3bd6c8bda0aaf63020cea2",
                "size": 513,
                "miner": "0x0000000000000000000000000000000000000000",
                "height": 11677571,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 75000000,
                "timestamp": "2026-06-08T09:49:14.000000Z",
                "burnt_fees": "0",
                "difficulty": "0",
                "base_fee_per_gas": "7"
            },
            {
                "hash": "0xefafded03538185d708fe38f00cfe656a3c89b872db1e8a51e4042f23af27c8b",
                "size": 513,
                "miner": "0x0000000000000000000000000000000000000000",
                "height": 11677570,
                "gas_used": 0,
                "tx_count": 0,
                "gas_limit": 75000000,
                "timestamp": "2026-06-
…(truncated, see openapi.json for full schema)
```

### Accounts

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

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

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

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x8fa2615bbad97bF6a6d1B8Ae4c790453CC20066f",
            "name": "Gift",
            "token": {
                "name": "Gift",
                "type": "ERC-20",
                "symbol": "GFT"
            },
            "creator": "0x73C1541423273Cb50ea33b1b96D86963E490F655",
            "balance_bft": 0,
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:01.091Z",
        "request_id": "e1cec02b-8fc4-435f-a613-32463a9b8f6f"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

### Transactions

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

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

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

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0xAf322c10333d27F47260Fa94dF1d2d74edaeeE57",
            "from": "0xcf7A8614ac717c440cA407B6fe61799cD7B4ccb3",
            "hash": "0xaa64e1db60bd1d480c9ede3d59108ed619ed58e24da9e947e2a4aab45df16195",
            "type": 2,
            "block": 11543965,
            "nonce": 28,
            "method": "0x3ac923bb",
            "status": "ok",
            "fee_bft": 1.2714226759863656,
            "fee_wei": "1271422675986365649",
            "gas_used": 3700327,
            "gas_price": "343597383687",
            "timestamp": "2026-05-20T09:57:26.000000Z",
            "value_bft": 159001.91999999998,
            "value_wei": "159001920000000000000000",
            "confirmations": 133608
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:01.378Z",
        "request_id": "19f77142-4b0c-491d-a160-ee4cb55d9347"
    },
    "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: `0x8fa2615bbad97bF6a6d1B8Ae4c790453CC20066f`

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

**Response:**
```json
{
    "data": {
        "token": {
            "icon": null,
            "name": "Gift",
            "type": "ERC-20",
            "symbol": "GFT",
            "address": "0x8fa2615bbad97bF6a6d1B8Ae4c790453CC20066f",
            "holders": 1102,
            "decimals": 18,
            "total_supply": "1000000000000000000000000000",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:01.632Z",
        "request_id": "e03786ea-373e-431c-a38f-001e20596667"
    },
    "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/bitfinity-api/v1/search?q=USD"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "query": "USD",
        "results": [
            {
                "name": "Segment USD",
                "type": "token",
                "symbol": "S1",
                "address": "0x1397d9c3E54862CC5BE6d38E5374f58b3f7A0608"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:01.844Z",
        "request_id": "f142a2f3-af3a-4a18-8fe8-e7a890a0d749"
    },
    "status": "ok",
    "message": "Search results retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "service": "bitfinity-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 Bitfinity 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. Bitfinity is a Bitcoin- and Internet Computer-integrated EVM Layer 2; gas and balances are in BFT. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T09:50:01.994Z",
        "request_id": "9fdc5c88-2d7b-4687-b3bd-6090e8b4fa96"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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