# Stacks API
> Live on-chain data from the Stacks network (STX), a Bitcoin layer that settles to Bitcoin and uses Proof of Transfer (PoX) — STX holders stack tokens to secure the chain and earn BTC: an address's available and locked (stacked) STX, totals sent/received and miner rewards; a block's height, hash, transaction count and the Bitcoin burn block it anchors to; the live Proof-of-Transfer stacking state (current reward cycle, STX stacked, share of supply locked, minimum threshold); and the chain tip, anchored Bitcoin block height and total STX supply.

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

## Pricing
- **Free** (Free) — 9,000 calls/Mo, 3 req/s
- **Basic** ($9/Mo) — 137,000 calls/Mo, 8 req/s
- **Pro** ($23/Mo) — 885,000 calls/Mo, 15 req/s
- **Scale** ($59/Mo) — 4,650,000 calls/Mo, 30 req/s

## Endpoints

### Network

#### `GET /v1/network` — Live Stacks chain tip, Bitcoin anchor and STX supply

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

### Account

#### `GET /v1/account` — An address available, stacked and total STX

**Parameters:**
- `address` (query, required, string) — Stacks address (SP... or SM...) Example: `SPE3481ZKSV7AT33BG20J7ZYMKG61V36W7M987KV`

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

**Response:**
```json
{
    "data": {
        "source": "Stacks",
        "address": "SPE3481ZKSV7AT33BG20J7ZYMKG61V36W7M987KV",
        "balance_stx": 17.898745,
        "is_stacking": false,
        "available_stx": 17.898745,
        "total_sent_stx": 34.114,
        "miner_rewards_stx": 0,
        "locked_stacked_stx": 0,
        "total_received_stx": 60.2447,
        "unlock_burn_height": null,
        "total_fees_sent_stx": 8.231955
    },
    "meta": {
        "timestamp": "2026-06-10T14:01:25.192Z",
        "request_id": "d73dbdd5-d85c-4e39-84d5-3d640ef40b50"
    },
    "status": "ok",
    "message": "Account retrieved successfully",
    "success": true
}
```

### Block

#### `GET /v1/block` — A block details and the Bitcoin block it anchors to

**Parameters:**
- `height` (query, optional, string) — Block height, 0x hash or latest Example: `latest`

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

**Response:**
```json
{
    "data": {
        "hash": "0x51c90cfa00462be608b49c639aeea9eeee75778fb13c486fc0bfcbf5d0929b5d",
        "time": "2026-06-10T14:01:00.000Z",
        "height": 8244261,
        "source": "Stacks",
        "tx_count": 8,
        "miner_txid": "0x47760f9b2bf47b4d474253f7ddef8bfe3f7c34a0115c0643399a80b53b17b9b8",
        "parent_hash": "0x5f1407feee967c17bd9106fb9bc48b1e542ecf5ce168f062c118fe7b595b67ae",
        "tenure_height": 245689,
        "bitcoin_burn_block_hash": "0x0000000000000000000169d7903fb22595e7f29e486a97d56844ab7f4f432c44",
        "bitcoin_burn_block_time": "2026-06-10T13:56:22.000Z",
        "bitcoin_burn_block_height": 953111
    },
    "meta": {
        "timestamp": "2026-06-10T14:01:25.586Z",
        "request_id": "ee7c9122-527f-4236-aef5-3b9ac6e5a7b5"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

### Stacking

#### `GET /v1/stacking` — Live Proof-of-Transfer stacking state and reward cycle

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

**Response:**
```json
{
    "data": {
        "source": "Stacks",
        "next_cycle": {
            "id": 137,
            "stacked_stx": 115932029.96357,
            "min_threshold_stx": 120000,
            "blocks_until_start": 639
        },
        "stacked_stx": 504262340.623865,
        "is_pox_active": true,
        "current_cycle_id": 136,
        "min_threshold_stx": 130000,
        "stacked_ratio_pct": 27.28,
        "reward_cycle_length": 2100,
        "total_liquid_supply_stx": 1848441120.01581
    },
    "meta": {
        "timestamp": "2026-06-10T14:01:26.087Z",
        "request_id": "64daacb6-3fad-4451-b671-253992e07196"
    },
    "status": "ok",
    "message": "Stacking state retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata and endpoint catalog

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

**Response:**
```json
{
    "data": {
        "source": "Hiro Stacks API (api.hiro.so, live)",
        "service": "stacks-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/block": "A block's details and the Bitcoin block it anchors to (height=latest|N).",
            "GET /v1/account": "An address's available, stacked and total STX (address=SPE3481ZKSV7AT33BG20J7ZYMKG61V36W7M987KV).",
            "GET /v1/network": "Chain tip, anchored Bitcoin height and total STX supply.",
            "GET /v1/stacking": "Live Proof-of-Transfer stacking state and reward cycle."
        },
        "description": "Live on-chain data from the Stacks network (STX), a Bitcoin layer that settles to Bitcoin and uses Proof of Transfer (PoX), where STX holders stack tokens to secure the chain and earn BTC, via the public Hiro Stacks API. The account endpoint returns an address's available and locked (stacked) STX, totals sent/received and miner rewards; the block endpoint returns a Stacks block's height, hash, transaction count and the Bitcoin burn block it anchors to; the stacking endpoint returns the live PoX state (current reward cycle, STX stacked, share of supply locked, minimum threshold); the network endpoint returns the chain tip, anchored Bitcoin block height and total STX supply. Live, no key, nothing stored. Distinct from the Bitcoin, Celestia, Cosmos, Solana and EVM on-chain APIs and from price feeds — this is Stacks' own STX account state, PoX stacking economy a
…(truncated, see openapi.json for full schema)
```


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