> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get index candles

> Retrieves the historical daily index prices in time descending order. The daily values are represented as aggregated entries for the day in typical OHLC format.

<Tabs>
  <Tab value="Typescript" title="TS/JS">
    ```js theme={null}
    const indexService = new IndexService(client);

    indexService.getIndexCandles({
        index: 'COIN50',
        granularity: 'ONE_DAY',
        start: '2024-01-01T00:00:00Z',
    }).then(async (response) => {
        console.log('Index Candles: ', response);
    })
    ```

    For more information, please visit the [INTX TS SDK](https://github.com/coinbase-samples/intx-sdk-ts).
  </Tab>
</Tabs>


## OpenAPI

````yaml GET /api/v1/index/{index}/candles
openapi: 3.0.3
info:
  title: REST API
  description: >
    # Welcome to Coinbase INTX API

    ## Introduction

    The INTX APIs allow institutions to trade and manage orders on the
    International Exchange. The following API pages detail various REST API
    endpoints we offer.

    ## Getting Started

    To get started, please visit one of the following pages:

    - [Quickstart](/international-exchange/introduction/quickstart)

    -
    [Overview](/api-reference/international-exchange-api/rest-api/introduction)

    -
    [Authentication](/api-reference/international-exchange-api/rest-api/authentication)

    - [Rate Limits](/international-exchange/introduction/rate-limits-overview)

    ## FIX API

    - [FIX API reference](/international-exchange/fix-api/fix-api-overview)

    ## WebSocket API

    - [WebSocket API
    reference](/international-exchange/websocket-feed/websocket-overview)
  version: '1.0'
servers:
  - url: https://api.international.coinbase.com
security: []
paths:
  /api/v1/index/{index}/candles:
    get:
      tags:
        - Index
      summary: Get index candles
      description: >-
        Retrieves the historical daily index prices in time descending order.
        The daily values are represented as aggregated entries for the day in
        typical OHLC format.
      operationId: getIndexCandles
      parameters:
        - name: index
          in: path
          description: Identifies the index by name (e.g., `COIN50`)
          required: true
          schema:
            type: string
        - name: granularity
          in: query
          description: The aggregation period of the candles data
          required: true
          schema:
            type: string
            enum:
              - ONE_DAY
              - ONE_HOUR
        - name: start
          in: query
          description: >-
            Start timestamp in ISO 8601 timestamp format (e.g.
            `2024-10-21T00:00:00Z`)
          required: true
          schema:
            type: string
        - name: end
          in: query
          description: >-
            End timestamp in ISO 8601 timestamp format (e.g.
            `2024-10-31T00:00:00Z`)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Index Candle list
          content:
            application/json:
              schema:
                properties:
                  aggregations:
                    type: array
                    items:
                      $ref: '#/components/schemas/IndexCandles_v1'
        '400':
          description: Invalid attribute
        '401':
          description: Authentication error
      security:
        - auth_client_id: []
          auth_passphrase: []
          auth_signature: []
          auth_timestamp: []
components:
  schemas:
    IndexCandles_v1:
      type: object
      properties:
        start:
          description: The start time of the aggregation
          type: string
          example: '2024-10-31T00:00:00Z'
        open:
          description: The opening price at the start of the aggregation time period
          type: string
          example: '311.4512360891112'
        high:
          description: The maximum price in the aggregation time period
          type: string
          example: '312.4418815371496'
        low:
          description: The minimum price in the aggregation time period
          type: string
          example: '297.4296073392959'
        close:
          description: The closing price at the end of the aggregation time period
          type: string
          example: '299.5950052685418'
  securitySchemes:
    auth_client_id:
      type: apiKey
      name: CB-ACCESS-KEY
      in: header
      description: The Client ID that owns the API Key for the request
    auth_passphrase:
      type: apiKey
      name: CB-ACCESS-PASSPHRASE
      in: header
      description: The pass phrase affiliated with the API Key
    auth_signature:
      type: apiKey
      name: CB-ACCESS-SIGN
      in: header
      description: >-
        A HMAC SHA-256 signature using the API Key secret on the string
        TIMESTAMP, METHOD, REQUEST_PATH, BODY
    auth_timestamp:
      type: apiKey
      name: CB-ACCESS-TIMESTAMP
      in: header
      description: The timestamp of when the request is being made

````