Mobula API provides comprehensive historical price data from the first block a token was transacted on, offering a crucial tool for in-depth financial analysis and historical performance review.

What you’ll need

  1. Basic knowledge of RESTful APIs and JavaScript.
  2. Optional: Preferences for specific token(s), cache settings, and stale data handling.
  3. An API key from the Dashboard (required for production; optional in development mode).

Walkthrough

1

Execute the API Call

You can call Mobula API directly from your terminal using cURL or any HTTP client.

Using cURL:

curl --request GET \
--url 'https://api.mobula.io/api/1/market/history?asset=base&blockchain=base'

Using Axios:

import axios from "axios";

axios.get('https://api.mobula.io/api/1/market/history?asset=base&blockchain=base')
.then(function (response) {
  console.log(response);
})
.catch(function (error) {
  console.log(error);
})
2

Review the Response

You will get a response with the following format:

{
  "data": {
    "price_history": [
      [
        1690848000000,
        6.591077336435656e-7
      ],
      [
        1690869600000,
        0.00000195159542182393
      ],
      [
        1690891200000,
        0.0000016428397923859638
      ],
      [
        1690912800000,
        0.0000019099557143586473
      ],
      [
        "...",
        "..."
      ]
    ]
  }
}

With this information, you can:

  • Analytic Integration: Use token price change data to power tools that deliver insights on token performance.
  • Analyze Market Trends: Track asset price fluctuations over time.
  • Assess Investment Opportunities: Gain insights into potential investment decisions based on past price movements.

Need help?

Can’t find what you’re looking for? Reach out to us, response times < 1h.