Did you know that you are able to extract data from API into Microsoft Excel using the in-built Power Query feature? CoinGecko’s API is completely free to use, and you can enjoy the full capability of it without needing to code at all.
By the end of this guide, you’ll be able to pull live prices and build a portfolio of your favorite cryptocurrencies directly onto your very own Excel spreadsheet with a bit of elbow grease!
Note: Power Query is currently only available for Windows users and not available for Microsoft Excel on MacOS. For Mac users, you may use the Cryptosheets plugin for Microsoft Excel. For Google Sheet users, you may also refer to our Google Sheets API guide.
Let’s get started!
Step 1: Get these tabs open before the mapping exercise
- Microsoft Excel: Open a new spreadsheet
- Web browser: You will be referring to CoinGecko’s API documentation page frequently, so have this page open too: CoinGecko API Documentation.
Step 2: Pulling list of coins from CoinGecko’s API
- On Microsoft Excel, click on the “Data Tab”. Select “From Web” in the respective menu in the tab.
- You will need to input an API query from CoinGecko API Documentation. To pull the coin list, we will use the “GET /coins/list” endpoint. It returns https://api.coingecko.com/api/v3/coins/list which you can copy into Microsoft Excel.
Step 3: Convert the data into Table format on Power Query Tab
- Next, some raw data that says “Record” would be loaded in a column onto a Power Query tab. We’ll convert it to a table format before using it by clicking on the “To Table” icon.
- You would need to expand the columns as well in order for the data to be displayed nicely.
- Once done you should expect to see a table with 3 columns, like so:
Step 4: Close and Load your data to the excel spreadsheet
- The data should load in the spreadsheet selected.
- Select the filter button to sort data in accordance with your preference
- The data will load to live prices once you select the “refresh all” button on the Data tab.
And that is all there is to pulling data through API – You can easily replicate this across other API endpoints as well. Do check out the CoinGecko API Documentation page, and if you run into any issues – our FAQ section is available for reference.
We hope you find this guide useful! Here is a sample Excel document (.xlsx) that you may download and modify accordingly.
Closing thoughts
Lastly, this guide uses Power Query, which is only available for Windows Microsoft Excel users. For Mac users, your alternatives are to use the Cryptosheets plugin for Microsoft Excel or Google Sheets where we’ve also prepared a guide here!
That said, this is probably more suitable for more advanced work/analysis uses. If you want something quick, easy and syncs across web/mobile app – check out CoinGecko’s Portfolio which works right out of the box complete with charts, transactions tracking, Profit & Loss and more!
Extra: Exploring the /coins/markets endpoint for price, market cap, volume and more
- Select GET /coins/markets as an example this time.
- Enter the prefixes into the empty spaces for the desired outcome. You may follow the description of these tiles to get an idea of what to input as your data..
- Hit the execute button once completed to generate the Request URL
- (example API call to get a list of 100 coins) – https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc%2Cvolume_desc&per_page=100&page=1&sparkline=false&price_change_percentage=1h%2C24h%2C7d
- Once the API url is obtained, proceed to repeat steps 2-5 from the guide above into your Excel sheets.
The post Import CoinGecko Cryptocurrency Data into Microsoft Excel appeared first on CoinGecko Blog.