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

# Get Candles

> Get real-time candles data for a specific trading pair.

This endpoint uses the MarketDataProvider to get or create a candles feed that will
automatically start and maintain real-time updates. Subsequent requests with the same
configuration will reuse the existing feed for up-to-date data.

Args:
    request: FastAPI request object
    candles_config: Configuration for the candles including connector, trading_pair, interval, and max_records

Returns:
    Real-time candles data or error message



## OpenAPI

````yaml /api-reference/openapi.json post /market-data/candles
openapi: 3.1.0
info:
  title: Hummingbot API
  description: API for managing Hummingbot trading instances
  version: 1.0.1
servers:
  - url: http://localhost:8000
    description: Local development server
security: []
paths:
  /market-data/candles:
    post:
      tags:
        - Market Data
      summary: Get Candles
      description: >-
        Get real-time candles data for a specific trading pair.


        This endpoint uses the MarketDataProvider to get or create a candles
        feed that will

        automatically start and maintain real-time updates. Subsequent requests
        with the same

        configuration will reuse the existing feed for up-to-date data.


        Args:
            request: FastAPI request object
            candles_config: Configuration for the candles including connector, trading_pair, interval, and max_records

        Returns:
            Real-time candles data or error message
      operationId: get_candles_market_data_candles_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CandlesConfigRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
components:
  schemas:
    CandlesConfigRequest:
      properties:
        connector_name:
          type: string
          title: Connector Name
        trading_pair:
          type: string
          title: Trading Pair
        interval:
          type: string
          title: Interval
          default: 1m
        max_records:
          type: integer
          title: Max Records
          default: 500
      type: object
      required:
        - connector_name
        - trading_pair
      title: CandlesConfigRequest
      description: >-
        The CandlesConfig class is a data class that stores the configuration of
        a Candle object.

        It has the following attributes:

        - connector: str

        - trading_pair: str

        - interval: str

        - max_records: int
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic

````