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

# Get candlestick (OHLC) data

> Retrieve candlestick data for a specific market and time range.
Supports intervals: 1m, 15m, 1h, 4h, 1d. Missing intervals are interpolated using the last known close price.
Maximum 1000 candles per request.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/candlesticks
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
paths:
  /api/v1/candlesticks:
    get:
      tags:
        - Market Data
      summary: Get candlestick (OHLC) data
      description: >-
        Retrieve candlestick data for a specific market and time range.

        Supports intervals: 1m, 15m, 1h, 4h, 1d. Missing intervals are
        interpolated using the last known close price.

        Maximum 1000 candles per request.
      operationId: handle_candlestick_snapshot
      parameters:
        - name: market
          in: query
          description: Market address
          required: true
          schema:
            type: string
          example: 0xmarket123...
        - name: interval
          in: query
          description: Candlestick interval (1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1mo)
          required: true
          schema:
            $ref: eceeaf32-aba3-4374-ac63-681767bd24ee
          example: 1h
        - name: startTime
          in: query
          description: Start time in milliseconds
          required: true
          schema:
            type: integer
            format: int64
          example: 1634567890000
        - name: endTime
          in: query
          description: End time in milliseconds
          required: true
          schema:
            type: integer
            format: int64
          example: 1634654290000
      responses:
        '200':
          description: Candlestick data retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CandlestickResponseItemDto'
        '400':
          description: >-
            Invalid parameters (e.g., start_time > end_time or exceeds max
            candles)
        '404':
          description: Market not found
        '500':
          description: Database error
components:
  schemas:
    CandlestickResponseItemDto:
      type: object
      required:
        - t
        - T
        - o
        - h
        - l
        - c
        - v
        - i
      properties:
        T:
          type: integer
          format: int64
          example: 1761591599999
        c:
          type: number
          format: double
          example: 100
        h:
          type: number
          format: double
          example: 102
        i:
          type: string
          example: 1h
        l:
          type: number
          format: double
          example: 98
        o:
          type: number
          format: double
          example: 100
        t:
          type: integer
          format: int64
          example: 1761588000000
        v:
          type: number
          format: double
          example: 1000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````