Coin Metrics Taxonomy API

Taxonomy endpoints

OpenAPI Specification

coin-metrics-taxonomy-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: Coin Metrics API v4 Blockchain Explorer Job Taxonomy API
  description: '[Coin Metrics Homepage](https://coinmetrics.io/)<br/> [API Backward Compatibility Policy](https://docs.coinmetrics.io/access-our-data/api#backward-compatibility)<br/> [Python API Client](https://coinmetrics.github.io/api-client-python/site/index.html)<br/><br/>

    HTTP API root endpoint URL is `https://api.coinmetrics.io/v4`. Coin Metrics&apos; paid product.<br/> WebSocket API root endpoint is `wss://api.coinmetrics.io/v4`. Coin Metrics&apos; paid product.<br/><br/> The Community HTTP API root endpoint URL is `https://community-api.coinmetrics.io/v4`. API key is not required when accessing community endpoints. Available to the community under the [Creative Commons](https://creativecommons.org/licenses/by-nc/4.0/) license.

    # Authentication

    <!-- ReDoc-Inject: <security-definitions> -->

    # Response headers

    Note that Coin Metrics API responses have a `CF-RAY` HTTP header e.g. `88a6ec1d2f930774-IAD` which can be used for diagnostic purposes. When raising Support requests, please ensure to provide the value of this header. '
  termsOfService: https://coinmetrics.io/api/terms
  contact:
    name: Coin Metrics Support
    url: https://coinmetrics.io/support/
    email: support@coinmetrics.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 4.0.0
servers:
- url: https://api.coinmetrics.io/v4
- url: wss://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
tags:
- name: Taxonomy
  description: Taxonomy endpoints
paths:
  /taxonomy/assets:
    servers:
    - url: https://api.coinmetrics.io/v4
    get:
      summary: Taxonomy for assets
      description: Returns Taxonomy for assets.<br/> Results are ordered by tuple `(asset, classification_start_time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.
      operationId: getTaxonomyAssets
      x-codeSamples:
      - label: Shell
        source: 'curl --compressed "https://api.coinmetrics.io/v4/taxonomy/assets?api_key=<your_key>"

          '
      - label: Python
        source: 'import requests

          response = requests.get(''https://api.coinmetrics.io/v4/taxonomy/assets?api_key=<your_key>'').json()

          print(response)

          '
      - label: Python Client
        source: 'from coinmetrics.api_client import CoinMetricsClient

          client = CoinMetricsClient(<your_key>)


          response = client.get_taxonomy_assets().to_list()

          print(response)

          '
      tags:
      - Taxonomy
      parameters:
      - $ref: '#/components/parameters/TaxonomyAssets'
      - $ref: '#/components/parameters/TaxonomyClassIds'
      - $ref: '#/components/parameters/TaxonomySectorIds'
      - $ref: '#/components/parameters/TaxonomySubsectorIds'
      - $ref: '#/components/parameters/TaxonomyVersion'
      - $ref: '#/components/parameters/TaxonomyAssetClassificationStartTime'
      - $ref: '#/components/parameters/TaxonomyAssetClassificationEndTime'
      - $ref: '#/components/parameters/StartInclusive'
      - $ref: '#/components/parameters/EndInclusive'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PagingFromWithStartByDefault'
      - $ref: '#/components/parameters/NextPageToken'
      - $ref: '#/components/parameters/Pretty'
      responses:
        '200':
          $ref: '#/components/responses/TaxonomyAssets'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '414':
          $ref: '#/components/responses/UriTooLong'
      security:
      - api_key: []
components:
  schemas:
    TaxonomySectorId:
      description: Taxonomy sector identifier.
      type: string
    Asset:
      description: Name of the asset.
      type: string
    TaxonomyAssetsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/TaxonomyAsset'
          type: array
        next_page_token:
          $ref: '#/components/schemas/NextPageToken'
        next_page_url:
          $ref: '#/components/schemas/NextPageUrl'
      required:
      - data
      type: object
    NextPageToken:
      description: Token of the next page results for a given request.
      type: string
    TaxonomyAssetClassificationEndTime:
      description: Taxonomy asset's classification end time.
      type: string
      format: date-time
    TaxonomyVersion:
      description: This field is obsolete and will be removed in future releases in favor to `updated_at_taxonomy_version` field.
      type: string
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
      required:
      - error
      type: object
    TaxonomySector:
      description: Taxonomy sector name.
      type: string
    TaxonomyAssetFullName:
      description: The full name of the asset.
      type: string
    TaxonomyAssetClassificationStartTime:
      description: Taxonomy asset's classification start time.
      type: string
      format: date-time
    TaxonomyClass:
      description: Taxonomy class name.
      type: string
    ErrorObject:
      properties:
        type:
          description: Error type string. Can be used for error identification.
          type: string
        message:
          description: Human-friendly error description. Can be amended without prior notification. Do not use for error identification in your code.
          type: string
      required:
      - type
      - description
      type: object
    TaxonomySubsector:
      description: Taxonomy subsector name.
      type: string
    TaxonomyClassId:
      description: Taxonomy class identifier.
      type: string
    NextPageUrl:
      description: URL of the next page results for a given request.
      type: string
    TaxonomyAsset:
      description: Information about taxonomy of an asset.
      properties:
        asset:
          $ref: '#/components/schemas/Asset'
        full_name:
          $ref: '#/components/schemas/TaxonomyAssetFullName'
        taxonomy_version:
          $ref: '#/components/schemas/TaxonomyVersion'
        updated_at_taxonomy_version:
          $ref: '#/components/schemas/UpdatedAtTaxonomyVersion'
        classification_start_time:
          $ref: '#/components/schemas/TaxonomyAssetClassificationStartTime'
        classification_end_time:
          $ref: '#/components/schemas/TaxonomyAssetClassificationEndTime'
        class_id:
          $ref: '#/components/schemas/TaxonomyClassId'
        class:
          $ref: '#/components/schemas/TaxonomyClass'
        sector_id:
          $ref: '#/components/schemas/TaxonomySectorId'
        sector:
          $ref: '#/components/schemas/TaxonomySector'
        subsector_id:
          $ref: '#/components/schemas/TaxonomySubsectorId'
        subsector:
          $ref: '#/components/schemas/TaxonomySubsector'
      type: object
      required:
      - asset
      - full_name
      - updated_at_taxonomy_version
      - taxonomy_version
      - classification_start_time
      - class_id
      - class
      - sector_id
      - sector
      - subsector_id
      - subsector
    TaxonomySubsectorId:
      description: Taxonomy subsector identifier.
      type: string
    UpdatedAtTaxonomyVersion:
      description: Taxonomy version the asset was classified or re-classified at.
      type: string
  parameters:
    StartInclusive:
      description: Inclusive or exclusive corresponding `start_*` parameters.
      in: query
      name: start_inclusive
      schema:
        default: true
        type: boolean
    EndInclusive:
      description: Inclusive or exclusive corresponding `end_*` parameters.
      in: query
      name: end_inclusive
      schema:
        default: true
        type: boolean
    TaxonomySubsectorIds:
      description: Comma separated list of subsector identifiers.
      in: query
      name: subsector_ids
      required: false
      schema:
        type: array
        items:
          type: string
      explode: false
    TaxonomyAssets:
      description: Comma separated list of assets.
      in: query
      name: assets
      required: false
      schema:
        type: array
        items:
          type: string
      explode: false
    TaxonomySectorIds:
      description: Comma separated list of sector identifiers.
      in: query
      name: sector_ids
      required: false
      schema:
        type: array
        items:
          type: string
      explode: false
    Pretty:
      description: Human-readable formatting of JSON responses.
      in: query
      name: pretty
      schema:
        type: boolean
        default: false
    TaxonomyClassIds:
      description: Comma separated list of class identifiers.
      in: query
      name: class_ids
      required: false
      schema:
        type: array
        items:
          type: string
      explode: false
    PageSize:
      description: Number of items per single page of results.<br/> The value of this parameter is ignored if the endpoint supports the `format` parameter and its value is set to `json_stream`.
      in: query
      name: page_size
      schema:
        default: 100
        type: integer
        format: int32
        minimum: 1
        maximum: 10000
    TaxonomyVersion:
      description: Taxonomy version. Defaults to `latest` when no `*_time` parameters specified. Specify asterisk `*` in order to get all versions.
      in: query
      name: version
      required: false
      schema:
        type: string
    PagingFromWithStartByDefault:
      description: Where does the first page start, at the start of the interval or at the end.<br/> The value of this parameter is ignored if the endpoint supports the `format` parameter and its value is set to `json_stream`.
      in: query
      name: paging_from
      schema:
        default: start
        enum:
        - start
        - end
        type: string
        format: PagingFrom
    NextPageToken:
      description: Token for receiving the results from the next page of a query.<br/> Should not be used directly. To iterate through pages just use `next_page_url` response field.
      in: query
      name: next_page_token
      schema:
        type: string
    TaxonomyAssetClassificationStartTime:
      description: 'Start time of taxonomy asset classification.<br/> Multiple formats of ISO 8601 are supported: `2006-01-20T00:00:00Z`, `2006-01-20T00:00:00.000Z`, `2006-01-20T00:00:00.123456Z`, `2006-01-20T00:00:00.123456789Z`, `2006-01-20`, `20060120`.<br/> Inclusive by default.<br/>'
      in: query
      name: classification_start_time
      required: false
      schema:
        type: string
    TaxonomyAssetClassificationEndTime:
      description: 'End time of taxonomy asset classification.<br/> Multiple formats of ISO 8601 are supported: `2006-01-20T00:00:00Z`, `2006-01-20T00:00:00.000Z`, `2006-01-20T00:00:00.123456Z`, `2006-01-20T00:00:00.123456789Z`, `2006-01-20`, `20060120`.<br/> Inclusive by default.<br/>'
      in: query
      name: classification_end_time
      required: false
      schema:
        type: string
  responses:
    Forbidden:
      content:
        application/json:
          example:
            error:
              type: forbidden
              message: Requested metric 'SplyBMXNtv' with frequency '1d' for asset 'btc' is not available with supplied credentials.
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Requested resource is not available with supplied credentials.
    UriTooLong:
      description: Provided URI is too long. It must not be greater than 10000 symbols.
    Unauthorized:
      description: Requested resource requires authorization.
      content:
        application/json:
          examples:
            unauthorized:
              summary: Unauthorized error response.
              value:
                error:
                  type: unauthorized
                  message: Requested resource requires authorization.
            wrong_credentials:
              summary: Wrong credentials error response.
              value:
                error:
                  type: wrong_credentials
                  message: Supplied credentials are not valid.
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TaxonomyAssets:
      description: Assets' taxonomy.
      content:
        application/json:
          example:
            data:
            - asset: asset1
              full_name: Asset 1
              taxonomy_version: '1.0'
              updated_at_taxonomy_version: '1.0'
              classification_start_time: '2010-07-19'
              class_id: '20'
              class: Application
              sector_id: '2030'
              sector: Metaverse
              subsector_id: '203020'
              subsector: Gaming
              classification_end_time: '2021-06-12'
            - asset: asset2
              full_name: Asset 2
              taxonomy_version: '2.0'
              updated_at_taxonomy_version: '2.0'
              classification_start_time: '2022-06-13'
              class_id: '10'
              class: Transaction
              sector_id: '1010'
              sector: Digital Currency (DC)
              subsector_id: '101010'
              subsector: General-Purpose Digital Currencies
            next_page_token: bHJjfDE2Njc0MzM2MDAwMDA
            next_page_url: https://api.coinmetrics.io/v4/taxonomy/assets?page_size=2&api_key=<your_key>&next_page_token=bHJjfDE2Njc0MzM2MDAwMDA
          schema:
            $ref: '#/components/schemas/TaxonomyAssetsResponse'
  securitySchemes:
    api_key:
      description: Coin Metrics API key can be specified as `?api_key=` query parameter.
      in: query
      name: api_key
      type: apiKey
x-tagGroups:
- name: General
  tags:
  - Rate limits
- name: Reference Data
  tags:
  - Reference Data
  - Profile
  - Taxonomy
  - Taxonomy Metadata
- name: Catalog
  tags:
  - Catalog
  - Full catalog
  - Catalog v2
  - Full catalog v2
- name: Timeseries
  tags:
  - Timeseries
  - Timeseries stream
- name: Universal blockchain explorer
  tags:
  - List of blockchain entities v2
  - Full blockchain entities v2
  - Blockchain Explorer Job
  - Blockchain Explorer Job Results
- name: Tools
  tags:
  - Chain Monitor tools
- name: Security Master
  tags:
  - Security Master
- name: Constituents
  tags:
  - Constituent Snapshots
  - Constituent Timeframes
- name: Blockchain Metadata
  tags:
  - Blockchain Metadata
- name: Jobs
  tags:
  - Jobs