REST API v2 • Multi-Chain

API Documentation

Integrate ClearUTXO's UTXO analysis and blockchain data into your applications. Supports Bitcoin and Litecoin.

Authentication

API v2 requires authentication via API Key. Include your key in the X-API-Key header:

bash
curl 'https://api.gliese.io/api/api/v2/status?chain=btc' \
  -H 'X-API-Key: YOUR_API_KEY'

Keep your API key secret

Never expose your API key in client-side code. Always make API calls from your backend.

API Key Plans

API access requires Pro or Enterprise plan. Create API keys from your dashboard.

Rate Limits & Quotas

Rate limits are enforced per API key. Monthly quotas reset on the 1st of each month.

PlanRequests/minMonthly QuotaUTXO LimitBatch
Basic6010,00010010 addresses
Pro200250,0005,000100 addresses
Enterprise1,000UnlimitedUnlimited1,000 addresses

Response Headers

Every response includes headers to help you track your usage:

HeaderDescription
X-API-LimitMonthly request limit (or "unlimited")
X-API-RemainingRemaining requests this month
X-API-ResetISO timestamp when quota resets
X-API-PlanYour current plan (pro, enterprise)

Endpoints

GET/status

Get blockchain status including block height, difficulty, hashrate, and mempool info.

Query Parameters

NameTypeDefaultDescription
chainstringbtcChain ID: btc, ltc

Example Request

bash
curl 'https://api.gliese.io/api/api/v2/status?chain=btc' \
  -H 'X-API-Key: YOUR_API_KEY'

Example Response

json
{
  "success": true,
  "data": {
    "chain": "btc",
    "chainName": "Bitcoin",
    "symbol": "BTC",
    "blockHeight": 876543,
    "difficulty": 95672847567234,
    "hashrate": "756.23 EH/s",
    "mempoolSize": 45230,
    "synced": true,
    "source": "rpc"
  }
}
GET/chains

Get list of all supported blockchain networks.

Example Response

json
{
  "success": true,
  "data": {
    "chains": [
      {
        "id": "btc",
        "name": "Bitcoin",
        "symbol": "BTC",
        "enabled": true
      },
      {
        "id": "ltc",
        "name": "Litecoin",
        "symbol": "LTC",
        "enabled": true
      }
    ]
  }
}
GET/fees

Get current fee estimates for different priority levels.

Query Parameters

NameTypeDescription
chainstringChain ID (btc, ltc)

Example Response

json
{
  "success": true,
  "data": {
    "low": 5,
    "medium": 12,
    "high": 25,
    "urgent": 50,
    "unit": "sat/vB",
    "source": "rpc",
    "mempoolSize": 45230,
    "timestamp": "2026-01-16T12:00:00.000Z"
  }
}
GET/address/{address}

Get address information including balance, transaction count, and total received/sent.

Query Parameters

NameTypeDescription
chainstringChain ID (btc, ltc)
syncbooleanWait for stats calculation (Pro+)

Example Request

bash
curl 'https://api.gliese.io/api/api/v2/address/bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh?chain=btc' \
  -H 'X-API-Key: YOUR_API_KEY'

Example Response

json
{
  "success": true,
  "data": {
    "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
    "chain": "btc",
    "balance": 45230000,
    "balanceFormatted": "0.45230000",
    "totalReceived": 125000000,
    "totalSent": 79770000,
    "txCount": 42,
    "unconfirmedBalance": 0,
    "calculating": false
  }
}
GET/address/{address}/utxos

Get list of UTXOs (unspent transaction outputs) for an address.

Query Parameters

NameTypeDescription
chainstringChain ID (btc, ltc)
limitintegerMax UTXOs to return (plan-based limit)

Example Response

json
{
  "success": true,
  "data": {
    "address": "bc1q...",
    "chain": "btc",
    "utxos": [
      {
        "txid": "a1b2c3d4e5f6...",
        "vout": 0,
        "value": 25000000,
        "valueFormatted": "0.25000000",
        "confirmations": 1234
      }
    ],
    "count": 5,
    "limited": false
  }
}
GET/address/{address}/txs

Get paginated transaction history for an address.

Query Parameters

NameTypeDescription
chainstringChain ID (btc, ltc)
pageintegerPage number (default: 1)
pageSizeintegerTransactions per page (default: 25, max: 100)
GET/tx/{txid}

Get detailed transaction information including inputs, outputs, and fee data.

Example Request

bash
curl 'https://api.gliese.io/api/api/v2/tx/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b?chain=btc' \
  -H 'X-API-Key: YOUR_API_KEY'

Example Response

json
{
  "success": true,
  "data": {
    "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
    "hash": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
    "version": 1,
    "size": 204,
    "vsize": 204,
    "weight": 816,
    "locktime": 0,
    "blockHash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
    "blockHeight": 0,
    "confirmations": 876543,
    "fee": 0,
    "inputs": [
      {
        "isCoinbase": true
      }
    ],
    "outputs": [
      {
        "n": 0,
        "value": 5000000000,
        "valueFormatted": "50.00000000",
        "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
      }
    ]
  }
}
GET/block/{hashOrHeight}

Get block details by hash or height.

Query Parameters

NameTypeDescription
chainstringChain ID (btc, ltc)
txidsbooleanInclude transaction IDs

Example Request

bash
curl 'https://api.gliese.io/api/api/v2/block/0?chain=btc' \
  -H 'X-API-Key: YOUR_API_KEY'
POST/simulate

Simulate a transaction to estimate fees, select optimal UTXOs, and preview the result.

Request Body

ParameterTypeRequiredDescription
chainstringNoChain ID (default: btc)
fromAddressstringYesSource address
toAddressstringYesDestination address
amountintegerYesAmount in satoshis
feeRateintegerNoFee rate in sat/vB (default: 10)
utxoSelectionstringNoStrategy: optimal, largest, smallest, oldest

Example Request

bash
curl -X POST 'https://api.gliese.io/api/api/v2/simulate' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "chain": "btc",
    "fromAddress": "bc1q...",
    "toAddress": "bc1p...",
    "amount": 100000,
    "feeRate": 15
  }'

Example Response

json
{
  "success": true,
  "data": {
    "viable": true,
    "chain": "btc",
    "amount": 100000,
    "feeRate": 15,
    "estimatedFee": 2250,
    "estimatedSize": 150,
    "selectedUtxos": [
      {
        "txid": "abc...",
        "vout": 0,
        "value": 150000
      }
    ],
    "inputCount": 1,
    "outputCount": 2,
    "totalInput": 150000,
    "totalOutput": 147750,
    "change": 47750,
    "effectiveFeeRate": 15,
    "dustThreshold": 546
  }
}
GET/health/{address}

Return a minimal UTXO health score for widget and lightweight integrations.

Query Parameters

NameTypeDefaultDescription
chainstringbtcChain ID (btc, ltc)

Example Request

bash
curl 'https://api.gliese.io/api/api/v2/health/bc1q...?chain=btc' \
  -H 'X-API-Key: YOUR_API_KEY'

Example Response

json
{
  "success": true,
  "data": {
    "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
    "chain": "btc",
    "score": 85,
    "grade": "A",
    "utxoCount": 5,
    "balance": 1500000,
    "issues": [
      "2 dust UTXOs",
      "1 unconfirmed"
    ]
  }
}
GET/analyze/{address}

Perform comprehensive UTXO analysis on an address including privacy score, dust detection, and consolidation recommendations.

Query Parameters

NameTypeDescription
chainstringChain ID (btc, ltc)

Example Request

bash
curl 'https://api.gliese.io/api/api/v2/analyze/bc1q...?chain=btc' \
  -H 'X-API-Key: YOUR_API_KEY'
GET/usage

Get your current API usage statistics for the billing period.

Example Response

json
{
  "success": true,
  "data": {
    "plan": "pro",
    "period": {
      "start": "2026-01-01T00:00:00.000Z",
      "end": "2026-02-01T00:00:00.000Z"
    },
    "usage": {
      "apiCalls": 15420,
      "limit": 100000,
      "remaining": 84580,
      "percentUsed": 15.42
    },
    "limits": {
      "utxoLimit": 1000,
      "batchLimit": 50,
      "syncCalculation": true
    }
  }
}
POST/analyze/batchPro+

Analyze multiple addresses in a single request. Available for Pro and Enterprise plans.

Request Body

ParameterTypeDescription
addressesstring[]Array of addresses (max 50 Pro, 500 Enterprise)
chainstringChain ID (btc, ltc)
webhookUrlstringURL for async result callback (optional)

Example Request

bash
curl -X POST 'https://api.gliese.io/api/api/v2/analyze/batch' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "addresses": ["bc1q...", "bc1p...", "3ABC..."],
    "chain": "btc"
  }'

Analytics Dashboard

Monitor your API usage with detailed analytics. Access via /api/v1/analytics/* endpoints (requires JWT auth).

EndpointDescription
/analytics/overviewOverview stats, success rates, request counts
/analytics/endpointsUsage breakdown by endpoint
/analytics/chainsUsage breakdown by chain (BTC/LTC)
/analytics/charts/hourlyHourly time series for charts
/analytics/charts/dailyDaily time series for charts
/analytics/errorsRecent error logs
/analytics/logsPaginated request logs with filters
/analytics/summaryAll stats in one request

Error Codes

The API uses standard HTTP status codes and returns JSON error responses.

CodeMeaning
200Success
400Bad Request - Invalid parameters or address format
401Unauthorized - Invalid or missing API key
403Forbidden - Feature not available for your plan
404Not Found - Resource does not exist
429Rate Limit / Quota Exceeded
500Internal Server Error
503Service Unavailable - Node not synced

Error Response Format

json
{
  "success": false,
  "error": "Invalid address format",
  "code": "INVALID_ADDRESS"
}

Quota Exceeded Error

json
{
  "success": false,
  "error": "Monthly API limit exceeded",
  "code": "API_LIMIT_EXCEEDED",
  "limit": 100000,
  "used": 100000,
  "resetDate": "2026-02-01T00:00:00.000Z",
  "upgradeUrl": "/pricing"
}

Client Libraries

Use our Node.js client as a starting point for integration:

javascript
// Install: npm install node-fetch
import fetch from 'node-fetch'

const API_KEY = 'sk_live_your_api_key'
const BASE_URL = 'https://api.gliese.io/api/api/v2'

async function getStatus(chain = 'btc') {
  const response = await fetch(`${BASE_URL}/status?chain=${chain}`, {
    headers: { 'X-API-Key': API_KEY }
  })
  return response.json()
}

async function getAddress(address, chain = 'btc') {
  const response = await fetch(`${BASE_URL}/address/${address}?chain=${chain}`, {
    headers: { 'X-API-Key': API_KEY }
  })
  return response.json()
}

async function simulate(params) {
  const response = await fetch(`${BASE_URL}/simulate`, {
    method: 'POST',
    headers: {
      'X-API-Key': API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(params)
  })
  return response.json()
}

// Usage
const status = await getStatus('btc')
console.log(status)

Official SDKs for Python, Go, and Rust coming soon.