Overview
This guide explores how to access and interpret Bitcoin's historical daily market capitalization data using the btc_marketcap API. Below, you'll find details on input parameters, output structure, usage examples, and sample data.
Key Features of the API
- Endpoint:
btc_marketcap - Purpose: Retrieves Bitcoin's daily market cap from its inception.
- Format: Returns date and market cap values in a structured table.
Input Parameters
| Parameter | Type | Required | Description |
|--------------|------|----------|----------------------|
| start_date | str | Yes | Start date (YYYYMMDD)|
| end_date | str | Yes | End date (YYYYMMDD) |
Output Parameters
| Field | Type | Description |
|-------------|-------|--------------------|
| date | str | Date (YYYYMMDD) |
| marketcap | float | Market cap in USD |
How to Use the API
Method 1: Direct API Call
pro = ts.pro_api()
df = pro.btc_marketcap(start_date='20180101', end_date='20180801') Method 2: Query Function
df = pro.query('btc_marketcap', start_date='20180101', end_date='20180801') Sample Data
| date | marketcap |
|----------|-----------------|
| 20180801 | 1.323767e+11 |
| 20180731 | 1.394705e+11 |
| 20180730 | 1.391434e+11 |
| ... | ... |
👉 Explore real-time Bitcoin data for the latest market trends.
FAQs
1. What time range does the data cover?
The API provides Bitcoin's market cap from its creation to the present.
2. Can I fetch data for a specific year?
Yes. Adjust start_date and end_date (e.g., start_date='20200101', end_date='20201231').
3. How frequently is the data updated?
Daily, shortly after market close.
4. Is there a rate limit?
Standard API limits apply (check Tushare documentation).
5. What units are used for market cap?
USD, in scientific notation (e.g., 1.32e+11 = $132 billion).
Why Monitor Bitcoin Market Cap?
Market cap reflects Bitcoin’s total value, aiding in:
- Trend Analysis: Spot bull/bear cycles.
- Comparisons: Benchmark against other assets.
- Investment Decisions: Assess market sentiment.
👉 Learn advanced crypto analytics to enhance your strategy.
Final Notes
- Accuracy: Data is sourced from reputable exchanges.
- Use Cases: Ideal for researchers, traders, and blockchain analysts.
- Extensions: Pair with other APIs (e.g., trading volume) for deeper insights.