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

# OHLCV - Pair

> Retrieve candlestick data in OHLCV format of a specified pair. Maximum 1000 records.

<Tabs>
  <Tab title="Usage Note">
    <p><strong>Legacy OHLCV candles scoped to one pair.</strong></p>

    <ul>
      <li>Pass a pair address when you want market-specific candles from one liquidity venue rather than token-level aggregation.</li>
      <li>Use <code>time\_from</code>, <code>time\_to</code>, and <code>type</code> to define the candle window and resolution.</li>
      <li>Pair candles are useful when DEX-specific pricing matters, especially for fragmented liquidity or venue analysis.</li>
      <li>Choose the V3 pair endpoint when you need second-level intervals or count-based retrieval.</li>
    </ul>
  </Tab>

  <Tab title="Accessibility">
    <ul>
      <li>Standard</li>
      <li>Lite</li>
      <li>Starter</li>
      <li>Premium</li>
      <li>Business</li>
      <li>Enterprise</li>
    </ul>
  </Tab>

  <Tab title="Chain Supported">
    <p><strong>All chains ⛓️ ✨</strong></p>
  </Tab>
</Tabs>

<Accordion title="Compute Unit ⚙️" icon="fa-gauge-high">
  <ul>
    <li>This endpoint consumes <code>35 CU</code> per request.</li>
  </ul>
</Accordion>

<Accordion title="Use Cases 💡" icon="fa-lightbulb">
  <ul>
    <li>Chart a specific pool or pair instead of blended token pricing.</li>
    <li>Compare price action across different pools for the same asset.</li>
    <li>Monitor venue-specific dislocations, slippage risk, or routing quality.</li>
    <li>Build analytics for LPs, market makers, and DEX-specific trading workflows.</li>
  </ul>
</Accordion>

<Accordion title="How to Use 🛠️" icon="fa-book-open">
  <ul>
    <li>Set <code>x-chain</code> for the target network.</li>
    <li>Pass the pair address in <code>address</code>.</li>
    <li>Define the time window with <code>time\_from</code> and <code>time\_to</code>.</li>
    <li>Choose a legacy candle interval in <code>type</code>.</li>
  </ul>
</Accordion>

<Accordion title="Best Practices ✅" icon="fa-check-circle">
  <ul>
    <li>Use pair candles when the token trades across many venues and you need one market's exact behavior.</li>
    <li>Keep pair identity stable in your app so users know which venue they are looking at.</li>
    <li>Join pair OHLCV with pair-overview or liquidity data when execution conditions matter as much as price.</li>
  </ul>
</Accordion>

<br />


## OpenAPI

````yaml openapi/data/openapi_docs.json GET /defi/ohlcv/pair
openapi: 3.1.0
info:
  version: 1.1.0
  title: Birdeye Data API
  description: >-
    Birdeye Data API is a full-spectrum blockchain and DEX data platform for
    teams that need production-grade crypto market intelligence across tokens,
    pairs, wallets, traders, protocols, and chains.


    From real-time prices, OHLCV, liquidity, and transaction flow to holder
    analytics, token and pair overviews, wallet portfolio and PnL, smart money,
    discovery, security, and blockchain-level utilities, Birdeye gives you a
    unified data layer for building serious crypto products at scale.


    Use it to power exchange interfaces, trading terminals, bots, market-making
    systems, quant research, alpha screeners, portfolio apps, wallet
    intelligence tools, alerting systems, analytics dashboards, and back-office
    data pipelines. Whether your users are retail traders, pro desks, analysts,
    or infrastructure teams, Birdeye helps you ship faster with broad market
    coverage and API surfaces that support both lightweight integrations and
    data-heavy workflows.


    To start, create an account at [bds.birdeye.so](https://bds.birdeye.so),
    generate an API key from the `Security` tab, and send it in the `X-API-KEY`
    header on every request.
servers:
  - url: https://public-api.birdeye.so
security:
  - apiKeyAuth: []
tags:
  - name: Price & OHLCV
  - name: Stats
  - name: Token/Market List
  - name: Transactions
  - name: Wallet, Networth & PnL
  - name: Balance & Transfer
  - name: Holder
  - name: Alltime & History
  - name: Blockchain
  - name: Account
  - name: Token
  - name: Transaction
  - name: Creation & Trending
  - name: Meme
  - name: Security
  - name: Search & Utils
  - name: Smart Money
  - name: Global Fees Paid
  - name: DEX & Protocol
  - name: Wallet Identity
paths:
  /defi/ohlcv/pair:
    get:
      tags:
        - Price & OHLCV
      summary: OHLCV - Pair
      description: >-
        Retrieve candlestick data in OHLCV format of a specified pair. Maximum
        1000 records.
      operationId: get-defi-ohlcv-pair
      parameters:
        - $ref: '#/components/parameters/xChainParam'
        - $ref: '#/components/parameters/pairAddressParam'
        - $ref: '#/components/parameters/ohlcvTypeParam'
        - $ref: '#/components/parameters/timeFromParam'
        - $ref: '#/components/parameters/timeToParam'
      responses:
        '200':
          $ref: '#/components/responses/DefiOhlcvPair'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      deprecated: true
components:
  parameters:
    xChainParam:
      name: x-chain
      description: A chain name listed in supported networks.
      in: header
      required: false
      schema:
        type: string
        enum:
          - solana
          - ethereum
          - bsc
          - base
          - robinhood
          - sui
          - mantle
          - hyperevm
          - arbitrum
          - avalanche
          - optimism
          - polygon
          - zksync
          - monad
          - aptos
          - fogo
          - megaeth
        default: solana
    pairAddressParam:
      name: address
      description: The address of a pair contract
      in: query
      required: true
      schema:
        type: string
      examples:
        solana:
          value: 4DoNfFBfF7UokCC2FQzriy7yHK6DY6NVdYpuekQ5pRgg
        ethereum:
          value: '0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640'
    ohlcvTypeParam:
      name: type
      description: OHLCV time frame.
      in: query
      required: true
      schema:
        type: string
        enum:
          - 1m
          - 3m
          - 5m
          - 15m
          - 30m
          - 1H
          - 2H
          - 4H
          - 6H
          - 8H
          - 12H
          - 1D
          - 3D
          - 1W
          - 1M
      example: 15m
    timeFromParam:
      name: time_from
      description: Specify the start time using unix timestamps in seconds
      in: query
      required: true
      schema:
        type: integer
        minimum: 0
        maximum: 10000000000
      example: 1726700000
    timeToParam:
      name: time_to
      description: Specify the end time using unix timestamps in seconds
      in: query
      required: true
      schema:
        type: integer
        minimum: 0
        maximum: 10000000000
      example: 1726704000
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Bad request
    '401':
      description: Unauthorized. API key is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Unauthorized
    '403':
      description: Forbidden. Request is blacklisted or not whitelisted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Access Denied
    '429':
      description: Too Many Requests. Rate limit reached
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Too many requests
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Internal Server Error
    DefiOhlcvPair:
      description: JSON object containing list of ohlcv  data of a pair
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DefiOhlcvPairResponse'
          examples:
            Solana:
              value:
                success: true
                data:
                  items:
                    - address: Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE
                      c: 131.98629958196778
                      h: 132.23482213379438
                      l: 131.51590533656915
                      o: 131.51590533656915
                      type: 15m
                      unixTime: 1726700400
                      v: 6156.155046497001
                    - address: Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE
                      c: 132.7284
                      h: 132.81605139774013
                      l: 131.95800580371125
                      o: 131.98629958196778
                      type: 15m
                      unixTime: 1726701300
                      v: 7401.823317684
  schemas:
    DefiOhlcvPairResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          description: Whether the request completed successfully.
        data:
          type: object
          description: OHLCV candle series for the requested trading pair.
          properties:
            items:
              type: array
              description: Pair candle list ordered by timestamp.
              items:
                type: object
                required:
                  - o
                  - h
                  - l
                  - c
                  - v
                  - address
                  - type
                  - unixTime
                  - currency
                properties:
                  o:
                    type: number
                    description: Open price at the start of the candle.
                  h:
                    type: number
                    description: Highest traded price during the candle.
                  l:
                    type: number
                    description: Lowest traded price during the candle.
                  c:
                    type: number
                    description: Close price at the end of the candle.
                  v:
                    type: number
                    description: Traded base-token volume during the candle.
                  address:
                    type: string
                    description: Pair address the candle belongs to.
                  type:
                    type: string
                    description: Candle interval such as `1m`, `1H`, or `1D`.
                  unixTime:
                    type: integer
                    description: Unix timestamp in seconds for the candle open time.
                  currency:
                    type: string
                    description: Quote currency used for price fields in this candle.
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication

````