CoinMarketCap Historical Data Download
You can legally download historical prices from CoinMarketCap via API for cryptocurrency markets such as Bitcoin & Etherium. Having this cryptocurrency price data from CoinMarketCap can help you analyze historical trends and spot changes in overall market caps over time.
We’ll walk through how to use our service to scrape historical CoinMarketCap pricing data straight from their API (no coding needed) so you can start downloading CSV & Excel files of historical market data right away.
1. Get Your API Key
To get started, you’ll need a CoinMarketCap API Key, which you can get for free. To access historical data though, you’ll need to upgrade to the $29/mo. CoinMarketCap plan which provides up to 12 months of historical data.
2. Query the API
You can use the green box on this page to begin querying the CoinMarketCap for historical data. You can provide the tickers as a list separated by commas and the start and end dates for which you want the data for:
Under the hood, this will access the CoinMarketCap Historical Cryptocurrency Quotes API Endpoint on your behalf and then parse out the data into CSV files.
After making the initial query, you’ll be able to download the results in CSV file. If you need more advanced options in querying the API (like if you want to control the interval lengths), look for the link to “Cryptocurrency Quotes” on the CoinMarketCap Scraper while logged in to your Stevesie Account.
3. Download Data
The response will automatically parse out the response data into downloadable collections you can begin analyzing right away.
If you need to bulk scrape a lot of ticker symbols, you can use the CoinMarketCap Crypto Quotes - Multiple Tickers Workflow.
The workflow will allow you to input multiple symbols and other options and will query the CoinMarketCap API for the requested data and combine together all of the response data into a single, downloadable CSV file.
Advanced Parameters
Below are a few advanced topics you may find useful after getting some initial data back. They’ll offer you finer control over querying the API for multiple tickers over larger timespans effectively.
Cryptocurrency IDs
The above scraping options allow you to specify the cryptocurrencies you want the historical data for using either IDs specific to CoinMarketCap or symbols used throughout the market. E.g. if you want to generate a Bitcoin price data CSV file for historical Bitcoin pricing, you can provide the universal symbol BTC
or use the CoinMarketCap ID of 1
.
CoinMarketCap recommends using the ID (in case the symbol changes down the road), so you can always be 100% sure you’re getting back accurate data for what you intended. In order to get the ID back of the cryptocurrency you want, you can use the “Cryptocurrency ID Map” endpoint (shown on the CoinMarketCap Scraper when logged in) to return a full list of Cryptocurrencies you can use, or you can specify one of interest in the symbol
input to only get those IDs back:
So here we can see the ID 1
is for Bitcoin, 2
is for Litecoin, etc… we can download the entire list here as a CSV file (use the down arrow next to “Download JSON”) so we can browse the full library of cryptocurrencies available to us. Take note of the IDs you want to scrape and enter them in the id
parameter for either the endpoint or workflow referenced above.
Time Ranges
Each cryptocurrency will have an earliest possible date and latest possible date to fetch historical data from. You can review this information from the “ID Map Integration” mentioned above for your specific IDs and make sure you pick a time range that works for your analysis (e.g. if you’re trying to compare multiple cryptocurrencies, you probably want to select a time range that intersects with the currencies of interest):
You will also be limited in time range based on your CoinMarketCap API plan. E.g. you may need to pay more to CoinMarketCap to go back further in time for the data you need.
If you’re scraping a large list of coins and you know that you’re going to query the API for a time range that is not within a specific coin, you probably want to set the skip_invalid
parameter to true
, otherwise the CoinMarketCap API will return an error (like if you try querying for 2013 pricing of ETH, which wasn’t around in 2013).
You can now enter the time range into the Cryptocurrency Quote Endpoint or directly into the API, whichever you’re using:
If using our integration, also specify the Latest or Historical
input to historical
.
Time Intervals
Lastly, we need to set a time interval for how frequently to return the historical pricing data. You can either set calendar-based intervals (like the beginning of each hour) with hourly
, daily
, weekly
, monthly
, yearly
or you can specify in relative intervals up to every 5 minutes. E.g. 5m
for every 5 minutes, 2h
for every 2 hours, 3d
for every 3 days, etc… Place this value in the interval
field when querying the API.
Remember that you can only get up to 10,000 results back per API call (there is no pagination), meaning that if you specify 5-minute intervals you won’t be able to get a full year back. You’ll need to instead split your requests into multiple time ranges, which is something our Historical Quotes Workflow Integration can help with, allowing you to enter in a combination of start / end intervals and different coin IDs, then the workflow can scrape data from multiple queries and combine the results together.