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

# Candlestick Data

> Candlestick Data

 Get OHLCV (Open, High, Low, Close, Volume) candlestick data for a
 trading pair with configurable interval and time range.



## OpenAPI

````yaml /proto-openapi/api/openapi.yaml get /api/v1/market/pairs/charts/candlestick/{tradingPairId}/{interval}
openapi: 3.0.3
info:
  title: Monaco Protocol API
  description: REST API for the Monaco Protocol hybrid CLOB exchange.
  version: 1.0.0
servers:
  - url: https://staging.apimonaco.xyz
    description: Staging server (Testnet)
security: []
tags:
  - name: AccountsService
  - name: ApplicationsService
  - name: AuthService
  - name: BuildercodeRewardsService
  - name: CopyTradingService
  - name: DelegatedAgentsService
  - name: FaucetService
  - name: FeesService
  - name: HealthService
  - name: ManagedMarketsService
    description: |-
      Wallet-authenticated maker assignments. The signed session must match both
       configured maker user and application. Owner IDs are process fences, never auth.
       Only wallet sessions are supported; delegated-agent sessions receive 403.
  - name: MarginAccountsService
    description: |-
      Current public isolated-margin semantics:
       - a user has one parent margin account per application scope
       - opening orders create or reuse isolated position buckets under that parent
       - parent account creation is handled internally by margin workflows
  - name: MarketService
  - name: OrderbookService
  - name: OrdersService
  - name: PositionsService
    description: |-
      Current public isolated-margin semantics:
       - positions link to a parent margin account and, when applicable, a bucket id
       - opening orders create or reuse isolated position buckets under the parent
       - users can open another isolated position by reusing the parent account with a different market bucket
  - name: PulseService
  - name: SweeperService
  - name: TraderCodeService
  - name: TradesService
  - name: WhitelistService
  - name: WithdrawalsService
paths:
  /api/v1/market/pairs/charts/candlestick/{tradingPairId}/{interval}:
    get:
      tags:
        - MarketService
        - Market
      summary: Candlestick Data
      description: |-
        Candlestick Data

         Get OHLCV (Open, High, Low, Close, Volume) candlestick data for a
         trading pair with configurable interval and time range.
      operationId: get_candles
      parameters:
        - name: tradingPairId
          in: path
          required: true
          schema:
            type: string
            default: 893d2add-2f36-4ee7-b660-893d2add2f36
          example: 893d2add-2f36-4ee7-b660-893d2add2f36
        - name: interval
          in: path
          required: true
          schema:
            type: string
            default: 1m
          example: 1m
        - name: startTime
          in: query
          schema:
            type: integer
            minimum: 0
            maximum: 4102444800000
            format: int64
          description: Start time as Unix timestamp (milliseconds)
        - name: endTime
          in: query
          schema:
            type: integer
            minimum: 0
            maximum: 4102444800000
            format: int64
          description: End time as Unix timestamp (milliseconds)
        - name: limit
          in: query
          schema:
            type: integer
            format: uint32
            minimum: 1
            maximum: 1000
            default: 100
          description: Max candles to return (max 1000)
        - name: priceType
          in: query
          schema:
            type: string
            default: trade
            enum:
              - trade
              - mark
            minLength: 1
          description: >-
            Price series to chart: trade (default, trade-derived OHLCV) or mark
            (mark-price series, margin pairs only; each candle's
            open/high/low/close are the bucket's closing mark and volume is 0)
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCandlesResponse'
        '400':
          description: Invalid parameters
        '404':
          description: Trading pair not found or inactive
        '500':
          description: Internal server error
components:
  schemas:
    GetCandlesResponse:
      type: object
      properties:
        candles:
          type: array
          items:
            $ref: '#/components/schemas/Candle'
          nullable: true
      description: OHLCV candlestick data.
    Candle:
      type: object
      properties:
        timestamp:
          example: '1699800000000'
          type: string
          description: Unix timestamp for the start of the candle period in milliseconds
          nullable: true
        open:
          example: '35000.00'
          type: string
          description: Opening price
          nullable: true
        high:
          example: '35500.00'
          type: string
          description: Highest price during the period
          nullable: true
        low:
          example: '34800.00'
          type: string
          description: Lowest price during the period
          nullable: true
        close:
          example: '35200.00'
          type: string
          description: Closing price
          nullable: true
        volume:
          example: '125.5'
          type: string
          description: Base token volume traded during the period
          nullable: true
        quoteVolume:
          example: '4412600.00'
          type: string
          description: Quote token volume traded during the period
          nullable: true
        tradeCount:
          example: 342
          type: integer
          description: Number of trades during the period
          format: uint32
          nullable: true
        closeTimestampMs:
          example: '1699800059999'
          type: string
          description: Unix timestamp for the end of the candle period in milliseconds
          nullable: true
        openInterestBase:
          example: '125.5'
          type: string
          description: >-
            One-sided LONG open interest in base-asset units, from the latest
            sample at or before the candle end. Null when no sample is
            available.
          nullable: true
        openInterestNotional:
          example: '4412600.00'
          type: string
          description: >-
            One-sided LONG open-interest notional in quote-asset units,
            calculated using the price paired with the same sample as
            open_interest_base. Present only when the paired base quantity and
            price are available; otherwise null.
          nullable: true

````

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