Skip to main content
GET
/
2
/
asset
/
price-history
Get asset price history
curl --request GET \
  --url https://demo-api.mobula.io/api/2/asset/price-history
{
  "data": {
    "priceHistory": [
      [
        123
      ]
    ],
    "id": 123,
    "name": "<string>",
    "symbol": "<string>",
    "chainId": "<string>",
    "address": "<string>"
  }
}
Timestamps are in MS, it’s JS timestamps.

Overview

This endpoint retrieves historical price data for assets. Use GET for a single asset or POST for batch requests (up to 10 assets).
How to get the asset ID?You can retrieve an asset’s ID using:

GET Request (Single Asset)

Query Parameters

ParameterTypeRequiredDescription
idnumberCond.Mobula’s internal asset ID. Either id or address must be provided.
addressstringCond.Contract address. Either id or address must be provided.
chainIdstringCond.Chain identifier (e.g., "ethereum", "base"). Required when using address.
periodstringNoCandle resolution. Supported: 5m, 15m, 1h, 6h, 1d. Defaults to auto-granularity.
fromnumberNoStart timestamp (ms). Defaults to 0 (epoch).
tonumberNoEnd timestamp (ms). Defaults to current time.

Example

curl -X GET "https://api.mobula.io/api/2/asset/price-history?id=100001628&period=1h"

POST Request (Batch)

Request Body

Send an array of asset queries directly (minimum 1, maximum 10 per request). Each item uses the same parameters as the GET request.

Example

curl -X POST "https://api.mobula.io/api/2/asset/price-history" \
  -H "Content-Type: application/json" \
  -d '[
    { "id": 100001628, "period": "1h" },
    { "address": "0xc4ce8e63921b8b6cbdb8fcb6bd64cc701fb926f2", "chainId": "ethereum" }
  ]'

Response Format

All response fields use camelCase naming convention:
FieldTypeDescription
priceHistorynumber[][]Array of [timestamp, price] tuples
idnumberMobula’s internal asset ID
namestringAsset name
symbolstringAsset symbol
chainIdstringChain identifier
addressstringContract address
errorstringError message if the asset could not be fetched (batch only)

GET Response Example

{
  "data": {
    "priceHistory": [
      [1754337900000, 0.00123456],
      [1754338200000, 0.00124567]
    ],
    "id": 100001628,
    "name": "Example Token",
    "symbol": "EXT",
    "chainId": "ethereum",
    "address": "0xc4ce8e63921b8b6cbdb8fcb6bd64cc701fb926f2"
  }
}

POST Response Example

{
  "data": [
    {
      "priceHistory": [[1754337900000, 0.00123456]],
      "id": 100001628,
      "name": "Token A",
      "symbol": "TKNA"
    },
    {
      "priceHistory": [[1754337900000, 1.25]],
      "id": 100002000,
      "name": "Token B",
      "symbol": "TKNB",
      "chainId": "ethereum",
      "address": "0xc4ce8e63921b8b6cbdb8fcb6bd64cc701fb926f2"
    }
  ]
}

Data Granularity

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

Period Options

  • 5m for 5 minutes
  • 15m for 15 minutes
  • 1h for 1 hour
  • 6h for 6 hours
  • 1d for 1 day

Notes

  • Maximum 10 assets per POST request
  • Rate limit: 5 credits (GET), 10 credits (POST)

Query Parameters

id
number

Mobula's internal asset ID. Either id or address must be provided.

address
string

Contract address. Either id or address must be provided.

chainId
string

Chain identifier (e.g., 'ethereum', 'base'). Required when using address.

period
string

Candle resolution. Supported: 5m, 15m, 1h, 6h, 1d

from
number | null
default:0

Start timestamp (ms)

to
number | null

End timestamp (ms). Defaults to current time.

Response

200 - application/json

Asset price history response

data
object
required