> ## 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 Public Product Candles (Beta)

> Get rates for a single product by product ID, grouped in buckets. This feature is in beta please reach out to your Coinbase Prime account manager for more information.



## OpenAPI

````yaml get /v1/portfolios/{portfolio_id}/candles
openapi: 3.0.1
info:
  title: REST API
  description: >-
    The Coinbase Prime REST API provides programmatic access to trading,
    custody, staking, market data, and account management functionality.
  version: '0.1'
servers:
  - url: https://api.prime.coinbase.com/
security: []
tags:
  - name: PrimeRESTAPI
paths:
  /v1/portfolios/{portfolio_id}/candles:
    get:
      tags:
        - Products
      summary: Get Public Product Candles (Beta)
      description: >-
        Get rates for a single product by product ID, grouped in buckets. This
        feature is in beta please reach out to your Coinbase Prime account
        manager for more information.
      operationId: PrimeRESTAPI_GetCandles
      parameters:
        - name: portfolio_id
          in: path
          description: The portfolio id requesting market data.
          required: true
          schema:
            type: string
        - name: product_id
          in: query
          description: The trading pair.
          required: true
          schema:
            type: string
        - name: start_time
          in: query
          description: Timestamp for starting range of aggregations
          required: true
          schema:
            type: string
            format: date-time
        - name: end_time
          in: query
          description: Timestamp for ending range of aggregations
          required: true
          schema:
            type: string
            format: date-time
        - name: granularity
          in: query
          description: The timeframe each candle represents.
          required: true
          schema:
            type: string
            enum:
              - ONE_MINUTE
              - FIVE_MINUTES
              - FIFTEEN_MINUTES
              - ONE_HOUR
              - SIX_HOURS
              - ONE_DAY
              - THIRTY_MINUTES
              - TWO_HOURS
              - FOUR_HOURS
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.GetCandlesResponse
components:
  schemas:
    coinbase.public_rest_api.GetCandlesResponse:
      title: Candle response structure
      type: object
      properties:
        candles:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.Candle'
    coinbase.public_rest_api.Candle:
      title: Represents a single candle data point
      type: object
      properties:
        timestamp:
          title: Timestamp for the start of the candle period
          type: string
          format: date-time
        open:
          title: Opening price for the period
          type: string
          description: Opening price for the period
          example: '50000.00'
        high:
          title: Highest price during the period
          type: string
          description: Highest price during the period
          example: '51000.00'
        low:
          title: Lowest price during the period
          type: string
          description: Lowest price during the period
          example: '49500.00'
        close:
          title: Closing price for the period
          type: string
          description: Closing price for the period
          example: '50500.00'
        volume:
          title: Volume traded during the period
          type: string
          description: Volume traded during the period
          example: '1234.56'

````