> ## 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.

# Get market candles

> Retrieve historical market data in the form of candles.



## OpenAPI

````yaml get /candles
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:
  /candles:
    get:
      tags:
        - Candles
      summary: Get market candles
      description: Retrieve historical market data in the form of candles.
      parameters:
        - name: exchange
          in: query
          description: Exchange ID.
          required: true
          style: form
          explode: true
          schema:
            type: string
            example: poloniex
        - name: interval
          in: query
          description: Candle interval (e.g., m1, m5, m15, etc.).
          required: true
          style: form
          explode: true
          schema:
            type: string
            example: h8
            enum:
              - m1
              - m5
              - m15
              - m30
              - h1
              - h2
              - h4
              - h8
              - h12
              - d1
              - w1
        - name: baseId
          in: query
          description: Unique identifier for the base asset.
          required: true
          style: form
          explode: true
          schema:
            type: string
            example: ethereum
        - name: quoteId
          in: query
          description: Unique identifier for the quote asset.
          required: true
          style: form
          explode: true
          schema:
            type: string
            example: bitcoin
        - name: start
          in: query
          description: Start time in UNIX milliseconds.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            example: 1528410925604
        - name: end
          in: query
          description: End time in UNIX milliseconds.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            example: 1528411045604
      responses:
        '200':
          description: Historical market candles.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_8'
      security:
        - bearerAuth: []
components:
  schemas:
    inline_response_200_8:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/inline_response_200_8_data'
    inline_response_200_8_data:
      type: object
      properties:
        open:
          type: string
          description: Price at the start of the time period.
          example: '0.031'
        high:
          type: string
          description: Highest price during the time period.
          example: '0.035'
        low:
          type: string
          description: Lowest price during the time period.
          example: '0.030'
        close:
          type: string
          description: Price at the end of the time period.
          example: '0.032'
        volume:
          type: string
          description: Amount of base asset traded during the time period.
          example: '100'
        period:
          type: integer
          description: Timestamp for the start of the time period.
          example: 1528410925604
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````