> ## 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.

# Price - Historical

> Retrieve historical price line chart of a specified token.

<Tabs>
  <Tab title="Usage Note">
    <p><strong>Historical price series for one token or pair.</strong></p>

    <ul>
      <li>Set <code>address\_type</code> to <code>token</code> or <code>pair</code> depending on what the address represents.</li>
      <li>Use <code>time\_from</code>, <code>time\_to</code>, and <code>type</code> together to request a bounded series at the granularity you need.</li>
      <li>Returned prices are best suited for line charts, checkpoint analysis, and broad time-series workflows rather than candle-level OHLC studies.</li>
      <li>Choose OHLCV endpoints instead when you need open/high/low/close/volume per bucket.</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>Retrieves historical USD price series for a token or pair across a selected time window.</li>
    <li>Great for charting, research, and reconstructing token or pair price behavior across a past period.</li>
    <li>Can be used to track performance before and after events such as listings, unlocks, liquidity changes, or major announcements.</li>
    <li>Helpful for portfolio reconstruction, ROI calculators, trade-performance tools, and benchmark studies.</li>
    <li>Add historical context to trade, holder, and smart-money analysis.</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 target <code>address</code> and choose <code>address\_type=token</code> or <code>address\_type=pair</code>.</li>
    <li>Define the time window with <code>time\_from</code> and <code>time\_to</code>.</li>
    <li>Choose <code>type</code> based on the granularity needed for your chart or analysis window.</li>
  </ul>
</Accordion>

<Accordion title="Best Practices ✅" icon="fa-check-circle">
  <ul>
    <li>Use wider intervals for long backfills and finer intervals only when the question really needs them.</li>
    <li>Align chart labels and downstream joins to the same bucket size you requested here.</li>
    <li>When you need an exact checkpoint instead of a series, switch to <code>Price - Historical by unix time</code>.</li>
  </ul>
</Accordion>


## OpenAPI

````yaml openapi/data/openapi_docs.json GET /defi/history_price
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/history_price:
    get:
      tags:
        - Price & OHLCV
      summary: Price - Historical
      description: Retrieve historical price line chart of a specified token.
      operationId: get-defi-history_price
      parameters:
        - $ref: '#/components/parameters/xChainParam'
        - $ref: '#/components/parameters/tokenAddressParam'
        - $ref: '#/components/parameters/addressTypeParam'
        - $ref: '#/components/parameters/ohlcvTypeParam'
        - $ref: '#/components/parameters/timeFromParam'
        - $ref: '#/components/parameters/timeToParam'
        - $ref: '#/components/parameters/uiAmountModeParam'
      responses:
        '200':
          $ref: '#/components/responses/DefiHistoryPrice'
        '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'
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
    tokenAddressParam:
      name: address
      description: The address of the token contract.
      in: query
      required: true
      schema:
        type: string
      examples:
        wsol:
          value: So11111111111111111111111111111111111111112
        solana:
          value: DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263
        ethereum:
          value: '0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce'
        solana_scaled_ui:
          value: Xsc9qvGR1efVDFGLrVsmkzv3qi45LTBjeUKSPmx9qEh
    addressTypeParam:
      name: address_type
      in: query
      required: true
      schema:
        type: string
        enum:
          - token
          - pair
    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
    uiAmountModeParam:
      name: ui_amount_mode
      description: >-
        Indicate whether to use the scaled amount for scaled ui amount tokens.
        Only support solana
      in: query
      required: false
      schema:
        type: string
        enum:
          - raw
          - scaled
          - both
        default: raw
  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
    DefiHistoryPrice:
      description: JSON object containing values and  unix timestamps of a token or pair
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DefiHistoryPriceResponse'
          examples:
            Solana:
              value:
                success: true
                data:
                  isScaledUiToken: false
                  items:
                    - unixTime: 1726670700
                      value: 127.97284640184616
                    - unixTime: 1726671600
                      value: 128.04188346328968
                    - unixTime: 1726672500
                      value: 127.40223856228901
            SolanaScaledUIAmount:
              value:
                data:
                  isScaledUiToken: true
                  multiplier: 1
                  items:
                    - address: Xsc9qvGR1efVDFGLrVsmkzv3qi45LTBjeUKSPmx9qEh
                      unixTime: 1751417580
                      value: 153.4602929354709
                      scaledValue: 153.4602929354709
                    - address: Xsc9qvGR1efVDFGLrVsmkzv3qi45LTBjeUKSPmx9qEh
                      unixTime: 1751417640
                      value: 153.4602929354709
                      scaledValue: 153.4602929354709
                success: true
  schemas:
    DefiHistoryPriceResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          description: Whether the request completed successfully.
        data:
          type: object
          required:
            - items
          description: Historical price series for the requested token or pair.
          properties:
            isScaledUiToken:
              type: boolean
              description: True when the token uses Solana Token-2022 scaled UI amounts.
            multiplier:
              type: number
              description: >-
                Scaled UI multiplier applied to historical price values for
                Token-2022 assets.
            items:
              type: array
              description: Historical price points ordered by timestamp.
              items:
                type: object
                properties:
                  unixTime:
                    type: integer
                    description: Unix timestamp in seconds for this historical price point.
                  value:
                    type: number
                    description: >-
                      Token price at the requested timestamp bucket in the
                      requested quote currency.
                  scaledValue:
                    type: number
                    description: >-
                      Historical price adjusted by the scaled UI multiplier.
                      Present for scaled UI tokens.
    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

````