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

# Get candles v2

> Handles `GET /v1/candles_v2/{symbol}` via `get.v1.candles_v2.by_symbol`.



## OpenAPI

````yaml /openapi/phoenix-public-api.json get /v1/candles_v2/{symbol}
openapi: 3.1.0
info:
  title: Phoenix Eternal API
  description: >-
    RESTful API for accessing Phoenix Eternal perpetual trading data. Provides
    real-time orderbook levels, asset information, and market metadata.
  termsOfService: https://www.phoenix.trade/terms-of-service
  contact:
    name: Phoenix Development Team
    url: https://github.com/Ellipsis-Labs/phoenix
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://perp-api.phoenix.trade
    description: Phoenix Eternal Perp API
security: []
tags:
  - name: Auth
    description: Wallet and session authentication.
  - name: Exchange
    description: Exchange, market, candle, and no-referral register-instruction workflows.
  - name: Invite
    description: Invite validation, referral activation, and wallet allowlist checks.
  - name: Notifications
    description: Trader notification reads and acknowledgement helpers.
  - name: Trader
    description: Trader state, account history, and transaction builders.
externalDocs:
  url: https://docs.phoenix.trade
  description: Phoenix developer documentation
paths:
  /v1/candles_v2/{symbol}:
    get:
      tags:
        - Exchange
      summary: Get candles v2
      description: Handles `GET /v1/candles_v2/{symbol}` via `get.v1.candles_v2.by_symbol`.
      operationId: get.v1.candles_v2.by_symbol
      parameters:
        - name: symbol
          in: path
          description: Trading symbol
          required: true
          schema:
            type: string
        - name: cursor
          in: query
          description: >-
            Opaque pagination cursor from a previous candles_v2 response. When
            present, only `enableCache` may also be sent.
          required: false
          schema:
            type: string
        - name: timeframe
          in: query
          description: Timeframe. Required unless `cursor` is provided.
          required: false
          schema:
            type: string
        - name: from
          in: query
          description: >-
            Exact inclusive lower bound on returned bar timestamps, in
            milliseconds since Unix epoch. Required unless `cursor` is provided.
          required: false
          schema:
            type: integer
            format: int64
        - name: to
          in: query
          description: >-
            Exact exclusive upper bound on returned bar timestamps, in
            milliseconds since Unix epoch. Required unless `cursor` is provided.
          required: false
          schema:
            type: integer
            format: int64
        - name: limit
          in: query
          description: Maximum bars returned in this page (max 10000)
          required: false
          schema:
            type: integer
            format: int64
        - name: includePartial
          in: query
          description: >-
            Whether to include the current open bucket when available (default:
            true)
          required: false
          schema:
            type: boolean
        - name: enableCache
          in: query
          description: >-
            Whether to read from and hydrate the candles_v2 Redis cache
            (default: true)
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Canonical asset candles
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CandlesV2Response'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '409':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    CandlesV2Response:
      type: object
      description: Canonical candles v2 history response.
      required:
        - symbol
        - timeframe
        - from
        - to
        - bars
        - page
      properties:
        bars:
          type: array
          items:
            $ref: '#/components/schemas/ApiCandleV2'
        cacheStatus:
          oneOf:
            - $ref: '#/components/schemas/CandlesV2CacheStatus'
              description: >-
                Cache source status, included only when cache reporting is
                requested.
            - type: 'null'
        from:
          type: integer
          format: int64
          description: Echoed exact inclusive lower bound in milliseconds since Unix epoch.
        page:
          $ref: '#/components/schemas/CandlesV2Page'
        symbol:
          type: string
        timeframe:
          $ref: '#/components/schemas/Timeframe'
        to:
          type: integer
          format: int64
          description: Echoed exact exclusive upper bound in milliseconds since Unix epoch.
    ApiCandleV2:
      type: object
      description: Canonical candles v2 bar.
      required:
        - time
        - open
        - high
        - low
        - close
        - isFinal
      properties:
        close:
          type: number
          format: double
        externalSource:
          type:
            - string
            - 'null'
        high:
          type: number
          format: double
        isFinal:
          type: boolean
        low:
          type: number
          format: double
        markClose:
          type: number
          format: double
        markHigh:
          type: number
          format: double
        markLow:
          type: number
          format: double
        markOpen:
          type: number
          format: double
        open:
          type: number
          format: double
        time:
          type: integer
          format: int64
        tradeCount:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        volume:
          type:
            - number
            - 'null'
          format: double
        volumeQuote:
          type:
            - number
            - 'null'
          format: double
    CandlesV2CacheStatus:
      type: string
      description: Cache source status for a candles v2 response.
      enum:
        - hit
        - miss
        - mixed
        - disabled
    CandlesV2Page:
      type: object
      required:
        - hasMore
      properties:
        hasMore:
          type: boolean
        nextCursor:
          type:
            - string
            - 'null'
    Timeframe:
      type: string
      description: Timeframe enumeration for candlestick data aggregation
      enum:
        - 1s
        - 5s
        - 1m
        - 5m
        - 15m
        - 30m
        - 1h
        - 4h
        - 1d
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    ErrorResponse:
      description: Standard JSON error payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.