> ## Documentation Index
> Fetch the complete documentation index at: https://coincapapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve historical data for a cryptocurrency

> Fetch historical market data for a specific cryptocurrency, including price, market capitalization, and volume over a given time range.



## OpenAPI

````yaml get /assets/{id}/history
openapi: 3.0.0
info:
  title: CoinCap API
  description: >-
    API for accessing cryptocurrency data including assets, rates, exchanges,
    markets, and candles.
  version: '1'
servers:
  - url: https://api.coincap.io/v2
    description: Official CoinCap API Server
  - url: https://virtserver.swaggerhub.com/REXSENDER1/CoinCap/1
    description: SwaggerHub API Auto Mocking
security:
  - bearerAuth: []
tags:
  - name: Asset
    description: >-
      Endpoints related to cryptocurrency data, including details about
      individual assets.
  - name: Rates
    description: Provides exchange rate information for various currencies.
  - name: Exchanges
    description: Information about cryptocurrency exchanges, including trading data.
  - name: Markets
    description: Details about cryptocurrency markets and trading pairs.
  - name: Candles
    description: Historical price data for cryptocurrencies in candlestick format.
paths:
  /assets/{id}/history:
    get:
      tags:
        - Asset
      summary: Retrieve historical data for a cryptocurrency
      description: >-
        Fetch historical market data for a specific cryptocurrency, including
        price, market capitalization, and volume over a given time range.
      parameters:
        - name: id
          in: path
          description: Unique identifier for the asset
          required: true
          style: simple
          explode: false
          schema:
            type: string
            example: bitcoin
        - name: interval
          in: query
          description: Point-in-time interval for the data
          required: true
          style: form
          explode: true
          schema:
            type: string
            enum:
              - m1
              - m5
              - m15
              - m30
              - h1
              - h2
              - h6
              - h12
              - d1
        - name: start
          in: query
          description: >-
            UNIX timestamp in milliseconds for the start of the range.
            If         provided, `end` must also be provided.
          required: false
          style: form
          explode: true
          schema:
            type: integer
        - name: end
          in: query
          description: >-
            UNIX timestamp in milliseconds for the end of the range. If
            `start`         is provided, `end` must also be provided.
          required: false
          style: form
          explode: true
          schema:
            type: integer
      responses:
        '200':
          description: The interval of time for historical data (e.g., daily, hourly)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_1'
components:
  schemas:
    inline_response_200_1:
      type: object
      properties:
        priceUsd:
          type: integer
        time:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````