A dashboard that already quotes equities still needs bitcoin's price, market cap, volume, and percent change from the same provider.
This guide calls GET /v1/crypto/quotes with key=bitcoin. The quote object is data. The sample price is 64012.35, marketCap is 1260000000000, and priceChangePercentage24h is -1.84.
To access this endpoint, you must obtain an API key: Get your API key
The Endpoint
A crypto quote for one coin id lives on this path. The parameter name is key. meta.key echoes that id, meta.total reports how many quote objects came back, and the quote itself is under data. The sample key is bitcoin.
Parameters
- key: required crypto ID. The sample uses bitcoin.
Python Example
The function requests the bitcoin quote and prints price, market cap, the 24-hour percent change, and volume from data.
import requests
def fetch_crypto_quote():
url = "https://api.mboum.com/v1/crypto/quotes"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {"key": "bitcoin"}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
return response.json()
payload = fetch_crypto_quote()
print(payload.get("meta", {}))
data = payload.get("data") or {}
print(
data.get("price"),
data.get("marketCap"),
data.get("priceChangePercentage24h"),
data.get("volume"),
)
Understanding the Response
The sample meta.key is bitcoin and meta.total is 1. Under data, price is 64012.35, priceChangePercentage1h is 0.12, priceChangePercentage24h is -1.84, priceChangePercentage7d is 3.41, and priceChangePercentage30d is 8.02. marketCap is 1260000000000, circulatingSupply and totalSupply are 19700000, maxSupply is 21000000, volume is 28500000000, and volumeChangePercentage24h is 4.5.
{
"meta": {
"key": "bitcoin",
"total": 1
},
"data": {
"price": 64012.35,
"priceChangePercentage1h": 0.12,
"priceChangePercentage24h": -1.84,
"priceChangePercentage7d": 3.41,
"priceChangePercentage30d": 8.02,
"marketCap": 1260000000000,
"circulatingSupply": 19700000,
"totalSupply": 19700000,
"maxSupply": 21000000,
"volume": 28500000000,
"volumeChangePercentage24h": 4.5
}
}
priceChangePercentage24h is a number, not a string with a percent sign. In the sample it is -1.84, so you can compare it directly. The quote lives under data.
Key Fields
- Request echo: meta.key and meta.total. The sample is bitcoin and 1.
- Price and changes: price, priceChangePercentage1h, priceChangePercentage24h, priceChangePercentage7d, and priceChangePercentage30d. The sample values are 64012.35, 0.12, -1.84, 3.41, and 8.02.
- Size and supply: marketCap, circulatingSupply, totalSupply, and maxSupply. The sample values are 1260000000000, 19700000, 19700000, and 21000000.
- Volume: volume and volumeChangePercentage24h. The sample values are 28500000000 and 4.5.
Practical Use Cases
Bitcoin price card
Read data.price, data.marketCap, and data.priceChangePercentage24h for a bitcoin card beside equity quotes. In the sample those figures are 64012.35, 1260000000000, and -1.84.
Multi-window percent change
Use priceChangePercentage1h, priceChangePercentage7d, and priceChangePercentage30d from the same data object. In the sample those numbers are 0.12, 3.41, and 8.02.
Learn more or explore other endpoints: Crypto quotes