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

> Get rates for a single product by product ID, grouped in buckets.



## OpenAPI

````yaml GET /api/v3/brokerage/market/products/{product_id}/candles
openapi: 3.1.0
info:
  title: Coinbase Advanced Trade API
  version: '0.1'
servers:
  - url: https://api.coinbase.com
security:
  - ApiKey: []
  - OAuth2: []
paths:
  /api/v3/brokerage/market/products/{product_id}/candles:
    get:
      tags:
        - Public
      summary: Get Public Product Candles
      description: Get rates for a single product by product ID, grouped in buckets.
      operationId: RetailBrokerageApi_GetPublicCandles
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: path
          required: true
          schema:
            type: string
        - name: start
          description: The UNIX timestamp indicating the start of the time interval.
          in: query
          required: true
          schema:
            type: string
        - name: end
          description: The UNIX timestamp indicating the end of the time interval.
          in: query
          required: true
          schema:
            type: string
        - name: granularity
          description: The timeframe each candle represents.
          in: query
          required: true
          schema:
            type: string
            enum:
              - UNKNOWN_GRANULARITY
              - ONE_MINUTE
              - FIVE_MINUTE
              - FIFTEEN_MINUTE
              - THIRTY_MINUTE
              - ONE_HOUR
              - TWO_HOUR
              - FOUR_HOUR
              - SIX_HOUR
              - ONE_DAY
            default: UNKNOWN_GRANULARITY
        - name: limit
          description: >-
            The number of candle buckets to be returned. By default, returns 350
            (max 350).
          in: query
          required: false
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candles
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candles
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      security: []
components:
  schemas:
    coinbase.public_api.authed.retail_brokerage_api.Candles:
      type: object
      properties:
        candles:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candle
    grpc.gateway.runtime.Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            type: object
            additionalProperties: true
    coinbase.public_api.authed.retail_brokerage_api.Candle:
      type: object
      properties:
        start:
          type: string
          example: '1639508050'
          description: The UNIX timestamp indicating the start of the time interval.
        low:
          type: string
          example: '140.21'
          description: Lowest price during the bucket interval.
        high:
          type: string
          example: '140.21'
          description: Highest price during the bucket interval.
        open:
          type: string
          example: '140.21'
          description: Opening price (first trade) in the bucket interval.
        close:
          type: string
          example: '140.21'
          description: Closing price (last trade) in the bucket interval.
        volume:
          type: string
          example: '56437345'
          description: Volume of trading activity during the bucket interval.
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer token signed using your API Key Secret, see [Creating API
        Keys](/coinbase-app/authentication-authorization/api-key-authentication)
        section of our docs for more information. See [Scope &
        Permissions](/coinbase-app/advanced-trade-apis/rest-scopes) for the
        permission each endpoint requires.
    OAuth2:
      type: oauth2
      description: >-
        An OAuth 2.0 access token from the Coinbase App OAuth2 flow. See [Scope
        & Permissions](/coinbase-app/advanced-trade-apis/rest-scopes) for the
        scope each endpoint requires.
      flows:
        authorizationCode:
          authorizationUrl: https://login.coinbase.com/oauth2/auth
          tokenUrl: https://login.coinbase.com/oauth2/token
          scopes:
            wallet:user:read: View your account information.
            wallet:user:update: Update your account information.
            wallet:accounts:read: View your accounts.
            wallet:buys:create: Place, edit, and cancel orders.
            wallet:trades:read: View your cryptocurrency conversions.
            wallet:trades:create: Convert cryptocurrencies.
            wallet:transactions:read: View your transactions.
            wallet:transactions:transfer: Transfer funds between accounts.
            wallet:payment-methods:read: View your payment methods.

````