Get any crypto price
Fetch from symbol, address, name aggregated price, volume, price change of any crypto - from Monero to the latest shitcoin on your favorite L2.
Mobula API allows you to query market data from any kind of assets in a unified way. You can query any crypto price, volume, price change, and more from any blockchain supported (check here for the full list) or asset listed on Mobula curated token list (explorable here).
What you’ll need
- An idea of what you want to build
- An API key from the Dashboard (only for production use, you can use the API without an API key in development mode)
Walkthrough
Identify your asset
Pick your asset symbol, name or address. If it is a symbol/name, make sure to check case sensitivity and to respect the asset name as listed on Mobula curated token list (explorable here). If it is an address, make sure to check the blockchain supported (check here for the full list) and to respect the blockchain ID format.
Call Mobula API
You can call Mobula API directly from your terminal using cURL or any HTTP client.
curl --location --request GET 'https://api.mobula.io/api/1/market/data?asset=Bitcoin' \
--header 'Content-Type: application/json' \
--header 'Authorization: YOUR_API_KEY_HERE'
You can also Mobula SDK (Beta):
import { Mobula } from "mobula-sdk";
const mobula = new Mobula("YOUR_API_KEY_HERE");
mobula
.fetchAssetMarketData({
asset: "Bitcoin",
})
.then((response) => {
console.log(response);
});
or a basic HTTP client:
import axios from "axios";
axios.get('https://api.mobula.io/api/1/market/data?asset=Bitcoin')
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
})
Get your data
You will get a response with the following format:
{
"data": {
"market_cap": 843024041586,
"market_cap_diluted": 903697702893,
"liquidity": 158895577,
"liquidity_change_24h": 26.329614639282227,
"price": 43033.22394727512,
"off_chain_volume": 18370240881,
"volume": 184557344,
"volume_change_24h": 41.50541687011719,
"volume_7d": 191757056,
"is_listed": true,
"price_change_24h": -0.5605395,
"price_change_1h": 0.21656898,
"price_change_7d": 1.4587651,
"price_change_1m": 21.078182,
"price_change_1y": 141.66528,
"ath": 67617.0155448617,
"atl": 67.809
}
}
Go further
Cool! We’re done with the basics. Here’s a few more things you can do with Mobula API:
- Fetch up to 500 assets at once with
market/multi-data
endpoint (check here for more details) - Subscribe to real-time price updates with WebSockets (contact us on Telegram for more details)
- Fetch historical price data with
market/history
endpoint (check here for more details)
Need help?
Can’t find what you’re looking for? Reach out to us, response times < 1h.