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

# Get Market OHLCV History

> Retrieve OHLCV (Open, High, Low, Close, Volume) candlestick data for one or multiple pools/markets.

## FAQ

<AccordionGroup>
  <Accordion title="Is `period` compatible with TradingView’s ResolutionString?">
    Mobula’s `period` is **not** the same format as TradingView’s [`ResolutionString`](https://www.tradingview.com/charting-library-docs/latest/api/modules/Charting_Library#resolutionstring). Treat them as different contracts and map values in your [datafeed](https://www.tradingview.com/charting-library-docs/latest/connecting_data/datafeed-api/) before calling Mobula.

    **Often maps cleanly (Mobula normalizes case):**

    * Seconds: TV `1S`, `5S`, … → Mobula `1s`, `5s`, …
    * Minute numerals: `1`, `5`, `15`, `30` → `1m`, `5m`, `15m`, `30m`
    * Hour-style minute counts: `60` → `1h`; `240` → `4h`; `360` → `6h`; `720` → `12h`
    * Days / weeks: `1D` → `1d`, `1W` → `1w`

    **Important mismatch — TV `1M` (one month):**\
    TradingView uses `1M` for **one month**. Mobula lowercases the string, so `1M` becomes `1m`, which means **one minute**, not one month. Never forward TV’s monthly resolution unchanged.

    **Not a direct match:**

    * **Tick** bars (`1T`, `5T`, …) — Mobula serves time-based OHLCV candles, not tick aggregation.
    * **Unrecognized strings** — fall back to a default period (commonly `1h` for unknown non-empty values, or the endpoint’s own default such as `5m` when `period` is omitted).

    **Supported candle periods for this endpoint (canonical):**\
    `1s`, `5s`, `15s`, `30s`, `1m`, `5m`, `15m`, `30m`, `1h`, `4h`, `6h`, `12h`, `1d`, `1w`.\
    Aliases such as `5min` or `60` → `1h` are accepted by the API layer. Do **not** use `1month` / TV-style monthly here: they normalize to `1M`, which this OHLCV history service does not support.

    **Recommendation:** Add an explicit `tradingViewResolutionToMobulaPeriod(resolution)` (or equivalent) in your integration instead of passing TV resolutions straight through.
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml get /2/market/ohlcv-history
openapi: 3.0.0
info:
  version: 1.0.0
  title: Mobula API
  description: >-
    Documentation of the Mobula API


    **Demo API**: The default server (demo-api.mobula.io) is a demo API with
    rate limits.

    For production use, please use api.mobula.io with an API key from
    https://admin.mobula.io
servers:
  - url: https://demo-api.mobula.io/api/
    description: Demo API (rate limited, for testing only)
  - url: https://api.mobula.io/api/
    description: Production API (requires API key)
security: []
tags:
  - name: V2 - Token
    description: Token details, price, security, ATH, and holder data
  - name: V2 - Market Data
    description: Market details, OHLCV history, and lighthouse metrics
  - name: V2 - Trades
    description: Token trades, enriched trades, and trade filters
  - name: V2 - Wallet
    description: Wallet positions, activity, trades, analysis, and labels
  - name: V2 - Assets
    description: Cross-chain asset details and price history
  - name: V2 - Swap
    description: Swap quoting and execution
  - name: V2 - Perps
    description: Perpetual futures quoting, execution, and positions
  - name: V2 - Bridge
    description: Cross-chain bridge quoting and intent status (Alpha Preview)
  - name: V2 - DeFi
    description: Bonding pools and pulse data
  - name: V2 - Search
    description: Universal fast search
  - name: V2 - Blockchains
    description: System metadata and chain listings
  - name: V1 - Market Data
    description: Market prices, history, sparklines, pairs, and multi-data
  - name: V1 - Wallet
    description: Wallet portfolio, transactions, history, and NFTs
  - name: V1 - Token
    description: First buyers
  - name: V1 - Trades
    description: Market trades by pair
  - name: V1 - Metadata
    description: Token metadata, categories, trendings, and news
  - name: V1 - Assets
    description: List all assets
  - name: V1 - Search
    description: Search for assets, tokens, and pairs
  - name: V1 - DeFi
    description: Bonding pool pulse data
  - name: V1 - Blockchains
    description: Blockchain listings, pairs, and stats
  - name: V1 - Webhooks
    description: Webhook management
  - name: V1 - Feed
    description: Custom feed creation
paths:
  /2/market/ohlcv-history:
    get:
      tags:
        - V2 - Market Data
      summary: Get market OHLCV history
      description: >-
        Retrieve OHLCV (Open, High, Low, Close, Volume) candlestick data for a
        specific pool/market by its address.
      parameters:
        - schema:
            type: string
            description: Pool/market contract address
          required: true
          description: Pool/market contract address
          name: address
          in: query
        - schema:
            type: string
            description: Blockchain chain ID (e.g., "evm:56", "solana:solana")
          required: false
          description: Blockchain chain ID (e.g., "evm:56", "solana:solana")
          name: chainId
          in: query
        - schema:
            anyOf:
              - type: integer
                nullable: true
              - type: string
                nullable: true
              - nullable: true
            description: Start date (timestamp or ISO string)
          required: false
          description: Start date (timestamp or ISO string)
          name: from
          in: query
        - schema:
            anyOf:
              - type: integer
                nullable: true
              - type: string
                nullable: true
              - nullable: true
            description: End date (timestamp or ISO string)
          required: false
          description: End date (timestamp or ISO string)
          name: to
          in: query
        - schema:
            type: string
            description: Candle period (e.g., "5m", "1h", "1d")
          required: false
          description: Candle period (e.g., "5m", "1h", "1d")
          name: period
          in: query
        - schema:
            type: number
            nullable: true
            description: Maximum number of candles (max 2000)
          required: false
          description: Maximum number of candles (max 2000)
          name: amount
          in: query
        - schema:
            anyOf:
              - type: boolean
              - type: string
            description: 'Return USD prices (default: true)'
          required: false
          description: 'Return USD prices (default: true)'
          name: usd
          in: query
      responses:
        '200':
          description: Market OHLCV history response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        v:
                          type: number
                        o:
                          type: number
                        h:
                          type: number
                        l:
                          type: number
                        c:
                          type: number
                        t:
                          type: number
                      required:
                        - v
                        - o
                        - h
                        - l
                        - c
                        - t
                required:
                  - data

````