# Rexilion API Reference

Rexilion API is a Bitcoin metrics API for integration teams that need stored market and on-chain series through a stable API-keyed interface.

Canonical page: https://rexilion.com/rexilion-api

HTML reference: https://rexilion.com/docs/rexilion-api.html

OpenAPI reference: https://rexilion.com/docs/rexilion-api.openapi.json

## Quickstart

Base URL:

```text
https://api.rexilion.com
```

Authentication:

```text
X-API-Key: YOUR_API_KEY
```

Metric route:

```text
GET /v1/metrics/{category}/{metric}
```

Example request:

```text
GET /v1/metrics/mining/hash_rate_mean?a=BTC&i=10m
Host: api.rexilion.com
X-API-Key: YOUR_API_KEY
```

Example response shape:

```json
[
  { "t": 1718582400000, "v": 62.14 }
]
```

## Coverage

Rexilion API supports 53 public Bitcoin metric routes across 9 groups: market, addresses, blocks, transactions, fees, chain, mining, supply, utxo.

- Market: Coinbase spot and Binance spot premium relationships for aligned closed BTC candles.
- Addresses: Receiving, sending, and active address counts from standard Bitcoin script/address identities.
- Blocks: Block metrics summarize selected Bitcoin blocks inside each closed interval for block production, blockspace use, and block-level fee pressure.
- Transactions: Transaction metrics summarize Bitcoin activity in selected blocks: activity, fee-paying activity, size, input, output, and SegWit measures.
- Fees: Fee metrics describe transaction-fee activity captured by selected Bitcoin blocks without exposing private source material.
- Chain: Chain metrics describe timing behavior across selected Bitcoin block timestamps.
- Mining: Mining metrics describe scheduled subsidy, miner revenue, fee mix, and public hash-rate samples for selected Bitcoin blocks.
- Supply: Supply metrics describe scheduled Bitcoin issuance and UTXO-set amount snapshots. They do not represent circulating, liquid, exchange, or lost-coin-adjusted supply.
- UTXO: UTXO metrics describe selected output-set change, value flow, turnover, and spent-age indicators derived from stored Bitcoin block statistics and UTXO-set snapshots.

## Metric Catalog

The metric route is `GET /v1/metrics/{category}/{metric}`. Public Bitcoin series use `a=BTC`; market premium routes also use `ex=coinbase_spot` and `ref_ex=binance_spot`.

- Market (2, 1h): `exchange_premium_gap`, `exchange_premium_index`
- Addresses (3, 1h): `receiving_count`, `sending_count`, `active_count`
- Blocks (8, 10m, 1h): `count`, `transaction_count_mean`, `fee_total_mean`, `weight_utilization_mean`, `blockspace_feerate_mean`, `transaction_density_mean`, `weight_total`, `weight_mean`
- Transactions (10, 10m, 1h): `count`, `fee_paying_count`, `input_count`, `output_count`, `rate_mean`, `fee_paying_rate_mean`, `fee_paying_share`, `size_total`, `size_mean`, `segwit_count`
- Fees (6, 10m, 1h): `total`, `rate_mean`, `transaction_mean`, `fee_paying_transaction_mean`, `feerate_mean`, `high_fee_vbytes_share`
- Chain (1, 10m, 1h): `block_interval_mean`
- Mining (8, 10m, 1h): `subsidy_total`, `revenue_total`, `fee_revenue_share`, `revenue_rate_mean`, `fee_to_subsidy_ratio`, `hash_rate_mean`, `subsidy_mean`, `revenue_mean`
- Supply (4, 10m, 1h): `issuance_rate_mean`, `issued_total`, `utxo_total_amount`, `unspendable_total_amount`
- UTXO (11, 10m, 1h): `change_count_actual`, `size_change_bytes_actual`, `set_output_count`, `block_spent_value`, `block_created_value`, `block_unspendable_value`, `net_created_value`, `turnover_ratio`, `coin_days_destroyed`, `spent_value_total`, `average_spent_age_days`

## Public Endpoints

```text
GET /health
GET /openapi.json
GET /v1/assets
GET /v1/metadata/metrics
GET /v1/metrics/{category}/{metric}
```

## Query Conventions

Common metric query parameters:

- `a`: asset symbol. Public Bitcoin series use `BTC`.
- `i`: interval, such as `10m` or `1h`, depending on the metric.
- `s`: optional lower UTC millisecond bound.
- `u`: optional upper UTC millisecond bound.
- `limit`: optional positive row cap.

Use explicit UTC millisecond bounds for large historical reads.

## Response Rules

- Metric responses return stored points shaped as `t` and `v`.
- Rexilion API provides real-time Bitcoin metric data through API-keyed metric reads.
- Returned UTC timestamps identify the latest available point for each series.
- Missing-source buckets are not synthesized into responses.
- Client integrations should rely on catalog metadata instead of hardcoded guesses.

## Real-Time Data

Rexilion API provides real-time Bitcoin metric data. Clients should treat the latest returned `t` timestamp as the source of truth for current available data and request trailing UTC windows when polling. This public reference does not publish a fixed latency SLA.

## Error Map

- `400 bad_request`: invalid category, metric, interval, asset, or time bounds.
- `401 unauthorized`: missing, expired, or invalid API key.
- `403 forbidden`: valid key, but the requested access is not enabled.
- `429 rate_limited`: request pacing limit reached.
- `502 source_unavailable`: upstream source is temporarily unavailable.
- `500 server_error`: unexpected server-side failure.

## Access And Trust

Rexilion Premium API is listed publicly at USD 299 per month. Premium API accounts have no monthly request cap, with requests paced at 600 API calls per minute for active access.

Teams create a Rexilion account, verify email, activate access, and manage API keys from the authenticated Rexilion profile. API keys are issued after access is active.

Payment collection is provider-hosted through Stripe. Rexilion frontend and backend do not collect raw card data.

Rexilion API does not provide custody, trade execution, investment advice, or guaranteed performance outcomes.
