Bitview URPD API

UTXO Realized Price Distribution. For each (cohort, block) pair, supply is grouped by the price at which each UTXO was last moved. Distributions are reconstructed from the UTXO set's history on demand. The buckets are columns, one entry per bucket in ascending `price`: `supply` (BTC), `realized_cap` (USD, the sum of each coin's creation price times its supply, so not `price * supply` once aggregated), and `unrealized_pnl` (USD, = `close * supply - realized_cap`, can be negative). Aggregate with the `agg` query parameter: - `raw`: one bucket per rounded price (default). - `lin200` / `lin500` / `lin1000`: linear buckets, $200 / $500 / $1000 wide. - `log10` / `log50` / `log100` / `log200` / `log500` / `log1000` / `log2000`: logarithmic buckets, N bins per price decade. Weight supply with the `weight` query parameter: - `none`: unweighted supply (default). - `wakefulness`: each age band weighted by its wakefulness (Cointime), the distribution behind the `*_awake_*` series. - `mobility`: each age band weighted by its mobility (Coinflow), behind the `*_mobile_*` series. Unweighted and weighted age-range, `all`, `sth`, and `lth` distributions share the same block state. Weights are evaluated at the requested block. Discovery flow: `GET /api/urpd` (cohorts), `GET /api/urpd/{cohort}` (latest), `GET /api/urpd/{cohort}/{point}` (any block height or UTC day with a block).

GitHub OpenAPI

Operations 3

GET /api/urpd Available URPD cohorts #
GET /api/urpd/{cohort} Latest URPD #
GET /api/urpd/{cohort}/{point} URPD at block height or date #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bitview-space:bitview-space-urpd-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bitview-space-urpd-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bitview URPD API
  description: 'Bitview is a free, open-source Bitcoin data server: on-chain metrics, blocks, mempool and mining data, with charts and an API, at bitview.space or beside your own Bitcoin Core node.


    API for querying Bitcoin blockchain data, mempool state, and on-chain series.


    ### Features


    - **Mempool.space compatible**: Blocks, transactions, addresses, mining, fees, and mempool endpoints match the mempool.space REST API

    - **Series**: Thousands of on-chain time-series across multiple indexes (date, block height, etc.)

    - **Multiple formats**: JSON and CSV output

    - **For LLMs**: `/llms.txt` for discovery, `/api.json` a compact custom summary of this spec for reading (not OpenAPI); build tools from `/openapi.json`

    - **MCP**: Stateless, read-only access to these operations at mcp.bitview.space, with no authentication required


    ### Quick start


    ```bash

    curl -s https://bitview.space/api/blocks/tip/height

    curl -s https://bitview.space/api/v1/fees/recommended

    curl -s https://bitview.space/api/mempool

    curl -s https://bitview.space/api/series/search?q=price

    ```


    ### Errors


    Errors use `application/problem+json`:


    ```json

    {

    "error": {

    "type": "not_found",

    "code": "series_not_found",

    "message": "''foo'' not found, did you mean ''bar''? What became of it: /changes/?id=foo",

    "doc_url": "/api"

    }

    }

    ```


    - **`type`**: Error category, following the status — `invalid_request` (4xx other than 404), `not_found` (404), `unavailable` (503), `timeout` (504), or `internal` (other 5xx); see the `ErrorType` schema

    - **`code`**: Machine-readable error code (e.g. `invalid_address`, `series_not_found`, `weight_exceeded`); see the `ErrorCode` schema


    ### Client Libraries


    - JavaScript

    - Python

    - Rust

    - MCP


    ### Links


    - GitHub

    - Bitview Studio - Charts of any series, built on this API'
  termsOfService: https://bitview.space/terms/
  contact:
    name: Bitview
    url: https://bitview.space/support/
    email: support@bitview.space
  license:
    name: MIT
    url: https://github.com/bitcoinresearchkit/mono/blob/main/LICENSE
  version: v0.13.0
  x-privacy-policy: https://bitview.space/privacy/
tags:
- name: URPD
  description: 'UTXO Realized Price Distribution. For each (cohort, block) pair, supply is grouped by the price at which each UTXO was last moved. Distributions are reconstructed from the UTXO set''s history on demand.


    The buckets are columns, one entry per bucket in ascending `price`: `supply` (BTC), `realized_cap` (USD, the sum of each coin''s creation price times its supply, so not `price * supply` once aggregated), and `unrealized_pnl` (USD, = `close * supply - realized_cap`, can be negative).


    Aggregate with the `agg` query parameter:

    - `raw`: one bucket per rounded price (default).

    - `lin200` / `lin500` / `lin1000`: linear buckets, $200 / $500 / $1000 wide.

    - `log10` / `log50` / `log100` / `log200` / `log500` / `log1000` / `log2000`: logarithmic buckets, N bins per price decade.


    Weight supply with the `weight` query parameter:

    - `none`: unweighted supply (default).

    - `wakefulness`: each age band weighted by its wakefulness (Cointime), the distribution behind the `*_awake_*` series.

    - `mobility`: each age band weighted by its mobility (Coinflow), behind the `*_mobile_*` series.


    Unweighted and weighted age-range, `all`, `sth`, and `lth` distributions share the same block state. Weights are evaluated at the requested block.


    Discovery flow: `GET /api/urpd` (cohorts), `GET /api/urpd/{cohort}` (latest), `GET /api/urpd/{cohort}/{point}` (any block height or UTC day with a block).'
paths:
  /api/urpd:
    get:
      tags:
      - URPD
      summary: Available URPD cohorts
      description: 'Every URPD cohort once a UTXO set is published (none before): the age aggregates (`all`, `sth`, `lth`, `age_under_4m`, ...), then the age bands from the youngest (`age_under_1h`, `age_1h_to_1d`, ...).'
      operationId: list_urpd_cohorts
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UrpdCohort'
        '304':
          description: 'Not modified: the request''s validator matches the current representation'
        '400':
          description: Invalid request parameters
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '500':
          description: Internal server error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: Service temporarily unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '504':
          description: Request deadline exceeded
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
  /api/urpd/{cohort}:
    get:
      tags:
      - URPD
      summary: Latest URPD
      description: 'URPD (UTXO realized price distribution: how much supply last moved at each price) for the latest published block; `date` echoes the date served. Fields, units, price-grid rounding and weighting as in `GET /api/urpd/{cohort}/{point}`.'
      operationId: get_urpd_latest
      parameters:
      - in: path
        name: cohort
        required: true
        schema:
          $ref: '#/components/schemas/UrpdCohort'
        style: simple
      - in: query
        name: agg
        description: 'Aggregation strategy. Default: raw (no aggregation).'
        schema:
          description: 'Aggregation strategy. Default: raw (no aggregation).'
          $ref: '#/components/schemas/UrpdAggregation'
          default: raw
        style: form
      - in: query
        name: weight
        description: 'Supply weighting. Default: none (unweighted).'
        schema:
          description: 'Supply weighting. Default: none (unweighted).'
          $ref: '#/components/schemas/UrpdWeight'
          default: none
        style: form
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Urpd'
        '304':
          description: 'Not modified: the request''s validator matches the current representation'
        '404':
          description: Resource not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '400':
          description: Invalid request parameters
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '500':
          description: Internal server error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: Service temporarily unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '504':
          description: Request deadline exceeded
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
  /api/urpd/{cohort}/{point}:
    get:
      tags:
      - URPD
      summary: URPD at block height or date
      description: 'URPD (UTXO realized price distribution: how much supply last moved at each price) for a cohort at a block height or the last block of a UTC day. Returns `{ height, hash, date, cohort, weight, aggregation, close, supply, buckets }` where `buckets` is columns, `{ price, supply, realized_cap, unrealized_pnl }`, one entry per bucket in ascending price: the same block header and columnar layout as `GET /api/utxo-set/{point}`. `close`, `price`, `realized_cap`, and `unrealized_pnl` are USD; `supply` is BTC. `unrealized_pnl` can be negative. Bucket `realized_cap` and `unrealized_pnl` value each coin at its creation price on the price grid (four significant digits of the price in cents, within 0.05% of the exact price), rounded to the cent per bucket, so the buckets need not sum to the realized cap series. With a `wakefulness` or `mobility` `weight`, `supply` is the weighted supply (whole satoshis) and the bucket values follow it.'
      operationId: get_urpd
      parameters:
      - in: path
        name: cohort
        required: true
        schema:
          $ref: '#/components/schemas/UrpdCohort'
        style: simple
      - in: path
        name: point
        description: Confirmed block height (`840000`) or UTC calendar day (`YYYY-MM-DD`)
        required: true
        schema:
          description: Confirmed block height (`840000`) or UTC calendar day (`YYYY-MM-DD`)
          $ref: '#/components/schemas/HeightOrDate'
        style: simple
      - in: query
        name: agg
        description: 'Aggregation strategy. Default: raw (no aggregation).'
        schema:
          description: 'Aggregation strategy. Default: raw (no aggregation).'
          $ref: '#/components/schemas/UrpdAggregation'
          default: raw
        style: form
      - in: query
        name: weight
        description: 'Supply weighting. Default: none (unweighted).'
        schema:
          description: 'Supply weighting. Default: none (unweighted).'
          $ref: '#/components/schemas/UrpdWeight'
          default: none
        style: form
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Urpd'
        '304':
          description: 'Not modified: the request''s validator matches the current representation'
        '404':
          description: Resource not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '400':
          description: Invalid request parameters
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '500':
          description: Internal server error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: Service temporarily unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '504':
          description: Request deadline exceeded
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    ErrorDetail:
      type: object
      properties:
        type:
          description: Error category, following the HTTP status
          allOf:
          - $ref: '#/components/schemas/ErrorType'
        code:
          description: Machine-readable error code
          allOf:
          - $ref: '#/components/schemas/ErrorCode'
        message:
          description: Human-readable description
          type: string
        doc_url:
          description: Link to API documentation
          type: string
          format: uri-reference
      required:
      - type
      - code
      - message
      - doc_url
    UrpdWeight:
      description: 'The weight applied to a URPD''s age bands: `none` (every satoshi counts once), `wakefulness` (each band

        weighted by the share of its coin days already consumed, Cointime''s; the distribution behind the

        `*_awake_*` series) or `mobility` (each band weighted by the estimated probability its coins are ever

        spent, Coinflow''s; behind `*_mobile_*`).'
      type: string
      enum:
      - none
      - wakefulness
      - mobility
    Height:
      description: 'A block height: how many blocks came before it.'
      type: integer
      format: uint32
      minimum: 0
      examples:
      - 0
      - 210000
      - 420000
      - 840000
    Dollars:
      description: An amount in US dollars.
      type: number
      format: double
      examples:
      - 0.0
      - 100.5
      - 30000.0
      - 69000.0
      - 84342.12
    UrpdAggregation:
      description: 'Aggregation strategy for URPD buckets.

        Options: raw (no aggregation), lin200/lin500/lin1000 (linear $200/$500/$1000),

        log10/log50/log100/log200/log500/log1000/log2000 (logarithmic, that many buckets per decade).'
      type: string
      enum:
      - raw
      - lin200
      - lin500
      - lin1000
      - log10
      - log50
      - log100
      - log200
      - log500
      - log1000
      - log2000
    Date:
      description: Calendar date in YYYY-MM-DD format.
      type: string
      format: date
      pattern: ^\d{4}-\d{2}-\d{2}$
      examples:
      - '2009-01-03'
      - '2024-04-20'
    BlockHash:
      description: 'Double-SHA256 block-header hash, serialized in Bitcoin''s conventional

        hexadecimal byte order.'
      type: string
      examples:
      - 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
      - 0000000000000000000320283a032748cef8227873ff4872689bf23f1cda83a5
      pattern: ^[0-9a-f]{64}$
    ErrorCode:
      type: string
      enum:
      - not_found
      - invalid_address
      - invalid_network
      - unsupported_type
      - no_series
      - series_unsupported_index
      - weight_exceeded
      - too_many_utxos
      - limit_exceeded
      - unknown_after_txid
      - unknown_address
      - unknown_txid
      - unknown_pool
      - out_of_range
      - unindexable_date
      - no_data
      - series_not_found
      - mempool_not_available
      - state_updating
      - internal_error
      - bad_request
      - overloaded
      - timeout
      - method_not_allowed
    Urpd:
      description: 'UTXO Realized Price Distribution for a cohort at a specific block.


        Supply is grouped by the price at the block in which each UTXO was last moved; each bucket

        holds its supply, realized cap and unrealized P&L. The same block header as `UtxoSet`

        (`height`, `hash`, `date`), then its own fields and its buckets as an object of columns.'
      type: object
      properties:
        height:
          description: Exact published block represented by this distribution.
          allOf:
          - $ref: '#/components/schemas/Height'
        hash:
          description: Hash of block `height`.
          allOf:
          - $ref: '#/components/schemas/BlockHash'
        date:
          description: UTC date of the represented block's monotonic timestamp.
          allOf:
          - $ref: '#/components/schemas/Date'
        cohort:
          $ref: '#/components/schemas/UrpdCohort'
        weight:
          $ref: '#/components/schemas/UrpdWeight'
        aggregation:
          $ref: '#/components/schemas/UrpdAggregation'
        close:
          description: Price at `height`, in USD. Anchor for `unrealized_pnl`.
          allOf:
          - $ref: '#/components/schemas/Dollars'
        supply:
          description: Sum of `buckets.supply`, in BTC.
          allOf:
          - $ref: '#/components/schemas/Bitcoin'
        buckets:
          $ref: '#/components/schemas/UrpdBuckets'
      required:
      - height
      - hash
      - date
      - cohort
      - weight
      - aggregation
      - close
      - supply
      - buckets
    UrpdBuckets:
      description: 'Columnar buckets in ascending price order: entry `i` of each column is bucket `i`.'
      type: object
      properties:
        price:
          description: 'Each bucket''s price, in USD: its lower bound when aggregated, and for `raw` the price its

            coins'' creation prices round to (four significant digits of the price in cents).'
          type: array
          items:
            $ref: '#/components/schemas/Dollars'
        supply:
          description: 'Supply held with a last-move price inside each bucket, in BTC. With a `wakefulness` or

            `mobility` weight, the weighted supply, floored to whole satoshis at each grid price.'
          type: array
          items:
            $ref: '#/components/schemas/Bitcoin'
        realized_cap:
          description: 'Realized cap contribution in USD: `price * supply` summed over the coins in each bucket,

            each coin''s creation price taken on the price grid (the `raw` bucket price, within 0.05%

            of the exact price), rounded to the cent: a bucket worth under half a cent shows 0. The

            buckets therefore need not sum to the cohort''s realized cap series.'
          type: array
          items:
            $ref: '#/components/schemas/Dollars'
        unrealized_pnl:
          description: 'Unrealized P&L in USD at the represented block: `close * supply` minus each bucket''s grid

            capital, rounded to the cent once. Can be negative.'
          type: array
          items:
            $ref: '#/components/schemas/Dollars'
      required:
      - price
      - supply
      - realized_cap
      - unrealized_pnl
    ErrorType:
      description: 'Error category, following the HTTP status: `invalid_request` (4xx other than 404),

        `not_found` (404), `unavailable` (503; `Retry-After` when transient), `timeout` (504), `internal`

        (other 5xx).'
      type: string
      enum:
      - invalid_request
      - not_found
      - unavailable
      - timeout
      - internal
    UrpdCohort:
      description: 'A URPD cohort, by its series'' prefix: an age aggregate (`all`, `sth`, `lth`, `age_under_4m`, ...) or an age band (`age_under_1h`, `age_1h_to_1d`, ...).'
      type: string
      enum:
      - all
      - sth
      - lth
      - age_under_4m
      - age_under_6m
      - age_over_4m
      - age_over_6m
      - age_under_1h
      - age_1h_to_1d
      - age_1d_to_1w
      - age_1w_to_1m
      - age_1m_to_2m
      - age_2m_to_3m
      - age_3m_to_4m
      - age_4m_to_5m
      - age_5m_to_6m
      - age_6m_to_9m
      - age_9m_to_1y
      - age_1y_to_18m
      - age_18m_to_2y
      - age_2y_to_3y
      - age_3y_to_4y
      - age_4y_to_5y
      - age_5y_to_6y
      - age_6y_to_7y
      - age_7y_to_8y
      - age_8y_to_10y
      - age_10y_to_12y
      - age_12y_to_15y
      - age_over_15y
    HeightOrDate:
      description: 'A confirmed point of the chain: a block height (`840000`) or a UTC calendar day (`YYYY-MM-DD`).'
      anyOf:
      - $ref: '#/components/schemas/Height'
      - $ref: '#/components/schemas/Date'
    Bitcoin:
      description: An amount in bitcoin, as a decimal number (1 BTC = 100,000,000 satoshis).
      type: number
      format: double
    ErrorBody:
      description: The JSON body of every API error (`application/problem+json`).
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
      - error