> ## 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 Historical Market Data (batch)

> Retrieve historical price and volume data for up to 10 assets in a single request, with customizable time granularity.

<Warning>
  **Deprecated Endpoint**

  This endpoint is deprecated. Please use the new v2 endpoints instead:

  * [/api/2/asset/price-history](/rest-api-reference/endpoint/asset-price-history) — For asset-level historical price and volume data
  * [/api/2/token/ohlcv-history (POST)](/rest-api-reference/endpoint/token-ohlcv-history#post-request-batch) — For batch OHLCV candlestick data for up to 10 tokens in a single request
</Warning>

<Tip> Timestamps are in MS, it's JS timestamps. </Tip>

### Query details

You can query up to 10 assets as the same time (even tho if you are facing this you might want to use [our data streams](/indexing-stream/stream/websocket/multi-events-stream)).

The market data asset query pattern is explained [in great details here](/rest-api-reference/docs/market-asset-query), with blockchain format, etc.
For example, you can query with parameters:

```json theme={null}
{
  "assets": "Bitcoin,0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0,Hedera,0x23d29d30e35c5e8d321e1dc9a8a61bfd846d4c5c"
  "blockchains": "1,137"
}
```

| Parameter     | Type   | Description                                                                                                     |
| ------------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| `assets`      | string | Comma-separated list of asset names or contract addresses (up to 10). Example: `"Bitcoin,0x7d1a...,Hedera"`.    |
| `symbols`     | string | Comma-separated list of token symbols (used as alternative to `assets`). Example: `"ETH,USDT"`.                 |
| `blockchains` | string | Comma-separated list of blockchain identifiers (resolved internally). Example: `"1,137"`.                       |
| `ids`         | string | Comma-separated list of Mobula asset IDs (numeric identifiers).                                                 |
| `period`      | string | Candle resolution. Supported: `1s`, `1min`, `5min`, `15min`, `1h`, `1d`, `7d`, `30d`. If omitted, auto-derived. |
| `from`        | number | Start timestamp (ms) applied to all assets if `froms` is not provided. Defaults to 30 days ago.                 |
| `froms`       | string | Comma-separated list of start timestamps (ms), one per asset. Overrides `from`.                                 |
| `to`          | number | End timestamp (ms) applied to all assets if `tos` is not provided. Defaults to now.                             |
| `tos`         | string | Comma-separated list of end timestamps (ms), one per asset. Overrides `to`.                                     |

We will map the first blockchain with the first contract address found, and so on.

<Tip>
  Need more than 10 assets? You can use the [/all](/rest-api-reference/endpoint/all)
  endpoint to get all assets listed on Mobula (curated, not all DeFi tokens)
</Tip>

### Data details

Price data is computed using Octopus, Mobula's market data engine. You can have a high-level overview of how it's computing DeFi prices [here](https://mirror.xyz/0x6483Ca5ac1EbC6eB08d36979d217db2572CbAad2/Lw8NSSjqR4JSzthKZQCfHLwD3NPGsuaAfHGMY1zi-WI).
Data granularity is designed as follows:

* 5 minutes for the last 7 days
* 6 hours for the last 30 days
* 1 day for the remaining of history

If you need higher granularity or control, please reach out to us [on Telegram](https://t.me/mobuladevelopers?start=Mobula_API_History) - we can deliver up to 1min granularity since 2013 for all assets.

### Usage Example:

* Query by Asset and Mulitple Time Range

```bash theme={null}
curl -X GET "https://api.mobula.io/api/1/market/multi-history?froms=1677657600000,1677744000000&tos=1709193600000,1709280000000&assets=PEPE"
```


## OpenAPI

````yaml get /1/market/multi-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 - Usage
    description: Per-key API and WebSocket usage history
  - name: V2 - Blockchains
    description: System metadata and chain listings
  - name: V2 - Prediction Markets
    description: >-
      Polymarket markets/events, wallet positions, and the full execution stack
      (auth, order build/submit/cancel, approvals, pUSD wrap/unwrap, deploy,
      deposit/withdraw, redeem). Alpha — see /api/2/pm/*.
  - 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, 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:
  /1/market/multi-history:
    get:
      tags:
        - V1 - Market Data
      summary: Get market multi history
      parameters:
        - schema:
            type: string
            description: Comma-separated token contract addresses
          required: false
          description: Comma-separated token contract addresses
          name: assets
          in: query
        - schema:
            type: string
            description: Time period (e.g., "1h", "24h", "7d")
          required: false
          description: Time period (e.g., "1h", "24h", "7d")
          name: period
          in: query
        - schema:
            type: string
            description: Comma-separated token symbols
          required: false
          description: Comma-separated token symbols
          name: symbols
          in: query
        - schema:
            type: string
            description: Comma-separated blockchain IDs
          required: false
          description: Comma-separated blockchain IDs
          name: blockchains
          in: query
        - schema:
            type: string
            description: Comma-separated asset IDs
          required: false
          description: Comma-separated asset IDs
          name: ids
          in: query
        - schema:
            type: string
            description: Start timestamp
          required: false
          description: Start timestamp
          name: from
          in: query
        - schema:
            type: string
            description: End timestamp
          required: false
          description: End timestamp
          name: to
          in: query
      responses:
        '200':
          description: Market multi history response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        price_history:
                          type: array
                          items:
                            type: array
                            items:
                              type: number
                              nullable: true
                        volume_history:
                          type: array
                          items:
                            type: array
                            items:
                              type: number
                              nullable: true
                        market_cap_history:
                          type: array
                          items:
                            type: array
                            items:
                              type: number
                              nullable: true
                        market_cap_diluted_history:
                          type: array
                          items:
                            type: array
                            items:
                              type: number
                              nullable: true
                        name:
                          type: string
                        symbol:
                          type: string
                        address:
                          type: string
                        id:
                          type: number
                          nullable: true
                      required:
                        - name
                        - symbol
                        - address
                required:
                  - data

````