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

# Historical OHLC

> Get historical OHLC candles for a symbol in a selected resolution and time range.



## OpenAPI

````yaml /openapi.json get /crypto/{symbol}/ohlc
openapi: 3.1.0
info:
  title: tradewatch.io
  version: 3.1.0
  description: Financial market data for Developers
servers:
  - url: https://api.tradewatch.io
    description: Production API server
security:
  - API Key: []
tags:
  - name: Account
    description: >-
      In this section, you can find methods that can be helpful to manage your
      API account.
    x-displayName: Account
  - name: Currencies
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for traditional currencies (Forex).
    x-displayName: Currencies
  - name: Crypto
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for cryptocurrencies.
    x-displayName: Crypto
  - name: Indices
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for market indices.
    x-displayName: Indices
  - name: Stocks
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for stocks and equities.
    x-displayName: Stocks
  - name: Fundamentals
    description: Financial statements and company data sourced from SEC EDGAR filings.
  - name: Markets
    description: Stock exchange and market session information.
  - name: Commodities
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for commodities.
    x-displayName: Commodities
paths:
  /crypto/{symbol}/ohlc:
    get:
      tags:
        - Crypto
      summary: Historical OHLC
      description: >-
        Get historical OHLC candles for a symbol in a selected resolution and
        time range.
      operationId: crypto_get_historical_ohlc
      parameters:
        - name: symbol
          in: path
          required: true
          schema:
            type: string
            title: Symbol
        - name: resolution
          in: query
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/HistoricalDataResolution'
            description: Resolution in seconds.
            title: Resolution
          description: Resolution in seconds.
        - name: start
          in: query
          required: true
          schema:
            type: integer
            exclusiveMinimum: 0
            description: Unix timestamp (inclusive).
            title: Start
          description: Unix timestamp (inclusive).
        - name: end
          in: query
          required: true
          schema:
            type: integer
            exclusiveMinimum: 0
            description: Unix timestamp (exclusive).
            title: End
          description: Unix timestamp (exclusive).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalOHLCResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HistoricalDataResolution:
      type: string
      enum:
        - '5'
        - '10'
        - '30'
        - '60'
        - '120'
        - '240'
        - '480'
        - '600'
        - '1800'
        - '3600'
        - '7200'
        - '14400'
        - '21600'
        - '43200'
        - '86400'
        - '172800'
      title: HistoricalDataResolution
    HistoricalOHLCResponse:
      properties:
        symbol:
          type: string
          title: Symbol
        resolution:
          type: string
          title: Resolution
        items:
          items:
            $ref: '#/components/schemas/HistoricalOHLCCandle'
          type: array
          title: Items
      type: object
      required:
        - symbol
        - resolution
        - items
      title: HistoricalOHLCResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HistoricalOHLCCandle:
      properties:
        time:
          type: integer
          title: Time
        open_ask:
          type: number
          title: Open Ask
        high_ask:
          type: number
          title: High Ask
        low_ask:
          type: number
          title: Low Ask
        close_ask:
          type: number
          title: Close Ask
        open_bid:
          type: number
          title: Open Bid
        high_bid:
          type: number
          title: High Bid
        low_bid:
          type: number
          title: Low Bid
        close_bid:
          type: number
          title: Close Bid
      type: object
      required:
        - time
        - open_ask
        - high_ask
        - low_ask
        - close_ask
        - open_bid
        - high_bid
        - low_bid
        - close_bid
      title: HistoricalOHLCCandle
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    API Key:
      description: Authentication via API key header
      type: apiKey
      name: api-key
      in: header

````