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

> Get OHLC (Open, High, Low, Close) price data for a trading pair on a Cardano DEX with historical candles.

# DEX and Pair OHLC



## OpenAPI

````yaml cardano/market-price-api/openapi.json get /dexs/ohlc/{dex}/{pair}
openapi: 3.1.0
info:
  description: Market endpoints dedicated to Cardano DeFi protocols & Ingestor.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.txt
  title: Cardano - Market Price API
  version: 0.1.0
servers:
  - description: Cardano Mainnet
    url: https://mainnet.gomaestro-api.org/v1/markets
  - description: Cardano Preprod
    url: https://preprod.gomaestro-api.org/v1/markets
  - description: Cardano Preview
    url: https://preview.gomaestro-api.org/v1/markets
security:
  - api-key: []
externalDocs:
  description: ''
  url: ''
paths:
  /dexs/ohlc/{dex}/{pair}:
    get:
      tags:
        - DEX
      summary: DEX and Pair OHLC
      description: >-
        Returns market activity in candlestick OHLC format for a specific DEX
        and token pair
      operationId: mkt-dex-ohlc
      parameters:
        - description: minswap
          in: path
          name: dex
          required: true
          schema:
            type: string
        - description: ADA-MIN
          in: path
          name: pair
          required: true
          schema:
            type: string
        - description: 1h
          in: query
          name: resolution
          schema:
            enum:
              - 1m
              - 5m
              - 15m
              - 30m
              - 1h
              - 4h
              - 1d
              - 1w
              - 1mo
            type: string
        - description: '2023-04-01'
          in: query
          name: from
          schema:
            type: string
        - description: '2023-05-15'
          in: query
          name: to
          schema:
            type: string
        - description: '10000'
          in: query
          name: limit
          schema:
            default: 5000
            maximum: 50000
            minimum: 1
            type: integer
        - description: desc
          in: query
          name: sort
          schema:
            enum:
              - asc
              - desc
            type: string
        - description: 'false'
          in: query
          name: carry
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/api.DexOhlcRespBody'
                type: array
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.APIError'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.APIError'
          description: Server Error
components:
  schemas:
    api.DexOhlcRespBody:
      properties:
        coin_a_change_pct:
          description: Coin A change percentage
          type: number
        coin_a_close:
          description: Coin A close
          type: number
        coin_a_high:
          description: Coin B high
          type: number
        coin_a_low:
          description: Coin A low
          type: number
        coin_a_open:
          description: Coin A open
          type: number
        coin_a_volume:
          description: Coin A volume
          type: number
        coin_b_change_pct:
          description: Coin B change percentage
          type: number
        coin_b_close:
          description: Coin B close
          type: number
        coin_b_high:
          description: Coin A high
          type: number
        coin_b_low:
          description: Coin B low
          type: number
        coin_b_open:
          description: Coin B open
          type: number
        coin_b_volume:
          description: Coin B volume
          type: number
        count:
          description: Candlestick size
          type: integer
        timestamp:
          description: Candlestick timestamp
          type: string
      type: object
    api.APIError:
      properties:
        error:
          description: Error returned from the API request
          example: Bad Request
          type: string
      type: object
  securitySchemes:
    api-key:
      description: Project API Key
      in: header
      name: api-key
      type: apiKey

````