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

# Get Kline

> Query for historical klines (also known as candles/candlesticks). Charts are returned in groups based on the requested interval.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/market/kline
openapi: 3.1.0
info:
  title: ekiden-gateway
  description: >-
    API Gateway and WebSocket proxy based on Axum and Utoipa, handling auth,
    rate limiting, and connection buffering.
  license:
    name: ''
  version: 0.1.1
servers:
  - url: https://api.ekiden.fi/
    description: Production
  - url: https://api.staging.ekiden.fi/
    description: Staging
  - url: https://api.dev.ekiden.fi/
    description: Development
  - url: http://localhost:4020/
    description: Local
security: []
paths:
  /api/v1/market/kline:
    get:
      tags:
        - Market
      summary: Get Kline
      description: >-
        Query for historical klines (also known as candles/candlesticks). Charts
        are returned in groups based on the requested interval.
      operationId: get_kline
      parameters:
        - name: symbol
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Symbol'
        - name: interval
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Interval'
        - name: start_time
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: end_time
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: limit
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int32
            minimum: 0
      responses:
        '200':
          description: Klines
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKlineResponse'
components:
  schemas:
    Symbol:
      type: string
      example: BTCUSDC
    Interval:
      type: string
      enum:
        - 1m
        - 3m
        - 5m
        - 15m
        - 30m
        - 1h
        - 2h
        - 4h
        - 6h
        - 12h
        - 1d
        - 3d
        - 1w
        - 1M
    GetKlineResponse:
      type: object
      description: Kline response.
      required:
        - symbol
        - list
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/KlineSnapshot'
        symbol:
          $ref: '#/components/schemas/Symbol'
    KlineSnapshot:
      type: object
      required:
        - t
        - i
        - o
        - h
        - l
        - c
        - T
        - v
        - V
        - Q
        - 'n'
      properties:
        Q:
          type: string
          description: Taker buy quote asset volume. Binance `Q` field.
        T:
          type: string
          format: date-time
          description: Candle close time (ms).
          example: '1672531200000'
        V:
          type: string
          description: Taker buy base asset volume. Binance `V` field.
        c:
          type: string
          description: Close - the price of the last trade in this candle (closing price).
        h:
          type: string
          description: High - the highest trade price within this interval.
        i:
          $ref: '#/components/schemas/Interval'
          description: Candle interval - timeframe.
        l:
          type: string
          description: Low - the minimum trade price within this interval.
        'n':
          type: string
          description: Trade count. The number of trades included in this candle
        o:
          type: string
          description: Open - the price of the first trade in this candle (opening price).
        t:
          type: string
          format: date-time
          description: Candle open time (ms).
          example: '1672531200000'
        v:
          type: string
          description: Volume. the trading volume for the candle

````